閱讀286 返回首頁    go 阿裏雲 go 技術社區[雲棲]


ionic自定義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

最後更新:2017-06-22 22:34:28

  上一篇:go  Spring Boot筆記——3
  下一篇:go  日誌服務十大經典問題