Interpolated templateUrl
See original GitHub issueHi! Is there a way for me to interpolate on templateUrl
attribute?
Example:
HTML
<ng-pdf template-url="{{vm.templateUrl}}" test debug="false" scale="1.6" pdfurl="vm.pdfUrl" canvasid="pdf-canvas"></ng-pdf>
JS ` var vm = this;
vm.templateUrl = ‘/app/views/pdf-control.html?v=’ + version; `
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:9
Top Results From Across the Web
dynamic templateUrl in directive based on element attribute ...
The template that always get returned is template-other.html because the type value was still {{widget.type}} and has not been interpolated yet.
Read more >Angular template syntax - Agiliq
... Example Angular Component we have used a HTML template templateUrl: '. ... Interpolation is a double braced syntax to render data in...
Read more >Component - Angular
templateUrl ? The relative path or absolute URL of a template file for an Angular component. If provided, do not supply an inline...
Read more >Angular2: method used in interpolation in external template is ...
Angular2: method used in interpolation in external template is marked as unused. 7. Is duplicated by 5. Is duplicated by 5 issues (0...
Read more >Angular 7 - template & templateUrl - Sahosoft Tutorials
If you use single or double quotes instead of backticks, an error will occur. template: “<h1>{{interpolation}}</ ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Did anyone find a solution to this issue? I’m having the same problem.
template-url
seems to always be taken as a string literalIf anyone is still interested in this, you have to force a compilation using
$compile
or compile function in your directive, in order to turntemplate-url
dynamic.In my case it was being called inside another directive.