0
app.component('test', {
templateUrl: '/_directive/test.tpl.html',
bindings: {
currenttab: "="
},
controllerAs: 'test',
controller: test });
通過查詢字符串參數組件我想是這樣的:
templateUrl: '/_directive/test.tpl.html?version=' + version;
你的回答是對的,但是** templateUrl **不能訪問直接值。所以我使用**模板**字段,並使用ng-transclude&fire在控制器上的更改事件 –
正確答案:https://stackoverflow.com/questions/33841909/angular-1-5-component-method-templateurl-功能?noredirect = 1&LQ = 1 –