Sign up ×
Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them, it only takes a minute:

I've read that a good way to initialize Parse is when the module is created. I made the following code, however Parse does not seem to be initializing when I run my program. Am I missing something basic about setting up run functions on a module?

Here is the code:

var myApp = angular.module('myApp', []);

myApp.config(function ($routeProvider, $locationProvider) {
    })
    .run(function($rootScope) {
        Parse.initialize("myKey", "myKey");
        $rootScope.sessionUser = Parse.User.current();
    });
share|improve this question
    
Did you include the parse script within your html? If so, prior to your angular app? <script src="parsecdn.com/js/parse-1.2.9.min.js"></script>; – user2263572 20 hours ago
    
Yes. I have the parse script in my header and the module is in the body. – Mardymar 15 hours ago

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.