I knew I cann't, just not happy this limitation, I wanta it point to
different files according to data read from backend
On Friday, January 15, 2016 at 12:54:00 AM UTC+11, Günter Zöchbauer wrote:
>
> `templateUrl` points to a file containing a string where you can use
> binding/{{}}, you can't for `templateUrl` itself. It just points to a file.
> `template` is for inline template and there you can use binding/{{}}.
>
> On Wednesday, January 13, 2016 at 12:05:21 AM UTC+1, Long Field wrote:
>>
>>
>>
>> On Tuesday, January 12, 2016 at 7:01:38 PM UTC+11, Günter Zöchbauer wrote:
>>>
>>>
>>> http://stackoverflow.com/questions/31692416/dynamic-template-urls-in-angular-2
>>> Hi Gunter
>>>
>> It looks like a missing function, follow doc. both template and
>> tenplateUrl as ?string but why we can use {{url}} inside template string
>> but not templateUrl string?
>>
>>
>>
>>> On Tuesday, January 12, 2016 at 6:08:32 AM UTC+1, Long Field wrote:
>>>>
>>>> Hi Sander
>>>> I need my class to get data from backend and then I can know which
>>>> templateUrl to use?
>>>> Or should I use @input in templateUrl ?
>>>>
>>>> On Tuesday, January 12, 2016 at 3:19:43 PM UTC+11, Sander Elias wrote:
>>>>>
>>>>> Hi Long,
>>>>>
>>>>> You have to declare that variable before you define your class. At the
>>>>> time the @component decorator runs, your class is not there yet.
>>>>>
>>>>> Regards
>>>>> Sander
>>>>>
>>>>
--
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 https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.