Hi everyone!
In Angular 1, we can dynamically set the templateUrl for a directive according to an specific attribute.
Here is an example (Angular 1):
[...]
scope: {
size: '@',
color: '@'
},
templateUrl: function(elem, attrs){
// different templateUrl according to size attribute
return 'app/styling/tmpl.svg.stairs-' + (attrs.size || 'small') + '.svg';
},
[...]
How can I reproduce it in ionic2 component? (Angular 2)
There is no ability to access @Input value inside templateUrl function right?
Can you help me @mhartington , @bengtler?
Any help will be appreciated.
Thanks in advance!