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

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.

主站蜘蛛池模板: 兴和县| 通化市| 郧西县| 阿图什市| 固原市| 通道| 博客| 石林| 巴林左旗| 湘潭市| 南京市| 斗六市| 红安县| 太仓市| 买车| 浦城县| 曲阜市| 饶河县| 子洲县| 同德县| 田阳县| 祥云县| 黔西| 吴堡县| 图们市| 盐津县| 怀远县| 安新县| 左云县| 合江县| 鄂尔多斯市| 名山县| 大姚县| 岫岩| 当涂县| 柘荣县| 安阳市| 平湖市| 新昌县| 宁明县| 老河口市|