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& ...
随机推荐
- vue的一些感想
如今vue2.0是主流,但是它的路由确实直接从1.0过来的,其中包括组件包括全局组件和局部组件,写好组件之后,我们就需要 使用路由,将组件关联起来,关联起来之后,然后我们才可以将组件的内容通过hash ...
- Shell 常用技巧
Shell 常用技巧 echo $RANDOM | cksum | cut -c - openssl rand -base64 | cksum | cut -c - date +%N | cut -c ...
- zabbix/自动发现规则
对于zabbix 我们并不陌生 他是开源的监控系统,现在的一部分企业都在用zabbix,今天给大家分享的是企业级监控zabbix的自动发现规则,有了它我们自定义健康的时候根据宏值可以让他自动发现对 ...
- makefile中的patsubst函数有何作用?
答:这是个模式替换函数,格式为: $(patsubst <pattern>,<replacement>,<text>) 查找text中的单词,如果匹配pattern ...
- Python入门 更换pip源的方法
pip国内的一些镜像 阿里云 http://mirrors.aliyun.com/pypi/simple/ 中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple ...
- msvc命令行cl编译c程序问题及解决
1.cmd命令行cl提示没有这玩意儿 装上Visual Studio之类 2.cl main.c提示缺dll everything搜dll所在路径,在环境配置PATH增加对应bin.IDE 3.cl ...
- LINQ之路15:LINQ Operators之元素运算符、集合方法、量词方法
本篇继续LINQ Operators的介绍,包括元素运算符/Element Operators.集合方法/Aggregation.量词/Quantifiers Methods.元素运算符从一个sequ ...
- frame和bounds有什么不同?
frame指的是该view在父view坐标系统中的位置和大小.(参照物是他的父坐标系统). bounds指的是该view在他本身的坐标系统中的位置和大小.(参照点是本身的坐标系统).
- U3D外包团队—技术分享 U3d中获得物体的size
以size的x方向为例 1:gameObject.renderer.bounds.size.x;//这个值的结果真实反应出有MeshRenderer这个组件的模型的尺寸.不需要再乘以localScal ...
- poj 3304 Segments 线段与直线相交
Segments Time Limit: 1000MS Memory Limit: 65536K Description Given n segments in the two dim ...