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(with ng-zorro)に入門する【環境構築編】

Posted at

今日から僕もフロントエンドエンジニアです。

angularのプロジェクト作成

$ git clone ほげほげ
$ cd ほげほげ/

または

$ mkdir angular-example
$ cd angular-example/

リモートから引っ張ってきたものであったり新規作成したディレクトリで、まっさらな状態を想定して書いてます。

https://angular.io/guide/setup-local
によるとnodeのバージョンは 10.9.0 or later とのこと。(2019/10/18 現在)

$ node -v
v10.16.1

ヨシ!

$ npx @angular/cli new app --directory=. --style=styl --skipGit=true --routing=true --commit=false

https://angular.io/cli/new
newコマンドのオプション

styleはstylusにしたけど、ナウいっぽい以外の選定理由がない。

初期化時点で @angular/cli もパッケージに含まれているため、以降でngコマンドを利用するときは npx ng ほげほげ でローカルにインストールされたcliを使う。

ng-zorroの導入

$ npx ng add ng-zorro-antd
? Add icon assets [ Detail: https://ng.ant.design/components/icon/en ] No
? Set up custom theme file [ Detail: https://ng.ant.design/docs/customize-theme/en ] No
? Choose your locale code: ja_JP
? Choose template to create project: blank

動作確認

$ npx ng serve --open

今回はここまで!解散!

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?