AngularJS初心者です。
というより、いまから導入しようとしている会社で、
angularJSの調査をしていますので、ほぼなにもわからない状態です。
ので、エラーの対応方法など、さっぱりわからず、ここ3日ほどはまっております。。。
■開発環境の作成
1.Gitインストール
2.node.jsインストール
3.コマンドプロンプトにて、開発ディレクトリとyo grunt bower angular-fullstackの準備
cd c:
mkdir sample
cd sample
npm install -g yo grunt-cli gulp-cli bower generator-angular-fullstack
4.angular-fullstackのジェネレート
yo angular-fullstack
5.grunt起動
grunt test
grunt serve
→ここまでで、ブラウザが立ち上がり、Yeomanのangular-fullstackのindex.htmlが表示される
■サブジェネレータを利用して、新規routeを作成する
1.コマンドプロンプトにて、サブジェネレータを利用してrouteを作成
■grunt起動
1.grunt testを実行すると、エラーが出力される
PhantomJS 2.1.1 (Windows 7 0.0.0): Executed 2 of 2 (1 FAILED) (0.05 secs / 0.061
secs)
TOTAL: 1 FAILED, 1 SUCCESS
- should ...
Component: ComponentsComponent
Error: [$injector:unpr] Unknown provider: ComponentsComponentDirectiveProvider <- ComponentsComponentDirective
■エラー内容の予測
yo angular-fullstack:route componentsを実行して作成されたrouteに対して、
controllerが作成されてないのでは。。。と思うのですが。。。
あなたの回答
tips
プレビュー