らいふうっどの閑話休題

興味のあることをゆる~く書いていく

Angular CLI memo

Angular CLI memo

スタイルが scss で作成しているプロジェクトで、後からコンポーネントを作成する際に気付いたので、改めてメモ
Since I noticed it when I created the component later in the project whose style is scss, I made a note again.

$ ~/wok/app-sample/src/app ng g c something
CREATE src/app/something/something.component.html (24 bytes)
CREATE src/app/something/something.component.spec.ts (649 bytes)
CREATE src/app/something/something.component.ts (287 bytes)
CREATE src/app/something/something.component.css (0 bytes) <== css で作成
UPDATE src/app/app.module.ts (408 bytes)

新規作成のコンポーネントcss で作成される
scss で、作成したい場合は下記の通り
Newly created component created with css
If you want to create it with scss

$ ~/wok/app-sample/src/app ng g c something --style=scss
CREATE src/app/something/something.component.html (24 bytes)
CREATE src/app/something/something.component.spec.ts (649 bytes)
CREATE src/app/something/something.component.ts (288 bytes)
CREATE src/app/something/something.component.scss (0 bytes) <== scss で作成
UPDATE src/app/app.module.ts (425 bytes)

プロジェクト作成時にスタイルを指定するのと同じ。
Same as specifying a style when creating a project.

angular.io