###Restore an Ionic App to state left by other developer
This will restore any platforms and cordova plugins listed in the package.json file under cordovePlugins and cordovaPlatforms. These are platforms and plugins added via ionic platform add
and ionic plugin add
rather than via npm (which live in platforms and plugins in the package.json file).
ionic state restore
###Change the network address for live preview
Sometimes you need to switch which network address live preview is going to listen to on ionic run --device -l
or ionic serve --lab
calls, this can be done by:
ionic address
The following placed in a views controller will disable the swiping of an Ionic side menu, and enabled it again when you leave.
function disableSideMenuSwipe() {
$scope.$on('$ionicView.enter', function() {
$ionicSideMenuDelegate.canDragContent(false);
});
$scope.$on('$ionicView.leave', function() {
$ionicSideMenuDelegate.canDragContent(true);
});
}
Have a squiz in your www/lib/ionic folder and see if there are any bower files there. If there are, delete them, then return to the root of your ionic project and run:
ionic lib update -d
Which should kick off the process. Without deleting the bower files within the ionic folder (seem to be there from older pre-rc versions), it will kick out of the process without updating your version.
To check the version after updating, run ionic lib -v
In some instances, such as splash screens, fork screens or welcome screens, you don't want the back button when a selection is made as the destination the user is going to will be acting as their 'home' screen. Do stop this screen being added to history, use:
$ionicHistory.nextViewOptions({
disableAnimate: true,
disableBack: true
});
If you want to ensure the scroll bar is not shown on a page, perhaps because you have disabled programatically the scrolling capabilities under certain situations, use the following css:
.scroll-bar-indicator {
display: none;
}