我有一個角度組件,我想包括在我的頁面中。 一切正常,如果我評論/刪除綁定參數在這個組件...爲什麼?角度組件「綁定」參數有什麼問題?
(function() {
angular.module('app').component('detailsComponent1', {
templateUrl: '/RealSuiteApps/RealForm/-1/Details/Component1',
restrict: 'E',
bindings: {
value: "Component1"
},
controllerAs: 'cm',
controller: function() {
this.message = 'Hello from component1';
}
});
})();
如果我想使用結合參數,我得到一個錯誤:
鏈接到:https://docs.angularjs.org/error/ $編譯/ ISCP P0 = detailsComponent1 & P1 =值& P2 = Component1 & p3 =控制器%20bindings%20Definition
這是什麼意思?
謝謝。
那麼,該模板來自MVC調用,它與該問題無關。我說,如果我刪除了綁定,那麼一切正常...... – monstro
刪除'restrict:'E','以及。錯誤是因爲'value:'Component1「'使它像'value:@ Component1'或'value:= Component1' – varit05