0

I am having some trouble injecting kinvey into my angular application. I have been getting the following error with the code below: Uncaught Error: [$injector:unpr]

var app = angular.module('FantasySeasons', ['snap', 'ngRoute', 'ngResource', 'ngTouch',
 'angular-carousel', 'FSControllers', 'FSPartials', 'kinvey']);

    app.config(['$routeProvider', function($routeProvider) {
        $routeProvider.when('/', {
            templateUrl : 'partials/home.html',
            controller : 'HomeCtrl'
        }).otherwise({
            redirectTo : '/'
        });
    }]);


    app.run(function($kinvey){
        var promise = $kinvey.init({
            appKey: 'your app key',
            appSecret: 'your app secret'
        });
    });
Horace Heaven
  • 712
  • 5
  • 13
  • 24

1 Answers1

1

As the creator of the Kinvey Angular library, I don’t see anything wrong with declaring the Kinvey dependency.

Since the error message is not specific to any module, I can only guess at this point. One thing to note is the ngRoute module is no longer part of the AngularJS core (since 1.2.0). To use it, you need to include it separately, see docs. Make sure this is the case. Otherwise, you run into that error.