angularjs - How to override image source within a directive -
I want to override an image source within an instruction. I have tried the following, none of which works. App.directive ('imgTransform', function () {return (copy: 'a', link: function (radius, attrs) (elem.attr ('ng-src', ' ('Src', 'foo'); attrs.src = 'foo';}};});
Do the link function execute before being bogged?
I also tried to create a separate scope and to force the ngSrc attribute:
Scope: {src: '@ngSrc'}, Then set scope.ngSrc to the link function.
< Div class = "post-text" itemprop = "text"
Before you do your own To get the banking function it needs to be modified.
I recommend the controller function, because the $ compiler was opposed to digging in depth.
Restrict: "A", Controller: Function ($ Range, $ element, $ etter) {$ attrs. $ Set ('NGSRC', 'some other volume');}, link: function (scope, L, etters ) {...} Here's a bella:
Besides, $ your link function is good luck :)
Comments
Post a Comment