【发布时间】:2016-08-26 14:45:31
【问题描述】:
我正在使用打字稿开发angular2(rc-5) 应用程序。我刚刚制作了一个加载器组件,它只需要在 typescript 类函数中使用 jquery 打开模式。但是找不到$和模态函数?
import { Component, Input } from '@angular/core';
@Component({
moduleId: module.id,
selector: 'app-loader',
templateUrl: 'loader.component.html',
styleUrls: ['loader.component.css']
})
export class LoaderComponent {
constructor() { }
@Input() message = "finally inside child scope.";
showLoader(){
$("#loaderModal").modal('show'); // error on this line
}
}
错误报告: 错误:-“ElementFinder”类型上不存在属性“modal”。
感谢您的帮助。
【问题讨论】:
标签: angular typescript bootstrap-modal