- directive in module ng
Using Angular markup like {{hash}}
in a srcset
attribute doesn't work right: The browser will fetch from the URL with the literal text {{hash}}
until Angular replaces the expression inside {{hash}}
. The ngSrcset
directive solves this problem.
The buggy way to write it:
1 |
The correct way to write it:
1 |
Directive Info
- This directive executes at priority level 99.
Usage
- as attribute: 1234
<
IMG
ng-srcset
=
"template"
>
...
</
IMG
>
Arguments
Param | Type | Details |
---|---|---|
ngSrcset | template | any string which can contain |
Please login to continue.