ionic2一个需求模块的文件该是这样子的
1、组件文件夹的文件
除了index.ts 其他文件为各个页面组件文件
2、index.ts的代码如下
import {SecurityFinance} from "./security-finance";
import {SecurityApply} from "./security-apply";
import {SecurityDisclaimer} from "./security-disclaimer";
export const FINANCE = [
SecurityFinance,
SecurityApply,
SecurityDisclaimer
]
3.在APP.module.ts文件中引入(注意加粗,其他代码不在此展示)
import {CheckPage} from './../pages/startup/check';
import {FINANCE} from './../pages/security-finance/index';
import {TranslateModule, TranslateStaticLoader, TranslateLoader} from "ng2-translate";
import {Http} from '@angular/http';
export function createTranslateLoader(http: Http) {
return new TranslateStaticLoader(http, './assets/i18n', '.json');
}
@NgModule({
declarations: [
MyApp,
WIDGETS,
SecurityFinance,
FINANCE
],
imports: [
IonicModule.forRoot(MyApp, {}, {
links: [
}),
HttpInterceptorModule.withInterceptors([
{
deps: [Platform],
provide: HttpInterceptor,
useClass: AuthInterceptor,
multi: true
}
]),
TranslateModule.forRoot({
provide: TranslateLoader,
useFactory: (createTranslateLoader),
deps: [Http]
}),
ChartModule
],
bootstrap: [IonicApp],
entryComponents: [
FINANCE
],
providers: [SERVICE, Storage, {provide: ErrorHandler, useClass: IonicErrorHandler}]
})
export class AppModule {
}
ionic2一个需求模块的文件该是这样子的的更多相关文章
- 在Google Colab中导入一个本地模块或.py文件
模块与单个.py文件的区别,模块中含有__init__.py文件,其中函数调用使用的是相对路径,如果使用导入.py文件的方法在Google Colab中导入模块 会报错:Attempted relat ...
- Python win32com模块 合并文件夹内多个docx文件为一个docx
Python win32com模块 合并文件夹内多个docx文件为一个docx #!/usr/bin/env python # -*- coding: utf-8 -*- from win32com. ...
- python实践项目十:zipfile模块-将一个文件夹备份到一个 ZIP 文件
描述:将指定路径下的某文件夹备份到一个zip文件 代码: #!/usr/bin/python # -*- coding: UTF-8 -*- # backupToZip - Copies an ent ...
- s14 第5天 时间模块 随机模块 String模块 shutil模块(文件操作) 文件压缩(zipfile和tarfile)shelve模块 XML模块 ConfigParser配置文件操作模块 hashlib散列模块 Subprocess模块(调用shell) logging模块 正则表达式模块 r字符串和转译
时间模块 time datatime time.clock(2.7) time.process_time(3.3) 测量处理器运算时间,不包括sleep时间 time.altzone 返回与UTC时间 ...
- Python之requests模块-大文件分片上传
最近在做接口测试时,拿到一个分片上传文件的接口,http接口请求头中的Content-Type为multipart/form-data.需要在客户端将大文件分片成数据块后,依次传给服务端,由服务端还原 ...
- Python 工匠:一个关于模块的小故事
前言 模块(Module)是我们用来组织 Python 代码的基本单位.很多功能强大的复杂站点,都由成百上千个独立模块共同组成. 虽然模块有着不可替代的用处,但它有时也会给我们带来麻烦.比如,当你接手 ...
- HTTP 错误 500.21 - Internal Server Error 处理程序“PageHandlerFactory-Integrated”在其模块列表中有一个错误模块“ManagedPipelineHandler”
HTTP 错误 500.21 - Internal Server Error 处理程序“PageHandlerFactory-Integrated”在其模块列表中有一个错误模块“ManagedPipe ...
- Spring之LoadTimeWeaver——一个需求引发的思考---转
原文地址:http://www.myexception.cn/software-architecture-design/602651.html Spring之LoadTimeWeaver——一个需求引 ...
- 转: maven进阶:一个多模块项目
一个多模块项目通过一个父POM 引用一个或多个子模块来定义.父项目,通过以下配置,将子项目关联. <packaging>pom</packaging> <modules& ...
随机推荐
- (Review cs231n) ConvNet
概念 神经网络的深度和数据据体的深度(图像的通道数channels)要主要区分. 输入 1.得到一些数据,作为网络的输入. 2.在CNN中有filter,the size of filter is s ...
- 事件冒泡以及onmouseenter 和 onmouseover 的不同
1. onmouseenter onmouseenter 事件在鼠标指针移动到元素上时触发. 该事件通常与 onmouseleave 事件一同使用, 在鼠标指针移出元素上时触发. onmouseent ...
- Docker Registry V2 Garbage Collection
运行 docker run --rm -v /nfs1/docker/registry:/var/lib/registry registry:2.5.1 garbage-collect -d /roo ...
- 复习-css常用伪类别属性
css常用伪类别属性 对<a>标签可制动态效果的css a:link:超链接的普通样式 a:visited:被点击过的超链接样式 a:hover:鼠标指针经过超链接上时的样式 a:acti ...
- Shift键的三个妙用!Word又现神操作!
1.Shift+Alt+上下方向键 :调整段落顺序 同时按这三个键,能够调整段落的顺序,也可以用来调整表格中的行序. 2.Shift+F3:英文大写/小写/首字母大写,这三种模式切换 PS:如果中间夹 ...
- Flink Java Demo(Windows)
关于Flink相关的概念性东西就不说了,网上都有,官网也很详尽.本文主要记录一下Java使用Flink的简单例子. 首先,去官网下载Flink的zip包(链接就不提供了,你已经是个成熟的程序员了,该有 ...
- opencv学习之路(27)、轮廓查找与绘制(六)——外接圆、椭圆拟合、逼近多边形曲线、计算轮廓面积及长度、提取不规则轮廓
一.最小外接圆 #include "opencv2/opencv.hpp" #include<iostream> using namespace std; using ...
- [LspTrace]ReadAccConfig returns false! QT
当qt运行出现以下信息时 [LspTrace]ReadAccConfig returns false! [LspTrace]FindMatchingProvider: inInfo is one of ...
- python from entry to abandon2
学习Linux已经有大致两周了,依然感觉到自己仍然在运维的大门外徘徊.于是我想要找到一个在Linux之外的业余方向,可以以作为枯燥基础学习的调节.没过多久我就发现了Python可以说是钦定的选择,它作 ...
- 【Entity Framework】Model First Approach
EF中的model first 所谓mf, 就是使用vs提供的edm designer去设计model,然后将设计好的model使用vs在指定的数据库中生成数据库即可. 当你的项目既没有数据库也没有c ...