【发布时间】:2017-05-20 04:38:35
【问题描述】:
我正在使用 Angular 1.4.9 和 TypeScript 开发自定义指令。该指令已完成,但我正在尝试将其导入我的 app.ts,以便我可以注册它。这就是我卡住的地方。
我的指令看起来像这样
export module Helloworld{
export class NumpadTouchControl implements ng.IDirective{
}
}
我的 app.ts 是这样的
import { NumpadTouchControl } from './directives/numpadTouchControl';
module Helloworld {
}
在我的 app.ts 的第一行它说:Module ... has no exported member 'NumpadTouchControl'。我怎样才能使我的导入工作?
我没有使用 webpack 或 browserify。
【问题讨论】:
标签: angularjs typescript