Click the LI label after NG-REPEAT traversed to achieve the Border color;
element, “Li_Click () method added to the SCOPE object is executed; 2 will” $ INDEX (line number value) “in this method As the actual paragraph to the method, the “FOCUS” attribute value is set to “$ index” value;
3 Therefore, when you click a row
At this time, “NG-Class” style instructions of theelement specifies the style that the element needs to be added via the Key / Value object, since the
element is clicked When the “$ index” variable value and “FOCUS” attribute value are the same, that is, the return value of “$ index == focus” is true;
The above is a small-knit to the Angular to click the LI tag to achieve changes in the color, I hope to help everyone. If everyone has any questions, please leave a message, the small package will reply to everyone in time. Thank you very much for your support of Tumi Cloud Website!