angularjs - Is it possible to use a dynamic file name for an ng-include? -
Is there a way to use dynamic filenames in ng-in? It does not seem that it is possible so that any option would be very welcome, I have a list of markings to display in different circumstances and I do not have too many if
statements.
Something I'm trying to achieve:
& lt; Div ng-include = "{{file.name}}" & gt; & Lt; / Div & gt;
Is this the only possible way to do this ?:
& lt; Ng- included src = "file.name" & gt; & Lt; / Ng-included & gt;
Thanks in advance for any tips / advice.
Yes second code sample is the only way to do this. Why do you want to do it another way?
Comments
Post a Comment