javascript - EmberJS and third-party libraries -
i'm trying implement digest auth in ember app. complete took library - https://github.com/inorganik/digest-auth-request. have no idea how use in app. auth service looks next:
import ember 'ember'; export default ember.service.extend({ path: "some-path", username: "", password: "", me(successhandler) { var merequest = new digestauthrequest('get', this.path + "/me", this.username, this.password); merequest.request(successhandler); }, setcredentials(username, password) { this.username = username; this.password = password; console.log(this.username); } });
and got following errors:
services/auth.js: line 9, col 29, constructor name should start uppercase letter. services/auth.js: line 9, col 29, 'digestauthrequest' not defined.
my attempt adding digestauthrequest.js vendor folder, , adding
app.import('vendor/digestauthrequest.js');
to ember-cli-build.js.
looks it's incorrect. need use such library in ember app?
p.s. emberjs version - 1.13.
Comments
Post a Comment