The beast's Ng API learns--Nghref, NGSRC, Ngcopy/ngcut/ngpaste
Nghref
When the angular program does not complete the HREF value that is bound with the {{hash}} method on the link, the user clicks on the link and jumps to the wrong page.
Format: ng-href= "value"
Value: An expression.
Using code:
<a ng-href= "http://www.xxxxx.com" > Click to go to xxxxx website </a>
If the URL of the href binding is a dynamic binding (from the code to the view), the HREF binding error occurs because angular has not compiled the expression on the HTML, and the value originally bound with the href is href= "{{ Hash}} ", and if you use ng-href, then angular will bind the URL after compiling, of course, when you see a tag attribute at the same time there are ng-href and href, the following href is parsed out, and the URL values on the 2 attributes are correctly bound.
Ngsrc
In angular, the {{hash}} tag on the SRC tag is incorrect. The browser will use the URL that includes the {{hash}} text before angular replaces the expression in {{hash}}. The ngsrc solved the problem.
How to use the error:
The right way to use:
Ngsrc and Nghref.
Ngcopy/ngcut/ngpaste
<input ng-copy= "Copy=true" ng-init= "COPY=FALSE; Value= ' Copy me ' "ng-model=" Value ">{{copy}}
<input ng-cut= "Cut=true" ng-init= "CUT=FALSE; Value= ' Cut Me ' "ng-model=" Value ">{{cut}}
<input ng-paste= "Paste=true" ng-init= "paste=false" placeholder= ' Paste here ' >{{paste}}
We can execute our custom events with the above three instructions, respectively, when triggering copy/Cut/paste.
The beast's angular Api learning, translating and understanding-Nghref, NGSRC, Ngcopy/ngcut/ngpaste