6. Building a Mobile Photo Geotagging Application Using Capacitor and 3D Maps
7. Building an SSR Application for GitHub Portfolio Using Angular
6章と7章前半までを読んで写経して不明点をまとめた
Angular
・httpリクエスト
1 | return this .http.get<User>(${ this .apiUrl}/users/${ this .username}) |
・@Input
コンポーネント間の引き渡しに使う
https://qiita.com/masaks/items/677195b78379e0877e24
・ng-content
コンポーネントにタグを入れ流時に使う
https://qiita.com/ukyo/items/0e44f5f562335fd6601b
・データバインディング
https://angular.jp/guide/binding-syntax
1 2 3 4 5 6 | // data->viewは[] <input [disabled]= "condition ? true : false" > // eventは()でbindingする <button type= "button" (click)= "onSave()" >Save</button> // event+data->viewの2way <input [(ngModel)]= "name" > |
HTML/css
・rel=noopener
> ターゲットリソースへ移動する際、開いた元の文書へのアクセスを新しい閲覧コンテキストに許可しないことをブラウザーに指示します。
https://developer.mozilla.org/ja/docs/Web/HTML/Attributes/rel/
・iタグ
> フォント(文字)をイタリック体にするためのタグ
https://html-coding.co.jp/annex/dictionary/html/i/
・bootstrap
設定方法が違う
1 2 3 4 | // @import "bootstrap/scss/bootstrap" ; // @import "bootstrap-icons/font/bootstrap-icons" ; @import "bootstrap" ; @import "bootstrap-icons" ; |
エラー
・Ioniconsのアイコンがでない
Angular17だとアイコンが出ない。
importしてaddIconsを叩く必要がある
https://stackoverflow.com/questions/77878703/issue-with-ionicons-not-displaying-in-ionic-angular-standalone-components
1 2 3 4 5 6 | import { chevronBack } from 'ionicons/icons' import { addIcons } from 'ionicons' constructor() { addIcons({ chevronBack }) } |
・Error: NG0302: The pipe ‘async’ could not be found in the
CommonModuleを入れる
https://stackoverflow.com/questions/39625321/the-pipe-async-could-not-be-found
1 | import { CommonModule } from '@angular/common' ; |
関連記事:
- Angular Projectsの3章を読んで不明点をまとめた
- twitter-bootstrap-railsからbootstrapに移行した
- Angular Projectsの9章の不明点をまとめた