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 –