Reputation: 3586
I am self teaching Ionic framework i have loaded up the ionic start myApp tabs
according to the Getting started page from Ionic framework (http://ionicframework.com/getting-started/)
Everything is good, up and running on my mac, can serve and can emulate. Now... when I used the ionic upload
to the Ionic View app on my mobile its fine - everything as expected.
BUT when i changed something for example in the controller.js file:
.controller('AccountCtrl', function($scope) {
$scope.settings = {
enableFriends: true
};
});
to enableFriends:false
and I ionic upload
again, then i 'sync to latest' on the Ionic View app on my iphone... I am still getting the enableFriends:true (because the option was set to true - switch is green)
ionic build ios
before the ionic upload
, I tried to delete the app in the Ionic View app on my phone and re uploaded it.So I am suspecting that the controllers.js is cached... if yes.. how can i clear this cache??!!!
Upvotes: 5
Views: 5890
Reputation: 667
For anyone that may be viewing this that may be having a problem with this in Ionic V2 apps not updating in the Ionic View App the process to execute is:
You'll notice that when you run ionic serve the build process executes which will update your files. Then you upload and your changes will be there. I hope this helps someone in the future.
Upvotes: 5
Reputation: 3586
I just found a solution - but not sure its the correct way but it works!
in the ionic.project file...
{
"name": "someProject",
"app_id": "2312n33"
}
delete the app_id!!!!
{
"name": "someProject",
"app_id": ""
}
this will generate a new app and it works! However if there is a better way to do this like clearing the cache (maybe there is the right way) - please post.
UPDATE - 20 May 2015
Ionic View App just fixed the caching issue where sync'ed changes weren't showing - in Version 1.0.6 Therefore this should not be a problem anymore.
Upvotes: 3
Reputation: 41
Have you looked into this more?
try using the $ionicConfigProvider and set the cache to 0
code line would look like the following:
angular.module('myApp' ['ionic', 'starter.controllers', 'starter.services'])
.config(function($stateProvider, $urlRouterProvider, $ionicConfigProvider) {
$ionicConfigProvider.views.maxCache(0);
//the rest of your Router information below here
});
here is a link to the API where I found it
This may not be the best way, but is another option.
Upvotes: 0