0
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.

Angular2 + Angular Materialでプロジェクト作成する

Last updated at Posted at 2018-02-16

Angular CLIのインストール

$ npm install -g angular-cli

#プロジェクトの作成

$ ng new my-project
$ cd my-project

Angular Materialのインストール

$ npm install --save @angular/material

なお公式ドキュメントはここ→https://material.angular.io/guides

スタイリングのデフォルトをSCSSに変更

$ ng set default.styleExt scss

これをやると.angular-cli.jsonのdefaultsに"styleExt": "scss",が追記される。

.angular-cli.json
  "defaults": {
    "styleExt": "scss",
    "component": {
    }

参考までにメモ

プロジェクトを新規作成するときに指定することも可能。

$ ng new my-project --style=sass`

SCSSシンタックスでプロジェクトを新規作成したい場合は以下。

$ ng new my-project --style=scss

以上です。

0
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
0
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?