2
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 入門ノート

Last updated at Posted at 2017-11-14

CLI

1. 新しいプロジェクトを生成:

ng new PROJECT-NAME

2.Run local server:

ng serve

ポートを指定したい場合:

ng serve --host 0.0.0.0 --port 4201

3.新しいコンポネントを生成:

ng g c COMPONENT-NAME
//Other: ng generate directive|pipe|service|class|guard|interface|enum|module

デフォルトで spec ファイルの追加を無効

ng set defaults.class.spec=false
ng set defaults.component.spec=false

Binding

Interpolation

<h2>{{ title }}</h2>

Property Binding

<image [src]="imageUrl" />

Attribute Binding

<td [attr.colspan]="colspan"></td>

Class Binding

<button class="btn btn-primary" [class.active]="isActive"></button>
2
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
2
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?