Skip to content

Commit 66f5ed2

Browse files
author
Robert
committed
Demonstrate dependency issue with upgraded UI-Router
You should see the error: ``` angular.js:4442 Uncaught Error: Unrecognised token store: localStorage at Object.getTokenStore (stormpath-sdk-angularjs.js:3394) at new StormpathOAuthToken (stormpath-sdk-angularjs.js:2322) at StormpathOAuthTokenProvider.$get (stormpath-sdk-angularjs.js:2476) at Object.invoke (angular.js:4478) at angular.js:4295 at getService (angular.js:4437) at Object.invoke (angular.js:4469) at Object.enforcedReturnValue [as $get] (angular.js:4330) at Object.invoke (angular.js:4478) at angular.js:4295 ``` Moving the UI Router below stormpath will fix the prolem: ``` angular.module('exampleApp', [ 'stormpath', 'stormpath.templates’, 'ui.router' ]) ```
1 parent 02b7e8e commit 66f5ed2

3 files changed

Lines changed: 4578 additions & 7 deletions

File tree

client/app.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,7 @@ angular.module('exampleApp', [
1111

1212
$locationProvider.html5Mode(true);
1313

14-
/*
15-
At the moment, JSON is not the default content type when posting forms, but
16-
most of our framework integrations are expecting JSON, so we need to manually set
17-
this. JSON will be the default in the next major release of the Angular SDK.
18-
*/
19-
STORMPATH_CONFIG.FORM_CONTENT_TYPE = 'application/json';
14+
STORMPATH_CONFIG.ENDPOINT_PREFIX = 'https://lawful-heron.apps.stormpath.io';
2015
})
2116
.run(function($stormpath,$rootScope,$state){
2217

client/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
</div>
2525

2626
<script src="vendor/angular.js"></script>
27-
<script src="vendor/angular-ui-router.js"></script>
27+
<script src="vendor/angular-ui-router-031.js"></script>
2828
<script src="vendor/stormpath-sdk-angularjs.js"></script>
2929
<script src="vendor/stormpath-sdk-angularjs.tpls.js"></script>
3030
<script src="app.js"></script>

0 commit comments

Comments
 (0)