Javascript 在HTML中添加ngModule在Angular 2中出现错误

Javascript 在HTML中添加ngModule在Angular 2中出现错误,javascript,jquery,angular,Javascript,Jquery,Angular,我正在从事Angular 2项目。在启动时一切都很好,但当在HTML中为数据绑定添加ngModule时,它给了我一个错误,页面没有加载 Unhandled Promise rejection: Cannot set property 'stack' of undefined ; Zone: <root> ; Task: Promise.then ; Value: TypeError: Cannot set property 'stack' of undefined at Syntax

我正在从事Angular 2项目。在启动时一切都很好,但当在HTML中为数据绑定添加ngModule时,它给了我一个错误,页面没有加载

Unhandled Promise rejection: Cannot set property 'stack' of undefined ; Zone: <root> ; Task: Promise.then ; Value: TypeError: Cannot set property 'stack' of undefined
at SyntaxError.set [as stack] (http://localhost:3000/node_modules/@angular/compiler/bundles/compiler.umd.js:1628:63)
at assignAll (http://localhost:3000/node_modules/zone.js/dist/zone.js:704:29)
at SyntaxError.ZoneAwareError 
app.component.ts

import { Component } from '@angular/core';

@Component({
  selector: 'my-app',
  template: `<login-selector></login-selector>`,
})
export class AppComponent  { name = 'Angular'; }

升级到
0.7.6
或降级到
0.7.4
zonejs库,以查看您使用哪个捆绑包的真正错误?可能
templateUrl
是指向html文件的不正确路径。谢谢,让我试试……这是一个路径错误。。谢谢
import { Component } from '@angular/core';

@Component({
  selector: 'my-app',
  template: `<login-selector></login-selector>`,
})
export class AppComponent  { name = 'Angular'; }
import { Component } from '@angular/core';

@Component({
  selector: 'login-selector',
  templateUrl: 'app/components/login/login.component.html',
})
export class LoginComponent  { 
    name = 'Angular'; 

    constructor(){

    }

    login(){
        console.log("Login");
    }

    reset(){
        console.log("reset");   
    }

    refreshCaptcha(){
        console.log("refreshcaptcha");  
    }

    getCaptcha(){
        console.log("getCaptcha");  
    }

    //this.getCaptcha();
    forgetPassword(){
        console.log("forgetPassword");      
    }
}