angular.js - AngularJs Component() not executing
天蓬老师
天蓬老师 2017-05-15 17:11:23
0
1
472
The

project is developed based on the AngularJs 1.5.8 version.
Encountered a problem when using component(): component not executing.

My code is as follows:

define(['angular','app'],function (angular,app) {
    var departmentSelector = {
        bindings: {
            option: '='
        },
        templateUrl: 'dist/component/department-selector/index.html',
        controller: DepartmentSelectorController,
        controllerAs: 'vm'
    };

    app.component('departmentSelector', departmentSelector);

    DepartmentSelectorController.$inject  = ['$filter'];
    function DepartmentSelectorController($filter) {
        console.log("执行 组件 departmentSelector 成功");
    }
});
天蓬老师
天蓬老师

欢迎选择我的课程,让我们一起见证您的进步~~

reply all(1)
阿神

I also encountered the same problem, I don’t know if you solved it. Initially, the first request was executed, but after refreshing, the component failed and the view was not displayed

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template