私は、typescriptとangularを使用して$ uibModalを使用してモーダルを表示しようとしています。は、タイプスクリプトでuibmodalを実行できません
export class PDPController{
static $inject = ['pdpService', '$sce', 'angularLoad', '$uibModalInstance'];
constructor(
pdpService: PDPService,
$sce : ng.ISCEService,
angularLoad,
//initiating in constructor
private $uibModalInstance:ng.ui.bootstrap.IModalServiceInstance
) {
this.pdpService=pdpService;
//Need to add promise
pdpService.getContentdata(APP_CONSTANT.API_URL_LEARN_MORE)
.then((authorContentData) => {
this.contentData= authorContentData;
pdpService.getPDPdata(APP_CONSTANT.API_URL_LEARN_MORE)
.then((pdpData) => {
console.log(pdpData);
this.setProductDetails(pdpData);
});
});
}
//method to invoke the modal
private showPromo(): void{
console.log("Promo");
var modalInstance = this.$uibModal.open({
animation: "true",
templateUrl: 'promoModalContent.html',
appendTo: 'body'
});
}
}
//module:
let module: ng.IModule = angular.module(pdpModule, ['ui.bootstrap']);
私はがぶ飲みビルドを実行したときに、私は、このエラーに直面しています:
Unknown provider: $uibModalInstanceProvider <- $uibModalInstance
Module 'angular.ui' has no exported member 'bootstrap'.
私は、コードを実行したときに
$ uibModalが認識されない: エラー:プロパティ「$ uibModalは」タイプに存在しません。 'PDPController'。
私はTypescriptを完全に使いこなしており、ここでの解決方法を理解することはできません。 ご案内ください。
試してみてください...うまくいきません! この特定のエラーを解決する方法を教えてください - > モジュール 'angular.ui'にはエクスポートされたメンバー 'bootstrap'がありません。 – Aashish