如前文Hybrid Apps開發系列之2:第一個專案所說,Ionic專案建立之後,有app.js, index.html等重要檔案。事實上,Ionic apps有其運作機制,其中每一個app都會包括: views、controllers、與app設定(configuration)等部分,而視情況,還會建立services/factories,作為app資料服務串接之用。底下先就views、controllers、與app整體設定進行說明。
Ionic views、controllers與組態設定
Ionic apps有關views, controllers,組態設定(configuration)等基本運作機制,及其與index.html、app.js等檔案的關聯如下圖所示:
![]() |
| 圖1. Ionic app的view(如home.html及page2.html)與controller(app.js)。index.html則做為app的模板(template) |


