How to preventdefault on anchor tags?
Answer / Dhananjay Singh
To prevent the default action of an anchor tag in AngularJS, you can use the ng-click directive along with $event to call a function and stop the default action. For example: <a ng-click="myFunction($event); $event.preventDefault()">Link Text</a>
| Is This Answer Correct ? | 0 Yes | 0 No |
How can we share the data between controllers in angularjs?
What is angularjs latest version?
Is angularjs extensible?
How to set headers for every request in angular?
How to create custom directives?
What is the difference between $watch, $digest and $apply?
What is flex in angular material?
What is Component in Angular Terminology?
What are zones? What is change detection?
How to declare a component in angular 2?
What is the advantage of angular?
Can't bind to ngmodel since it isn't a known property of input?