Reputation: 2096
I want to test ionic-push, so I followed this tutorial.
But, when I add a button and add code to DashCtrl. After that, re-run ionic-serve --lab
. Click button it make error like this:
How can I fix it?
Upvotes: 1
Views: 333
Reputation: 1776
Inject the $ionicUser service into your controller like this:
.controller('DashCtrl', function($scope, $rootScope, $ionicUser, $ionicPush) {
})
If this does not work, then update your ionic CLI tool and try again. There is no need to manually include .js file.
Upvotes: 1