Hello Luke
i did an export of a website in a php framework and one of the page items
is a text string with html in it, made with a wysiwyg editor in the
framework, the others are things like strings with regular text, file id's,
numbers, ...
in these chunks of html there is a reference to image files in the form
<img src="index.php/view_inline_file/1234">
where the 1234 is the file id of the image, i also exported the image
database so i can use these file id's
by now i have altered the php export script of the old site so the html
would contain
<img ng-src="/filesorig/1234">
thinking i could use this route to return the url of the file that is
something like "/assets/3578/2456/9345/the_original_filename.jpg" from the
api serverside
I tried the route option like Caitlin suggested but when i make a template
i still need to use ng-bind-html to include the html block and my ng-src
seems to disappear again.
with ng-include i had no luck either, i think i will change my php export
code so the html will contain
the "/assets/3578/2456/9345/the_original_filename.jpg" instead of
the "index.php/view_inline_file/1234", i have lost to much time on this and
i think it would make more sense to take care of this in the export so i
don't have to worry about it in the new environment.
thanks for your input
gr
Marco
Op woensdag 15 april 2015 07:34:27 UTC+2 schreef 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 the url only, like
> if you know it's always the same file name but the directory changes:
>
> <img ng-src="{{current_directory}}/image.png">
>
>
>
> On Tuesday, April 14, 2015 at 2:20:48 PM UTC-6, Marco wrote:
>>
>> 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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.