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

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.

主站蜘蛛池模板: 渝中区| 黔西县| 通州市| 栾川县| 固始县| 静乐县| 灌阳县| 同江市| 嘉禾县| 绥中县| 孟津县| 永靖县| 武冈市| 集安市| 鹤山市| 遂溪县| 措美县| 乌兰浩特市| 宜宾县| 手游| 托里县| 赤城县| 青冈县| 永吉县| 兰西县| 乌什县| 甘谷县| 昆明市| 兴安县| 东阳市| 西吉县| 湘阴县| 襄城县| 阿拉善右旗| 尼勒克县| 黔西县| 靖安县| 芜湖市| 卓资县| 沽源县| 和平县|