angularjs - Angular Directive isolated scope not updating -


I created this angle command that works up to a point. {'Image:': 'Picture', 'Source': '@ Source', 'Application' }, Replace: true, template: '

through it Being told:

  album-art pictures = 'picture' l Bomb = '{{album.title}}' source = '{{Default}}' class = "pull-left art">   
< P> Picture is an array, the title of the album is clear and the source is set to a default image in the main app controller.

The problem is that when a loop Is found in: function, scope.source is set, but the template {{source}} is not updating the reference.

Any help would be greatly appreciated. Thanks

OK, I can remove the separate scope and instruct the heir to the parent area I'm giving permission. / P>

Bus initiated by:

  & lt; Album-album = '{{album}}' & gt; & Lt; / Album-art & gt;  

or

  & lt; Album-Art Album = '{{album.title}}' & gt; & Lt; / Album-art & gt;  

Depending on the app view, the command now looks like this:

  app.directive ('albumArt', function () {refund} : 'AE', Replace: Correct, Template: '& lt; img ng-src = "{{source}}" width = "30" height = "30" & gt;', link: function (scope, element) , Ethers) {for (i = 0; i & lt; = scope.pictures.length; i ++) {If (scope.pictures [i] .album == attrs.album) {scope.source = "data: "+ Scope.pictures [i] .mime_type +" base64, "+ scope.pictures [i] .picture; break;}}}}};});  

I have found a single IMG default either. Or album artwork if it exists.

Thank you for all your comments and suggestions.


Comments

Popular posts from this blog

winforms - C# Form - Property Change -

java - Messages from .properties file do not display UTF-8 characters -

javascript - amcharts makechart not working -