1
私は1.5の角度でTypescriptを使用しています。変数にコンポーネントをバインディングに渡す際に問題が発生しています。Typescriptの角度1.5のコンポーネントがバインディング変数文字列を渡していません
関連するコードは次のとおりです。関連していないコードの大半を取り除きました。
module xyz.dashboard {
class PatientPhaseCountController {
public static $inject = [];
public title: string;
public chartType: string;
///// /* @ngInject */
constructor() {
this.title = 'Patient Phase Count';
console.log(this.chartType);
this.$onInit();
}
public $onInit(): void {
console.log(this);
};
}
class PatientPhaseCount implements ng.IComponentOptions {
public bindings: any;
public controller: any;
public templateUrl: string;
constructor() {
this.bindings = {
chartType: '@'
};
this.controller = PatientPhaseCountController;
this.templateUrl = 'app/dashboard/patientPhaseCount/patientPhaseCount.component.html';
}
}
}
、ここでHTMLスニペットです:
ChartTypeを、常に定義されていません。どんな助けもありがとうございます。