I'm having trouble getting this code to work, can't figure out why the button isn't displaying :(
Any suggestions? Appreciate it.
https://jsfiddle.net/slishnevsky/Let38jho/10/
Angular/Typescript
let app = angular.module('app', []);
export class MyController {
public name: string;
constructor() {}
}
export class MyComponent implements ng.IComponentOptions {
public bindings: any;
public controller: any;
public controllerAs: string;
public template: string;
constructor() {
this.bindings = {
name: '@'
};
this.controller = MyController;
this.controllerAs = 'vm';
this.template = '<button>{{vm.name}}</button>';
}
}
app.component('MyComponent', new MyComponent());
HTML
<div ng-app='app'>
<my-component name='Miranda'></my-component>
</div>