We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I am trying to use angular2-jwt. However I am getting the following error when trying to use it:
angular2-jwt
Uncaught SyntaxError: Unexpected token < Evaluating http://localhost:3000/angular2-jwt/angular2-jwt Error loading http://localhost:3000/app/main.js
I've followed the example, so my guess is that I am somehow failing to import it correctly.
It's included in my index.html <script src="node_modules/angular2-jwt/angular2-jwt.js"></script>
<script src="node_modules/angular2-jwt/angular2-jwt.js"></script>
I've imported it to my app component import {AuthHttp, AuthConfig} from 'angular2-jwt';
import {AuthHttp, AuthConfig} from 'angular2-jwt';
And finally I have registered it in my providers array:
provide(AuthHttp, { useFactory: (http) => { return new AuthHttp(new AuthConfig(), http); }, deps: [Http] }) AuthHttp,
What have I done wrong?
The text was updated successfully, but these errors were encountered:
A couple other people were seeing this error. Take a look at this issue and let me know if anything there helps at all :)
Sorry, something went wrong.
Thank you for the quick response. I was missing it in the System.config object. This fixed it:
System.config
"angular2-jwt": { "defaultExtension": "js" }
Nice! No prob.
No branches or pull requests
I am trying to use
angular2-jwt
. However I am getting the following error when trying to use it:I've followed the example, so my guess is that I am somehow failing to import it correctly.
It's included in my index.html
<script src="node_modules/angular2-jwt/angular2-jwt.js"></script>
I've imported it to my app component
import {AuthHttp, AuthConfig} from 'angular2-jwt';
And finally I have registered it in my providers array:
What have I done wrong?
The text was updated successfully, but these errors were encountered: