1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

angular-cliでangular2 TOUR OF HEROESチュートリアルでつまずいた点

Posted at

angular-cliを使って、angular2のチュートリアルでちょっとはまった。
コンポーネントにmoduleIdという記述があり、エラーメッセージからすぐに解決できなかったので備忘録。

app/dashboard.component.ts
@Component({
  moduleId: module.id,  //←この記述
  selector: 'my-dashboard',
  templateUrl: 'dashboard.component.html',
})

結論

moduleIdの記述はwebpackを利用している時は書かなくていいらしい。
(angular-cliは内部でwebpackを利用している)
stackoverflow

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?