- static html
- controller.js (using $scope)
- using $scope in view (simpleCheckIn.html) ng-repeat: iterate item through a list
- local scope: $scope, can access within controller only
- global scope: $rootScope, can be access accross the application
-
Installation of Bower
npm install -g bower -
Installation of Git
Download & Install Git at https://git-scm.com/ -
Installation of ngCordova
Go to working folder For Win: bower install ngCordova For Mac: bower install ngCordova --allow-root -
Configure ngCordova
<script src="lib/ngCordova/dist/ng-cordova.min.js"></script>add 'ngCordova' in app.js, angular.module('app',['ngCordova']); -
Set Platform
ionic platform add [ios|android] -
Install/Uninstall the ngCordova Plugins
cordova plugin add ......cordova plugin remove .....
-
Installation
cordova plugin add cordova-plugin-geolocation -
Injection in controller
.controller('addNewCheckInCtrl', function($scope, $cordovaGeolocation)... -
getCurrentPosition(posOptions)
... position.coords.longitude... position.coords.latitude
-
Define in services.js
-
Pass in
.run(function($rootScope, Session){ $rootScope.Session = Session; })
-
In route.js at
url: '/route/:id' -
Injection in controller
.controller('yourController',function($scope, $stateParams))....
-
Injection in Controller
.controller('someCtrl', function(){$scope, $ionicLoading}) -
To display
$ionicLoading.show(); -
To hide
$ionicLoading.hide(); -
Customize
$ionicLoading.show({ template: 'Loading...' });
1. Android: platforms/android/res
2. IOS:
- ng-repeat
- ng-if
- ng-model
- ng-app
- ng-src
- ng-bind-html