All Questions
Tagged with angularjs-ng-click angularjs-ng-class
9
questions
0
votes
1answer
75 views
How can I move the ng-repeat filter into the controller and apply ‘active’ class when user clicks?
I have a tabbed slider where can switch the view of the slider by selecting the tab, which is filtering the ng-repeat by property.
How can I move the filter into the controller and apply ‘active’ ...
2
votes
1answer
698 views
applying class using ng-class for nested items in Angularjs
I am displaying the menu items in the below format. The data contains list of items and for each item there is a subitem. I need to apply the selected class for the subitem selected and all other ...
0
votes
1answer
3k views
optimal way to highlight selected li in Angularjs
I am using Angularjs 1.4.7 version. I have a <ul><li>..</li>....</ul> and want to apply a background-color property to the selected li. The code is as below:
<ul ...
6
votes
2answers
36k views
How to add and remove class with AngularJS?
I have a few buttons that work like switchers. If you click one it becomes active and "shuts down" other buttons. I did this using jQuery but would like to use AngularJS. Here is my code:
HTML
<...
2
votes
2answers
353 views
How to set the ng-class in order of item clicked?
http://plnkr.co/edit/pUtuZy?p=preview
I have these 3 border classes:
.border1 {
border: 1px solid #66FFFF;
}
.border2 {
border: 1px solid #33CCFF;
}
.border3 {
border: 1px solid #0099FF;
}
...
2
votes
1answer
85 views
How to fix this ng-class toggle comparison?
http://plnkr.co/edit/7v63GXSIDon1QKm1GXCE?p=preview
I have an array which stores the name of each button that is clicked. Once clicked the object is placed into array, I use ng-class to check if the ...
2
votes
4answers
97 views
How to use controller variables along with ng-click to toggle class?
http://plnkr.co/edit/nEfBE33AJen3mz9YvjeC?p=preview
I have a list of tag buttons, by default after all the items are loaded, I set the first 3 items to have the selected class.
Now I also need tags ...
1
vote
2answers
185 views
How to combine ng-class checks and ng-click comparisons?
I have an ng-repeat where the first item needs to have the class selected, as well as clicking on each item then changes the selection.
<li ng-repeat="ticker in tickers"
data-ng-class="{'...
3
votes
1answer
2k views
How to use ng-toggle and ng-class to change icon while using ng-click:predicate
I'm using predicate to easily sort items in my data model. Now I've working on adding in an up and down arrow icons to show which state the sort is currently in.
Example of predicate orderBy in ...