I'm having some trouble getting the $location service to work in this code snippet:
<script type="text/javascript>
var $injector = angular.injector(['ng', 'kinvey', 'app.constants']);
$injector.invoke(['$kinvey', 'CONST','URI_PATH', function($kinvey, CONST, URI_PATH) {
$kinvey.init({
appKey : CONST.appKey,
appSecret : CONST.appSecret
}).then(function() {
console.log("successfully connected");
angular.bootstrap(document, ['app']);
}, function() {
angular.bootstrap(document, ['app']);
});
}]);
</script>
Despite my efforts, I haven't been able to inject the $location service in the above script. This script is part of my index.html file and contains <ng-view></ng-view>
for page structure.
Additionally, I keep encountering the following error: link