Skip to content

jianyiee96/HoMED-Main-Ionic

Repository files navigation

Project: HoMED-Main-Ionic

HoMED Ionic Client targeted for HomeTeam Servicemen.

Deployment Commands

npm install # Required Step

ionic cordova prepare # Required Step

ionic cordova run android -l # To test on Android devices

Coding Conventions

Code

  • Organize import statements according to their respective frameworks. (e.g. @ionic, @angular, local directories)
  • As much as possible, place styling in .scss file rather than inline
  • Apart from import statements, avoid putting ';' when coding in TypeScript
  • Enforce access modifiers to be as secure as possible
  • Make sure image also has 'alt' text (preferably same as file name)

File Generation

  • When generating new page, append 'Screen' to name of page and apply Pascal Casing (e.g. StartScreen, LoginScreen)
ionic g page screens/StartScreen
  • When generating new modal, append 'Modal' to name of page and apply Pascal Casing (e.g. EditProfileModal)
ionic g page modals/EditProfileModal
  • When generating new service, just the object name would suffice in Pascal Casing (e.g. Serviceman, Session, Utility, FormTemplate)
ionic g service services/medicalcentre/MedicalCentre
  • When generating new class, just the object name would suffice (e.g. Serviceman, Appointment)
ionic g class classes/serviceman/Serviceman
  • When creating new enum, just the object name would suffice on lowercase and append '-enum' (e.g. gender, bloodtype)
// create file with name: bloodtype-enum.ts
  • When creating new standalone TS file, seperate each subword by period, and all lower casing (e.g. HttpConfigInterceptor)
// create file with name: http.config.interceptor.ts