angular-cli

イシュー

  • angular2 の cliを試してみる

参考

ng get / ng set  .angular-cli.jsonに記述された設定の表示/更新
ng doc  AngularのAPIドキュメントを表示
ng eject    Angular CLIなしでビルドできるように、webpackの設定を出力
ng xi18n    国際化メッセージをテンプレートから抽出
ng update   プロジェクトで利用しているライブラリーを最新に更新

トラブルシューティング

  • The Broccoli Plugin: [BroccoliTypeScriptCompiler] failed with:

    Error: EPERM: operation not permitted, symlink 'C:\Users\magnet88jp\Workspace\ang2\my-dream-app\tmp\broccoli_type_script_compiler-cache_path-DyQfLcF3.tmp\src\app\environment.js.map' -> 'C:\Users\magnet88jp\Workspace\ang2\my-dream-app\tmp\broccoli_type_script_compiler-output_path-73Dwy2Cy.tmp\src\app\environment.js.map

  • Windows環境で実行するには、管理者権限での実行が必要

参考

起動画面

f:id:magnet88jp:20160525090603p:plain

コンポーネント生成

$ ng g component new-cmp
installing component
  create src\app\new-cmp\new-cmp.component.css
  create src\app\new-cmp\new-cmp.component.html
  create src\app\new-cmp\new-cmp.component.spec.ts
  create src\app\new-cmp\new-cmp.component.ts
  create src\app\new-cmp\index.ts
  create src\app\new-cmp\shared\index.ts

magnet88jp@PCR418 MINGW32 ~/Workspace/ang2/my-dream-app (master)
$

タイトル変更

  • my-dream-app/src/app/shared/my-dream-app.component.ts を修正

  • bef

export class MyDreamAppAppComponent {
  title = 'my-dream-app works!';
}
  • aft
export class MyDreamAppAppComponent {
  title = 'Hello my-dream-app works!';
}

Angular CLI関連の記事リンク

TODO

Angular Material

トラブルシューティング

Cannot read file tsconfig.json