ionic自定义component

简介: 在ionic3.x中自定义component

例如要自定义一个component:
用于显示一个有固定结构的item组成list
假设这是我们要的一个item的效果:

H1Header

item1
item2
item3

1.在终端中执行:ionic g component MyComponent
执行后src目录中会出现components目录,其中有我们刚刚建立的my-component目录,打开后有scss、ts、html和module.ts文件如图(图中这个组件的名字叫ChapterList)
src:
_2017_06_22_21_30_10
my-component.html:
_2017_06_22_21_34_02
my-component.ts:
_2017_06_22_21_35_52

相关文章
|
JavaScript 前端开发 开发者
SAP UI5 应用的 Component.js 文件是如何在运行时被加载的?
SAP UI5 应用的 Component.js 文件是如何在运行时被加载的?
Spartacus 2211 无法在文件夹下使用 ng g component 创建新的 Component
Spartacus 2211 无法在文件夹下使用 ng g component 创建新的 Component
Spartacus 2211 无法在文件夹下使用 ng g component 创建新的 Component
|
5月前
|
编解码 JavaScript 编译器
【Vue warn】If this is a native custom element, make sure to exclude it from component resolution ……
【Vue warn】If this is a native custom element, make sure to exclude it from component resolution ……
Vuejs:component动态组件的使用示例
Vuejs:component动态组件的使用示例
146 0
Vuejs:component动态组件的使用示例
动态组件<component :is=‘‘></component>
动态组件<component :is=‘‘></component>
|
前端开发
React Native 加载base64图片
const {base64Image } = this.props; let baseImg=`data:image/png;base64,${base64Image}`;
2593 0
|
前端开发
React里所有已经加载的module列表
React里所有已经加载的module列表
React里所有已经加载的module列表
|
JavaScript 前端开发 Android开发
什么是SAP UI5的Component-preload.js
First of all, the Component-preload.js works as expected. In your design time, ( WebIDE or Eclipse ) , all development artifact, the .js files are organized into different folders. And in the productive use case, the content of all js files are combined into a single file to save network traffic, re
什么是SAP UI5的Component-preload.js
SAP UI5应用入口App.controller.js是如何被UI5框架加载的?
首先在UI5应用的manifes.json里,定义了UI5应用的入口视图为App:
SAP UI5应用入口App.controller.js是如何被UI5框架加载的?
when is extAddTo.controller.js loaded
created by Wang, Jerry, last modified on Mar 05, 2015
102 0
when is extAddTo.controller.js loaded