jamesrandall / angularjs-oauth2-identityserver3-sample Goto Github PK
View Code? Open in Web Editor NEWSample showing how to use the AngularJS-OAuth2 plugin with IdentityServer3 and Web API
License: MIT License
Sample showing how to use the AngularJS-OAuth2 plugin with IdentityServer3 and Web API
License: MIT License
Hi, Great article and project.
However.... I get this error when clicking the "Make web api call" button. Any ideas?
TypeError: $http.get(...).success is not a function
at ChildScope.$scope.httpCall (webapi.js:15)
at fn (eval at compile (angular.js:15197), :4:144)
at callback (angular.js:26808)
at ChildScope.$eval (angular.js:18017)
at ChildScope.$apply (angular.js:18117)
at HTMLButtonElement. (angular.js:26813)
at HTMLButtonElement.dispatch (jquery.js:5201)
at HTMLButtonElement.elemData.handle (jquery.js:5009)
(anonymous) @ angular.js:14362
https://localhost:44310/claims Failed to load resource: the server responded with a status of 401 ()
angular.js:14362 Possibly unhandled rejection: {"data":{"Message":"Authorization has been denied for this request."},"status":401,"config":{"method":"GET","transformRequest":[null],"transformResponse":[null],"jsonpCallbackParam":"callback","url":"https://localhost:44310/claims","headers":{"Accept":"application/json, text/plain, /"}},"statusText":""}
oh... And I'm also getting this error during the Grunt tasks:
7 02 2017 22:03:56.989:INFO [launcher]: Starting browser PhantomJS
27 02 2017 22:04:00.126:INFO [PhantomJS 2.1.1 (Windows 8 0.0.0)]: Connected on socket WY6XBf3827Ucx2A_AAAA with id 90955614
PhantomJS 2.1.1 (Windows 8 0.0.0) Controller: AboutCtrl should attach a list of awesomeThings to the scope FAILED
Error: [$controller:ctrlreg] The controller with the name 'AboutCtrl' is not registered.
http://errors.angularjs.org/1.6.2/$controller/ctrlreg?p0=AboutCtrl (line 10691)
$controller@bower_components/angular/angular.js:10691:84
bower_components/angular-mocks/angular-mocks.js:2296:23
test/spec/controllers/about.js:14:28
invoke@bower_components/angular/angular.js:4862:24
WorkFn@bower_components/angular-mocks/angular-mocks.js:3170:26
loaded@http://localhost:8080/context.js:151:17
inject@bower_components/angular-mocks/angular-mocks.js:3137:28
test/spec/controllers/about.js:12:20
global code@test/spec/controllers/about.js:3:9
TypeError: undefined is not an object (evaluating 'scope.awesomeThings.length') in test/spec/controllers/about.js (line 20)
test/spec/controllers/about.js:20:31
loaded@http://localhost:8080/context.js:151:17
PhantomJS 2.1.1 (Windows 8 0.0.0) Controller: MainCtrl should attach a list of awesomeThings to the scope FAILED
TypeError: undefined is not an object (evaluating 'scope.awesomeThings.length') in test/spec/controllers/main.js (line 20)
test/spec/controllers/main.js:20:31
loaded@http://localhost:8080/context.js:151:17
PhantomJS 2.1.1 (Windows 8 0.0.0): Executed 2 of 2 (2 FAILED) ERROR (0.046 secs / 0.042 secs)
Warning: Task "karma:unit" failed. Use --force to continue.
Aborted due to warnings.
Not sure if they are related ?
Do you have any ideas ?
Stephan
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.