2017-03-23 45 views
0

对不起,但我不明白为什么我的括号告诉我,我的angular2项目中找不到这些模块。这是我app.module.ts文件:Angular2中的组件

import { NgModule } from '@angular/core'; 
 
import { BrowserModule } from '@angular/platform-browser'; 
 
import { AppComponent } from './app.component'; 
 

 
@NgModule({ 
 
\t imports: [ BrowserModule ], 
 
\t declarations: [ AppComponent ], 
 
\t bootstrap: [ AppComponent ] 
 
}) 
 

 

 
export class AppModule { }

和托架说:

https://i.stack.imgur.com/hBY8P.png

不过最搞笑的是,我开始这个项目的一个一周前,都是完美的,但今天括号告诉我,找不到几个模块..

所以我决定再重新启动我的项目,我尝试按照此页面(NgModules Documentation),但是在第二步括号告诉我,找不到模块...

任何人都可以帮我吗?任何人都知道为什么?

+0

如果你正在跟着tutorial/examples的'@ angular/core';',你就错过了'@'符号。下一行也是如此。 – Igor

+0

是的,我试着用@!但是,方括号找不到任何模块 – AAg

+0

您的回购中是否有'node_modules'文件夹? – mickdev

回答

0

删除node_module文件夹,然后运行

npm install 

要重新安装所有的软件包。

+0

你认为这会解决什么问题? –

+0

对不起,但这不能解决我的问题... – AAg