You can add lines of code to load parameters either in YourIndex.html Controller , or you can put this code under $ionicPlatform.ready .
Option 1: Run it inside your index.html controller, because every time you open the application, this controller will be loaded.
var myApp = angular.module('myApp', ['ionic']); myApp.config(function($stateProvider, $urlRouterProvider) { $urlRouterProvider.otherwise('/') $stateProvider.state('index', { url: '/', controller: 'IndexCtrl', }) }); myApp.controller('IndexCtrl', function($scope) {
Option 2: Called every time Ionic calls deviceReady .
var myApp = angular.module('myApp', ['ionic']); myApp.run(function($ionicPlatform) { $ionicPlatform.ready(function() {
source share