【发布时间】:2017-01-27 15:00:06
【问题描述】:
这几天我一直在努力解决这个问题,我希望有人可以帮助我。
我正在一个 aspnet 核心项目中试用 Angular2。设置是我使用 gulpfile.js 来构建 .ts 文件并将所有内容传输到 wwwroot 文件夹。一切正常。打字稿编译,文件被传输,甚至设置一个“hello world”角度应用程序工作正常..
当我尝试添加对 ng2-bootstrap 的引用时,问题就开始了。当我添加这个编译打字稿时,会出现几个错误,例如:
node_modules/ng2-bootstrap/components/buttons/button-checkbox.directive.d.ts(14,22): error TS1005: '=' expected.
请在此处访问我正在处理的示例:https://github.com/skyplusplus/ng2bootstrap-hell
我该如何解决这个问题?
-编辑- 相关 gulpfile sn -p:
const tscConfig = require('./tsconfig.json');
var tsProject = typescript.createProject('tsconfig.json');
return tsProject
.src(tscConfig.files)
.pipe(sourcemaps.init())
.pipe(typescript(tsProject))
.pipe(sourcemaps.write('.'))
.pipe(gulp.dest(targetPaths.app));
【问题讨论】:
标签: angular typescript visual-studio-2015 asp.net-core ng2-bootstrap