-
Notifications
You must be signed in to change notification settings - Fork 694
Error loading angular-oauth2-oidc #1
New issue
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
Comments
I tested with angular-quick-start and SystemJS SystemJS (system.config.js) but I couldn't make it work. There is some modifications that I made to make it work.AssumptionI Assume that we create a project with angular-cli (It is maybe not necessary but ...) 1 Install the dependency
2 in app.module.ts
Notice that I imported OAuthService instead of OAuthModule and added it into providers instead of in the imports. (I already imported HomeComponent) 3 in the home.component.ts
4 : AdviceUse at first the implicit flow component (because for the password component you should create or form that is not present in the readme. ) In practiceIf you want to use the password flow you can do like this. (I am a beginner in angular2 and in js world) PS : I cannot promise that this code work because my project is differently constructed. home.component.html
home.component.ts
app.component.ts
app.component.html
Testng serve --port 8080 Example(combine the 2 workflows ) |
Hi yannyann, thanks for provider this example. Wishes, |
Hi origicom, thanks for this info. As yannyann mentioned, things are more easy with webpack or the CLI, which uses wepback. The reason is that webpack aligns with the conventions of NodeJS and loads everything automatically after it has been installed into node_modules. It will also work with SystemJS, but in this case you need to configure the library and all of its 3 dependencies with System.config. I've quickly generated a configuration with jspm (jspm.io) that works:
If you want, you can share a working sample for this here. Wishes, |
I started to try this with angular-quick-start and SystemJS and I kept having issues. I manually updated my map with your guide so it looks like,
I'm not sure if it's correct to link to the specific files, but that seemed to make progress. Then each of the modules was trying to load modules like |
feat: update project to Angular 16
Hi Manfred,
I just spend over a hour to get things work, but I keep getting this error. As I am out of options, any help would be appreciated.
I took an Angular2 seed and NPM installed angular-oauth2-oidc
At my web.module.ts I did the import and their it will go wrong. Keep getting this error:
Error loading http://localhost:5555/node_modules/angular-oauth2-oidc.js as "angular-oauth2-oidc" from http://localhost:5555/web.module.js
The text was updated successfully, but these errors were encountered: