I have an angular application.on click of a tag, I am populating another div. Now I have a requirement to change the route as well on the click of the tag. how can I do this using Angularjs?
asked Mar 28, 2014 at 8:58
Pradeep
8437 gold badges16 silver badges26 bronze badges
1 Answer 1
You can call a function on the scope as the click event handler.
For example: In your controller you have
$scope.myClickHandler = function() {
populateDiv();
changeRoute();
}
In your HTML template:
<div ng-click="myClickHandler()></div>
answered Mar 28, 2014 at 9:08
Wawy
6,2692 gold badges26 silver badges24 bronze badges
default