Orange-OpenSource / angular-swagger-ui

An angularJS implementation of Swagger UI
http://orange-opensource.github.io/angular-swagger-ui/
MIT License
135 stars 74 forks source link

use promise syntax when handling $http result #65

Closed cthiebaud closed 7 years ago

cthiebaud commented 7 years ago

using angular 1.6.0 with angular-swagger-ui 0.3.5, I got the following error

failed to load swagger: undefined    b(...).success is not a function

this commit fixes the issue. Tested.

(I did not test with angular < 1.6.0)

cf. https://docs.angularjs.org/api/ng/service/$http

cthiebaud commented 7 years ago

see also 'Deprecation Notice' in https://code.angularjs.org/1.5.9/docs/api/ng/service/$http

The $http legacy promise methods success and error have been deprecated. Use the standard then method instead. (...)

mathieuales commented 7 years ago

thanks for sharing ! fixed in 0.4.0 sorry i didn't take your fix as another one was proposed without .pom .sh and .jar files #67