Get location in Ionic/Cordova app when in background

Ionic Framework I’ve recently implemented a feature like this in my project. I did use Ionic and I did use the Cordova plugin background mode from Katzer. (right now I’m running the background process through the iOS 9.2 simulator). Here’s a code snippet to get it working: // Run when the device is ready document.addEventListener(‘deviceready’, … Read more

What is the difference between tick() and flush() in angular testing?

They do different things relative to async operations that were previously started. For example; calling setTimeout(…) starts an async operation. tick() moves time forward. flush() moves time to the end. This can be better illustrated with the unit tests for those functions. Tick This unit test shows tick being used to move time forward in … Read more

What is the difference between $state.go(app.location) and $location.path(“app/location”)?

The $location service is on the angular.js framework out of the box and allow you to manage location object (similar to that in pure javascript). The $state service is a part of ui-router module and allows you to manage routes in an advanced mode, throughout a state machine management of views. If you use ui-router, … Read more

Ionic – Add/Remove phonegap-push-plugin – CocoaPods was not found

To install push you must first install cocoapods. Follow these steps on your terminal in the Ionic project directory. First remove what you tried to install ionic cordova plugin remove phonegap-plugin-push Next install cocoapods sudo gem install cocoapods Then you need to sync the cocoapods repo pod setup This may take a while Finally install … Read more