Share.. Ask.. Learn..
Pages
Home
AngularJs Keywords
AngularJS
AngularJS Question & Answer
Angular 2
About Us
Contact Us
Sunday, 18 October 2015
ng-click
What is ng-click:
ng-click used to perfom a task when element is clicked.
Description of ng-click:
It is importan directive of angularjs.
Syntax of ng-click:
<
div
ng-cick
="myfun()"></
div
>
Or
<
div
ng-cick
="msg='This is angularjs example of ng-click'"></
div
>
How to Use ng-click/ng-click Example:
Example:
<
div
ng-init
="msg='angularjs example'">
msg1:
{{
msg
}}
<
div
ng-cick
="msg='This is angularjs example of ng-click'">
msg2:
{{
msg
}}
</
div
>
</
div
>
o/p:
msg:angularjs example
//when ng-click fire
msg:This is angularjs example of ng-click
No comments :
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments ( Atom )
No comments :
Post a Comment