2016-07-29 48 views
4

我的角流星項目的TsLint有問題。找不到模塊'./..../x.html' - TsLint/Angular-Meteor

我目前正在按照教程http://www.angular-meteor.com/tutorials/socially/angular2/routing-and-multiple-views。每當我嘗試導入一個模板html文件內聯,我得到一個錯誤,該模塊不存在。但是,編譯和運行代碼時,代碼非常完美。

我該如何修改我的tslint編譯器,以便它理解這些模塊,因此它可以通過這些'錯誤'來阻止垃圾郵件。我使用Visual Studio Code作爲源代碼編輯器。

在這裏你可以找到錯誤的樣子。謝謝!

enter image description here

+0

也許您的tsconfig.json文件僅限於* .ts文件。 – jobou

+0

這裏是我的tsconfig { 「compilerOptions」:{ 「experimentalDecorators」:真實, 「模塊」: 「CommonJS的」, 「目標」: 「ES5」, 「isolatedModules」:假的, 「moduleResolution」:「節點」 「emitDecoratorMetadata」:真實, 「removeComments」:假的, 「noImplicitAny」:假的, 「sourceMap」:真 }, 「filesGlob」: 「客戶端/ **/* TS」 「server/**/*。ts」, 「typings/**/*。d.ts」 ], 「exclude」:[ 「node_modules」 ] } –

+0

您是否嘗試在filesGlob中添加'client/**/*。html'? – jobou

回答

0

我想應該沒有(這是在角2內置至少離子2)擴展

import template from './views/question-details';

這是使用NetBeans 8.2開發版+ nbts工作https://github.com/Everlaw/nbts/releases

+0

我和OP在同一條船上,這在我們的情況下不起作用。 – WillyC