using ControllerAs in an angular 1.5 component
问题 I am attempting to use the controllerAs Syntax in an angularjs 1.5 component. here is a plunker https://plnkr.co/edit/mTa1bvoNi1Qew9l1xAFS?p=preview without the controllerAs everything works fine. (function() { angular.module("myApp", []) .component("helloWorld", { template: "Hello {{$ctrl.name}}, I'm {{$ctrl.myName}}!", bindings: { name: '@' }, controller: helloWorldController }) function helloWorldController() { /* jshint validthis: true */ var vm = this; vm.myName = 'Alain' } })(); however