I am in the process of upgrading a large AngularJS 1.4 app to 1.5 using components instead of raw controllers.
I have a basic component looking like this:
'use strict';
angular.module('myModule').component('userComponent', {
controllerAs: 'vm',
bindings: {
user: '<'
},
controller:
function userComponent($http) {
let vm = this;
vm.user = "World";
});
When I try to display the value of vm.user in the template, it does not show and there is no error in the console:
<user-component>
<h1>Hello {{vm.user}}</h1>
</user-component>
Can you tell me what is wrong? This should be fairly simple and I am not sure why it is not doing the binding as expected.