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

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.

主站蜘蛛池模板: 华安县| 十堰市| 根河市| 莱州市| 灌云县| 贵德县| 丰宁| 晋中市| 鸡泽县| 云浮市| 阿尔山市| 景德镇市| 简阳市| 肇源县| 轮台县| 揭西县| 浠水县| 如皋市| 景宁| 镇雄县| 嘉荫县| 保定市| 岑溪市| 平阳县| 墨脱县| 宝坻区| 蓬溪县| 诏安县| 弥渡县| 永川市| 营山县| 宁蒗| 崇州市| 泗洪县| 卫辉市| 四会市| 剑河县| 武川县| 禹城市| 吴旗县| 博罗县|