Javascript Angular 2:异常:app.component.html:1:108中的错误由:太多递归引起

Javascript Angular 2:异常:app.component.html:1:108中的错误由:太多递归引起,javascript,angularjs,html,recursion,Javascript,Angularjs,Html,Recursion,我已经下载了Angular 2 quickstart,在完成所有设置后,它运行良好。我安装了一个express服务器并连接到该服务器,应用程序继续正常工作。我对使用组件templateUrl而不是template属性做了一个更改,它停止了工作。我创造了一个劫掠者, 为了证明这一点。下面是我在属性之间切换的AppComponent代码 import { Component } from '@angular/core'; @Component({ selector: 'pm-app', t

我已经下载了Angular 2 quickstart,在完成所有设置后,它运行良好。我安装了一个express服务器并连接到该服务器,应用程序继续正常工作。我对使用组件templateUrl而不是template属性做了一个更改,它停止了工作。我创造了一个劫掠者, 为了证明这一点。下面是我在属性之间切换的AppComponent代码

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

@Component({
  selector: 'pm-app',
  templateUrl: './app.component.html'
  //template: `<h1>Hello {{name}}</h1>`
})
export class AppComponent  {
  name: string;
  constructor(){
    this.name  = 'FasterLearnerII';
    console.log("App Component Called");
}}
从'@angular/core'导入{Component};
@组成部分({
选择器:“pm应用程序”,
templateUrl:“./app.component.html”
//模板:`Hello{{name}}`
})
导出类AppComponent{
名称:字符串;
构造函数(){
this.name='FasterLearnerII';
log(“调用的应用程序组件”);
}}
如果AppComponent使用template属性,但在切换到templateUrl时停止工作,则Plunk也可以正常工作。我找不到plunker的错误消息,但当我在浏览器中运行时,得到的消息是:

异常:app.component.html:1:108中出现错误,原因是:递归core.umd.js:3064:13过多 原始异常:递归core.umd.js:3066:17太多 原始STACKTRACE:core.umd.js:3069:17
GetErrorProperties for Prototype/您必须放置完整路径, 这会有用的:

@Component({
  selector: 'pm-app',
  templateUrl: 'app/app.component.html'
  //template: `<h1>Hello {{name}}</h1>`
})
@组件({
选择器:“pm应用程序”,
templateUrl:'app/app.component.html'
//模板:`Hello{{name}}`
})

谢谢,我想我已经试过了,但显然我一定打错了。