[AngularJS] ng-src not working in ng-bind-html

2015-04-14 Thread Marco
Hello, in my controller i'm replacing img urls with urls i get from a database in html fragments that i also get from a database example div ptest/p img src=old/source/image div becomes div ptest/p img src=new/source/image div the new source for the image url is constructed in the

Re: [AngularJS] ng-src not working in ng-bind-html

2015-04-14 Thread Caitlin Potter
ng-bind-html does not compile the html template, it just sanitizes and renders it. So, directives like ng-src won’t work. You might want to use ngInclude or a router for this functionality instead. On Apr 14, 2015, at 12:14 PM, Marco marco.sto...@gmail.com wrote: Hello, in my controller

Re: [AngularJS] ng-src not working in ng-bind-html

2015-04-14 Thread Luke Kende
Are you trying to replace complete blocks of html? Then yes, use ng-include as Caitlin recommends. For ng-src is interpolated not, bound to a variable... the proper way to change the source in your case should be: img ng-src={{imagevar}} This is advantageous because you can change, parts of

Re: [AngularJS] ng-src not working in ng-bind-html

2015-04-14 Thread Marco
OK, thanks for the reply, I will check these options -- You received this message because you are subscribed to the Google Groups AngularJS group. To unsubscribe from this group and stop receiving emails from it, send an email to angular+unsubscr...@googlegroups.com. To post to this group,