AngularJS ng-src command
AngularJS examples
Add Photo Address:
<Div ng-init = "myVar = '../wp-content/uploads/2014/06/angular.jpg'">
<H1> Angular </ h1>
<Img ng-src = "{ {myVar}}">
</ Div>
<H1> Angular </ h1>
<Img ng-src = "{ {myVar}}">
</ Div>
try it"
Definition and Usage
ng-src instruction covers the src attribute <img> element.
If you use AngularJS code to set the address of the picture, useng-src command substitution src
attribute.
ng-src command to ensure that the code is before AngularJS do not show pictures.
grammar
<Img ng-src = "string "> </ img>
<Img> element supports the property.
Parameter Value
value | description |
---|---|
string | Expression string is returned. |