📜  angularjs 组件 stackoverflow - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:09.380000             🧑  作者: Mango

代码示例1
angular.module('myApp')
    .component('component', {
        templateUrl: 'component.html',
        controller: function ComponentCtrl(){
            this.innerProp = "inner";  //Tied to controller scope
        },
        controllerAs: 'vm',   // Replaces scope, by default components use `$ctrl`
        bindings: {
           input: '=?'
        }
});