Answer the question
In order to leave comments, you need to log in
How to implement object selection on click in angular js?
How to use the ui.router module to implement selection (visually change the color, for example) of an object (text in the a tag) on click?
Please provide an easy example :)
Answer the question
In order to leave comments, you need to log in
It is not entirely clear what is meant by selection, and what is meant by an object. Is the object an HTML element or a word in text? Well, here's the preview.
In template.
In code
$scope.select = function($event) {
angular.element($event.target).addClass('badge');
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question