Skip to content

Compatibility With Angular 9 #517

Open

Description

@andrewariley87

I'm submitting a...

  • Regression (a behavior that used to work and stopped working in a new release)
  • Bug report
  • Performance issue
  • Feature request
  • Documentation issue or request
  • Other... Please describe: Is this compatible with Angular 9?

Current behavior

I tried to update my app to Angular 9.0.6 by running ng update @angular/cli @angular/core
and got the following

Package "angular-token" has an incompatible peer dependency to "@angular/core" (requires "^7.0.0" (extended), would install "9.0.6").
Package "angular-token" has an incompatible peer dependency to "@angular/common" (requires "^7.0.0" (extended), would install "9.0.6").

Expected behavior

Compatibility with Angular 9

What is the motivation / use case for changing the behavior?

I want to update my app to use Angular 9

Environment

Angular-Token version: 7.0.1
Angular version: 8.0.2 -> 9.0.6

Bundler

  • Angular CLI (Webpack)
  • Webpack
  • SystemJS

Browser:

  • Chrome (desktop) version XX
  • Chrome (Android) version XX
  • Chrome (iOS) version XX
  • Firefox version XX
  • Safari (desktop) version XX
  • Safari (iOS) version XX
  • IE version XX
  • Edge version XX

Activity

  1. neroniaky commented on Mar 18, 2020

    @neroniaky
    Owner

    Hey @andrewariley87 I haven't looked in much detail, but you can give it a try in Angular 9. The warning you're see is due to the version range I set, because I didn't test it with Angular 9 yet (Does not have any implication on functionality)

  2. mattarau commented on Mar 19, 2020

    @mattarau
    Contributor

    I can confirm that it is NOT compatible with Angular 9, because of a new requirement for the ModuleWithProviders.

    When you call the forRoot() method it will throw the following error:

    ERROR in node_modules/angular-token/lib/angular-token.module.d.ts:6:51 - error NG6005: AngularTokenModule.forRoot returns a ModuleWithProviders type without a generic type argument. Please add a generic type argument to the ModuleWithProviders type. If this occurrence is in library code you don't control, please contact the library authors.
    

    The fix is as simple as adding a type to ModuleWithProviders:

    static forRoot(options: AngularTokenOptions): ModuleWithProviders<AngularTokenModule> {
      ...
    }
    

    It is simple, but I need to leave now, so if not yet done, I'll send a PR this Friday.

  3. andrewariley87 commented on Mar 20, 2020

    @andrewariley87
    Author

    @neroniaky and @mattarau Thank you both for looking into this and the quick response!

  4. mattarau commented on Mar 20, 2020

    @mattarau
    Contributor

    Hey @andrewariley87 and @neroniaky, I've tested it today and found out that the whole main project would have to be updated to v9 in order to work, so I did it. Above you can see the PR with the Update.

  5. neroniaky commented on Apr 28, 2020

    @neroniaky
    Owner

    I published 9.0.0-beta.0 Please give it a try.

  6. ManCodeB commented on May 7, 2020

    @ManCodeB

    any news on this? tried to move from Angular v8.2 to Angular v9 today but got errors that angular-token is not compatible and may break. Would be nice if you guys could publish the next stable version 9.0.0 soon.

  7. neroniaky commented on May 10, 2020

    @neroniaky
    Owner

    @ManCodeB Could you give 9.0.0-beta.0 a try and see if it works for you?

  8. ManCodeB commented on May 19, 2020

    @ManCodeB

    @neroniaky I am using Angular v9.1.4 with angular-token v7.0.1 right now, and it works like it used to with Angular v7.x

  9. prdpspkt commented on May 20, 2020

    @prdpspkt

    I'm using Angular9 and rails refused to create registration record. It show "email can't be blank", passowrd can't be blank. The registerAcccount should accept custom data provided. like this

    this.tokenService.registerAccount({
          user: {
          email: this.registerForm.value['email'],
          password: this.registerForm.value['password'],
          passwordConfirmation: this.registerForm.value['password_confirmation']
        }}).subscribe(
          res => console.warn(res.data),
          error => console.warn(error)
        );
    
  10. mgraulich commented on May 25, 2020

    @mgraulich

    @neroniaky 9.0.0-beta.0 is working as expected in Angular 9.1.9.

  11. prdpspkt commented on May 26, 2020

    @prdpspkt

    @mgraulich Yes, it's working but the package has poor documentation. Some extra lines of configurations in devise-token-auth should be added.

  12. stanciupaul commented on Jul 8, 2020

    @stanciupaul

    Any update regarding a stable release for ng 9?

  13. neroniaky commented on Jul 30, 2020

    @neroniaky
    Owner

    @stanciupaul Could you give 9.0.0-beta.0 a try? Thanks!

  14. stanciupaul commented on Jul 13, 2021

    @stanciupaul

    @neroniaky 9.0.0-beta.0 works fine even with Angular 12. When you plan to release a stable version?

  15. rmcsharry commented on Sep 6, 2021

    @rmcsharry

    @neroniaky Please could you release a stable version (ie. not a beta)? Thank you.

  16. rmcsharry commented on Feb 15, 2022

    @rmcsharry

    @neroniaky Please could we get a non-beta release?

    btw, many thanks for all your hard work.
    If my app ever makes any money I'll be sure to sponsor you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions