简体   繁体   English

找不到模块'./.../x.html' - TsLint / Angular-Meteor

[英]Cannot find module './…/x.html' - TsLint / Angular-Meteor

I've got a problem with the TsLint of my angular-meteor project. 我的角度流星项目的TsLint遇到了问题。

I am currently following the tutorial at http://www.angular-meteor.com/tutorials/socially/angular2/routing-and-multiple-views . 我目前正在http://www.angular-meteor.com/tutorials/socially/angular2/routing-and-multiple-views上学习本教程。 Whenever I try to import a template-html file inline, I get an error that the module does not exist. 每当我尝试内联导入template-html文件时,我都会收到模块不存在的错误。 The code however works perfectly when I compile and run it. 但是,当我编译并运行它时,代码可以正常工作。

How can I modify my tslint-compiler so it understands these modules and so it stops spamming we with these 'errors'. 我如何修改我的tslint编译器,以便它理解这些模块,因此它可以阻止我们发送这些“错误”。 I use Visual Studio Code as a source code editor. 我使用Visual Studio Code作为源代码编辑器。

Here you can find what the errors look like. 在这里,您可以找到错误的样子。 Thanks! 谢谢!

在此输入图像描述

I think it should work without extension (at least in Ionic 2 which is built upon Angular 2) 我认为它应该没有扩展(至少在基于Angular 2的Ionic 2中)

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

This is using Netbeans 8.2 dev edition + nbts https://github.com/Everlaw/nbts/releases 这是使用Netbeans 8.2 dev版+ nbts https://github.com/Everlaw/nbts/releases

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM