[Angular] Ionic Hightlights

1. Margin & Padding element

https://ionicframework.com/docs/v3/theming/css-utilities/#element-margin

2. Align element

2.1. Align Text

https://ionicframework.com/docs/v3/theming/css-utilities/#text-alignment

1. Center div content: ion-justify-content-center
2. Center text content: ion-text-center 

2.2 Ionic color generate tool

https://ionicframework.com/docs/theming/color-generator

Q&A

  1. file page.modules.ts để làm gì?
  2. hệ thống routing trong angular & ionic?
  3. loadChildren trong routing.module.ts có ý nghĩa gì?

3. Create Page

ionic g page pages/test

4. Using router in .ts file

import { Router } from "@angular/router";
this.router.navigateByUrl(url);    

5. Create and using Component

<!-- hello.component.html -->
<p>Hello component</p>

<!-- parent.module.ts -->
@NgModule({
  imports: [
    .....
  ],
  declarations: [HelloComponent],
})
export class ParentModule{}

6. CSS Style Search bar

ion-searchbar{
        --background: white !important;
        --border-radius: 5px;
    }

F G+ T

tuandph

Khởi đầu với .NET từ năm 2013 đến nay. Hiện tại mình đang làm full-stack developer. Yêu thích lập trình & chia sẽ kiến thức. Thời gian rảnh thường làm những tool vui vui và viết lách kể lệ sự đời.