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

相关文章
|
6月前
|
JavaScript 前端开发
vue3瀑布流布局(使用 Vue 3 框架的单文件组件格式(Single-File Component)编写的)
vue3瀑布流布局(使用 Vue 3 框架的单文件组件格式(Single-File Component)编写的)
189 0
|
21天前
Spartacus 2211 无法在文件夹下使用 ng g component 创建新的 Component
Spartacus 2211 无法在文件夹下使用 ng g component 创建新的 Component
7 0
Spartacus 2211 无法在文件夹下使用 ng g component 创建新的 Component
|
1月前
|
前端开发
最新版本create-react-app 如何使用css-module
最新版本create-react-app 如何使用css-module
15 0
|
7月前
Angular 项目中导入 styles 文件到 Component 中的一些技巧
Angular 项目中导入 styles 文件到 Component 中的一些技巧
40 0
|
4月前
|
编解码 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 ……
|
4月前
|
JavaScript
vue3.0引入ant-design-vue报错 export ‘default‘ (imported as ‘Vue‘) was not found in ‘vue‘
vue3.0引入ant-design-vue报错 export ‘default‘ (imported as ‘Vue‘) was not found in ‘vue‘
|
11月前
|
前端开发 索引
React+hook+ts+ant design封装一个具有动态表格得页面
React+hook+ts+ant design封装一个具有动态表格得页面
120 0
React+hook+ts+ant design封装一个具有动态表格得页面
Vuejs:component动态组件的使用示例
Vuejs:component动态组件的使用示例
124 0
Vuejs:component动态组件的使用示例
|
JavaScript API
component_vue3选项api
component_vue3选项api
动态组件<component :is=‘‘></component>
动态组件<component :is=‘‘></component>