官术网_书友最值得收藏!

Finalizing CoreModule

We can now modify our CoreModule to use what we have created. We will take this opportunity to also import the NativeScriptModule which our app will need to work with other NativeScript for Angular features which we will want accessible globally for our app. Since we know we will want those features, globally, we can also specify that they are exported so when we import and use our CoreModule, we won't need to worry about importing NativeScriptModule elsewhere. Here's what our CoreModule modifications should look like:

// nativescript
import { NativeScriptModule } from 'nativescript-angular/nativescript.module';
// angular
import { NgModule } from '@angular/core';
// app
import { PROVIDERS } from './services';
@NgModule({
imports: [
NativeScriptModule
],
providers: [
...PROVIDERS
],
exports: [
NativeScriptModule
]
})
export class CoreModule { }

We now have a good starting base for our CoreModule, the details of which we will implement in the following chapters.

主站蜘蛛池模板: 山西省| 怀远县| 九龙县| 江津市| 巩义市| 蒲江县| 焉耆| 全南县| 包头市| 密山市| 澄江县| 梨树县| 罗山县| 久治县| 准格尔旗| 绥阳县| 康保县| 突泉县| 永嘉县| 通榆县| 集安市| 米泉市| 武山县| 玉林市| 宜黄县| 彰武县| 军事| 阿坝| 雅安市| 井冈山市| 土默特左旗| 锡林郭勒盟| 昭苏县| 许昌市| 永春县| 花莲市| 通城县| 浑源县| 汤原县| 枣庄市| 察哈|