![]() |
VOOZH | about |
The ng-src Directive in AngularJS is used to specify the src attribute of an <img> element, ie., it overrides the original src attribute for an <img> element. This attribute must be used if we have the Angular code inside of the src element. It ensures that the wrong image is not produced until AngularJS has been evaluated. It is supported by <img> element.
Syntax:
<img ng-src="url">
Parameter value:
Example: This example describes the usage of the ng-src Directive in AngularJS.
Output:
Example 2: This is another example that describes the usage of the ng-src Directive in AngularJS.
Output: