2014-12-08 90 views

回答

1

可以使用NG-包括組件:

@Component(
    selector: 'dynamictemplate', 
    template: '<div ng-include="{{templateurl}}"></div>' 
) 
class DynamicTemplate { 
    // ... 
    String get templateurl => select?url1:url2; 
} 
+0

到目前爲止,我得到「無法在包maui_frontend找到資產web/templateUrl。」接着就,隨即。 – 2014-12-08 20:10:57

+0

唉拍,我忘了鬍鬚!再試一次。 – Ozan 2014-12-08 21:31:08

+0

這是不是非常performatick,因爲它在javascript級別解決 – Jonathan 2016-10-12 17:08:44