typescriptのclass参照でエラーになります。
解決方法を教えてください。
以下のスライド20まで作業を行っています。
https://www.slideshare.net/slideshow/embed_code/key/sqJvihresqQt7F
npm
1ERROR in [default] c:/pleiades/workspace/angular2-webpack-starter/angular2-webpack-starter-minimum/src/components/app.component.t 2s:6:14 3Cannot find name 'AlertButtonComponent'. 4Child html-webpack-plugin for "index.html": 5 chunk {0} index.html 285 bytes [rendered] 6 [0] ./~/html-webpack-plugin/lib/loader.js!./src/index.html 285 bytes {0} [built] 7webpack: bundle is now VALID. 8
angular2
1import {Component} from 'angular2/core'; 2 3@Component({ 4 selector: 'my-app', 5 templateUrl: '/src/components/app.component.html', 6 directives:[AlertButtonComponent] 7}) 8export class AppComponent { 9} 10
angular2
1import {Component} from 'angular2/core'; 2 3@Component({ 4 selector: 'my-alert-button', 5 templateUrl: '/src/components/alert-button.component.html' 6}) 7export class AlertButtonComponent { 8 onClick():void{ 9 window.alert('Hello!'); 10 } 11} 12
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。