April 2017
Beginner to intermediate
378 pages
7h 57m
English
The Component decorator marks a class as an Angular component and collects component configuration metadata. A simple component decorator would look like this:
import { Component } from '@angular/core'; import { Platform } from 'ionic-angular'; import { StatusBar, Splashscreen } from 'ionic-native'; import { HomePage } from '../pages/home/home'; @Component({ templateUrl: 'app.html' }) export class MyApp { rootPage = HomePage; constructor(platform: Platform) { platform.ready().then(() => { StatusBar.styleDefault(); Splashscreen.hide(); }); } }
Components have all the Ionic and Angular core components and directives included, so we need not explicitly declare the directive property. Only the dependent properties ...
Read now
Unlock full access