Skip to content
MobileCaddy Seed Time and Expenses recording application powered by Ionic.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

MobileCaddy Seed App - Time and Expenses - Angular/Ionic


This is the basic seed application built with Angular JS and the Ionic Framework. The idea of the MobileCaddy seed applications are to give developers a starting block in getting building hybrid mobile applications with MobileCaddy.

Getting Started

  • Get the code and the supporting node and packages. The following depencies are needed (For detailed instructions see the Getting Started Guide);

  • npm

  • grunt-cli

  • ruby

  • sass

  • Download the zip and unzip

cd seed-expenses-ionic-master

What you get (prior to running any installs/grunt tasks)

├── apex-templates		## Templates for the platform's startpage and cache manifest
├── bower.json        ## Defines dependencies (MobileCaddy, Ionic, etc)
├── Gruntfile.js      ## Defines our task automation
├── mock              ## Platform mock responses can go in here
├── package.json      ## The node package file
├──         ## This file
├── scss              ## Where you do your SCSS
├── tests             ## unit tests / e2e tests etc
└── www               ## Where you do your coding
    ├── css
    ├── img
    ├── index.html    ## This is used locally only
    ├── js
    ├── lib
    └── templates

  • Install the required packages and dependencies (note. you might need sudo npm install below)
npm install
grunt devsetup

The app can be started using this command (that uses the Mobilecaddy CLI) and should be accessible on http://localhost:3030/www/, though a browser tab should be opened automagically for you.

mobilecaddy serve

The Codeflow control panel for your application should be availble on http://localhost:3030/codeflow/.

Task automation

The Grunt config (out of the box) offers the following commands

  • grunt devsetup : This should be run once following bower install command. It will copy dependency files over into the correct place in your app
  • grunt serve : This runs the connect and watch tasks below.
  • grunt connect : This will start a server up so you can run your app in the browser
  • grunt watch : This will watch your template files, JS and SCSS files for changes. And will run will depending on the type of file that changed, run JSHint, SASS compilation and will create a .zip file containing your app. You JS will be unminified in this archive to aid debugging. Any SCSS changes will prompt new CSS and cause live reload of these into your browser.
  • grunt unit-test : run the karma unit tests
  • grunt dev : This runs JSHint, SASS compilation and will create a .zip file containing your app. You JS will be unminified in this archive to aid debugging.
  • grunt prod : This will do the same as grunt dev but your JS will be minified in the output archive.

end2end Testing

e2e tests can be run with protractor. This may need to be installed if you haven't got it already;

npm install -g protractor

You may also need to install/update the webdriver

webdriver-manager update --standaloneUpdating selenium standalone

To run the tests;

webdriver-manager start

... and in another prompt

protractor tests/protractor.config.js

Deploying for Production

  • Uncomment the line $compileProvider.debugInfoEnabled(false); in the www/js/app.js file
  • Run grunt prod from the command prompt. This creates a minified version
  • Without saving anymore files run the "Deply to Salesforce" from within the app.
You can’t perform that action at this time.