Skip to content
master
Switch branches/tags
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Sans Sugar App

Sugar Tracking App for achieving a healthier eating habit.

Note: this Ionic App requires Ionic CLI 3.

Table of Contents

  1. Getting Started
  2. Pages
  3. Providers
  4. i18n (adding languages)

Getting Started

To test the app:

Develop

ionic serve

Run on iOS Simulator

ionic cordova build ios
ionic cordova emulate ios

Run on iOS Device

ionic cordova build ios
ionic cordova run ios --device

Build for production

ionic cordova build ios --prod

Pages

See pages at pages.tx

The app loads with the FirstRunPage set to LandingPage as the default. If the user has already gone through this page once, it will be skipped the next time they load the app.

If the tutorial is skipped but the user hasn't logged in yet, the Welcome page will be displayed which is a "splash" prompting the user to log in or create an account.

Once the user is authenticated, the app will load with the MainPage which is set to be the TabsPage as the default.

The entry and main pages can be configured easily by updating the corresponding variables in src/pages/pages.ts.

Please read the Pages readme, and the readme for each page in the source for more documentation on each.

Providers

Providers:

  • items
  • settings
  • trackings
  • user

User

The User provider is used to authenticate users through its login(accountInfo) and signup(accountInfo) methods, which perform POST requests to an API endpoint that you will need to configure.

Api

The Api provider is a simple CRUD frontend to an API. Simply put the root of your API url in the Api class and call get/post/put/patch/delete

i18n

Supports internationalization (i18n) out of the box with ngx-translate. This makes it easy to change the text used in the app by modifying only one file.

Adding Languages

To add new languages, add new files to the src/assets/i18n directory, following the pattern of LANGCODE.json where LANGCODE is the language/locale code (ex: en/gb/de/es/etc.).

Changing the Language

To change the language of the app, edit src/app/app.component.ts and modify translate.use('en') to use the LANGCODE from src/assets/i18n/

About

Sans Sugar - Sugar intake tracking Ionic App built with Skygear

Resources

License

Releases

No releases published

Packages

No packages published