Answer the question
In order to leave comments, you need to log in
AngularJS: string interpolation from json?
Hello.
The question is this: I have a json file that contains some data that I need to replace when displaying it in a view.
I thought that you can write {{data.val}} and this construction will be processed when outputting, but no. Displays "as is".
Is this even possible or am I doing something wrong?
Answer the question
In order to leave comments, you need to log in
$interpolate(vm.temp)(vm.data);
The documentation does not describe this method very clearly .. but I googled how to use it and it all worked.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question