Currently, I am utilizing webpack alongside Babel and Typescript
Presently, the controller in question is as follows:
// HelloWorldController.ts
class HelloWorldController implements ng.IComponentController {
constructor(private $scope: ng.IScope) {
}
public over(): void {
this.$scope.color = this.change();
}
}
Accompanied by its corresponding component options
export class HelloWorldComponent implements ng.IComponentOptions {
public bindings: {[binding: string]: string};
public controller: Function;
public templateUrl: string;
public constructor() {
this.bindings = {
color: '=',
change: "&"
};
this.controller = HelloWorldController;
this.templateUrl = "HelloWorld.html";
}
}
app.component('helloWorld', new HelloWorldComponent());
Upon transpiling this code, an error emerged:
error TS2339: Property 'change' does not exist on type 'HelloWorldController'
I am curious about how to access the bindings reference within a controller using Typescript