Launch sale! Get 30% OFF expires in 126:46:21

Existing member? Log in and continue learning

See if you like it, start the course for free!

Unlock full course by purchasing a membership
Adding Some Simple Styling
Adding Some Simple Styling
Our application does everything it is supposed to do now for this simple example, but we have put no thought into the style or design and it looks terrible. We aren’t going to go all out here, but a few simple tweaks are going to make this application look a whole lot better.
We are primarily going to do two things:
- Make more use of Ionic’s components
- Add in a few minor style tweaks
<ion-header> <ion-toolbar color="primary"> <ion-title>Todo</ion-title> </ion-toolbar> </ion-header>
@Component({ selector: 'app-todo-form', template: ` <form [formGroup]="todoForm" (ngSubmit)="todoSubmitted.emit(todoForm.getRawValue())" > <ion-card> <ion-card-title> <ion-input type="text" formControlName="title" placeholder="title..." ></ion-input> </ion-card-title> <ion-card-content> <ion-input type="text" formControlName="description" placeholder="description..." ></ion-input> <ion-button [disabled]="!todoForm.valid" type="submit"> Add Todo </ion-button> </ion-card-content> </ion-card> </form> `, styles: [ ` ion-card-title { padding-left: 20px; }
ion-card-content { padding-top: 0; } `, ], imports: [ ReactiveFormsModule, IonInput, IonButton, IonCard, IonCardTitle, IonCardContent, ],})
Thanks for checking out the preview of this lesson!
You do not have the appropriate membership to view the full lesson. If you would like full access to this module you can view membership options (or log in if you are already have an appropriate membership).