App is running fine in browser but when I install it onto device, it shows a black screen. There are no error in the console.
I found out what the issue was.
I am currently using DSCache factory and since the home view is being initialized before the CacheFactory is fully initialized, then it fails.
I wrapped my DSCache factory code, i did this:
$ionicPlatform.ready(function(){
self.newsFeedCache = DSCacheFactory.get('newsFeedCache');
// Set on expire function.
self.newsFeedCache.setOptions({
onExpire: function(key, value){
$scope.getNewsFeed().then(function(data){
console.log('News feed automatically refreshed at: ' + new Date());
self.newsFeedCache.put(key,data);
},function(){
console.log('Error getting data. Putting expired items back');
self.newsFeedCache.put(key,value);
});
}
});
}