角度/核心的组件装饰器处理什么所有动作

时间:2019-07-10 19:29:20

标签: angular ionic-framework

Angular核心中的组件装饰器处理的所有事情。实际上,此装饰器是如何在@ angular / core中实现的。我对angular,ionic和mobile开发是陌生的。请给我一个很好的参考阅读。

    import { Component } from '@angular/core';

    import { Platform } from '@ionic/angular';
    import { SplashScreen } from '@ionic-native/splash-screen/ngx';
    import { StatusBar } from '@ionic-native/status-bar/ngx';

    @Component({
      selector: 'app-root',
      templateUrl: 'app.component.html'
    })

export class AppComponent {
  constructor(
    private platform: Platform,
    private splashScreen: SplashScreen,
    private statusBar: StatusBar
  ) {
    this.initializeApp();
  }

  initializeApp() {
    this.platform.ready().then(() => {
      this.statusBar.styleDefault();
      this.splashScreen.hide();
    });
  }
}

0 个答案:

没有答案