Giter VIP home page Giter VIP logo

Comments (19)

2f4f4f avatar 2f4f4f commented on July 19, 2024 2

@meeroslav
What about Angular 4.0.0 support?

from localize-router.

meeroslav avatar meeroslav commented on July 19, 2024 1

Resolved with Angular version 2.4.9

from localize-router.

meeroslav avatar meeroslav commented on July 19, 2024 1

The new version should be there in few days, I'm working on tests.

In the meantime, if you don't mind npm complaining, version 0.6.4 is fully functional with Angular Core 2.4.9 (and Angular Router 3.4.9).

from localize-router.

meeroslav avatar meeroslav commented on July 19, 2024 1

Version 0.7.0 supports Angular 4

from localize-router.

meeroslav avatar meeroslav commented on July 19, 2024

Can you provide more information:

  • what route are you loading?
  • how does your appRoutes look like?
  • if possible provide link to your repo

Thanks

from localize-router.

mrzepinski avatar mrzepinski commented on July 19, 2024

@meeroslav It's part of enterprise project, so it's not available online.

My appRoutes is simple:

export const appRoutes: Routes = [
  {
    path: '',
    component: DashboardComponent
  },
  {
    path: 'admin',
    children: [
      {
        path: 'active-sessions',
        component: AdminActiveSessionsComponent
      }
    ]
  }
];
  1. Load homepage
  2. Go to admin/active-sessions
  3. Refresh the page (F5)
  4. Error

from localize-router.

meeroslav avatar meeroslav commented on July 19, 2024

Well, admin/active-sessions should be invalid.
Once localize-router kicks in, proper URL should be e.g. en/admin/active-sessions so the message you get is correct.
Do you navigate through the application to the given route or you modify the browser URL manually?
Former would be a bug in localize-router while later would be expected behavior.

Please note that there is possibility to add flag to exclude certain routes from the localization process, but it's not yet implemented.

from localize-router.

mrzepinski avatar mrzepinski commented on July 19, 2024

@meeroslav Sure, it's en/admin/active-sessions. I skipped this for clarity.
I navigate through the application. I just refresh the page by pressing F5.

from localize-router.

meeroslav avatar meeroslav commented on July 19, 2024

@mrzepinski This would notmaly happen if you would be using lazy loaded routes (#3). If this is not the case, then I will investigate it as soon as possible.

from localize-router.

mrzepinski avatar mrzepinski commented on July 19, 2024

@meeroslav It's not this case. I'm not using lazy loaded routes.

from localize-router.

meeroslav avatar meeroslav commented on July 19, 2024

This is caused by router version 3.4.8. Seems that navigation kicks in before APP_INITIALIZER finishes.

from localize-router.

Chuvisco88 avatar Chuvisco88 commented on July 19, 2024

Yeah, looked into the changes (angular/angular@2.4.7...2.4.8).
Looks like the process changed. They added a LOCATION_INITIALIZED which might help

from localize-router.

meeroslav avatar meeroslav commented on July 19, 2024

This will break the backwards compatibility unfortunately, not to mention 4.x.x versions.
I need to investigate more to find proper solution.

from localize-router.

meeroslav avatar meeroslav commented on July 19, 2024

Issue mentioned in angular/angular#14615

from localize-router.

meeroslav avatar meeroslav commented on July 19, 2024

Workaround for version 2.4.8. can be found here: angular/angular#14588.

Proper solution will be done soon.

from localize-router.

2f4f4f avatar 2f4f4f commented on July 19, 2024

Any update on this?

from localize-router.

2f4f4f avatar 2f4f4f commented on July 19, 2024

Nice.

Any plans to support the new process that is used in Angular 4? There will apparently be a legacy option that makes it work like in 2.x but you can't use that with Universal.

from localize-router.

GoshaFighten avatar GoshaFighten commented on July 19, 2024

@meeroslav
When are we going to have a new version supporting Angular 2.4.9?

from localize-router.

meeroslav avatar meeroslav commented on July 19, 2024

On it. Sorry for waiting.

from localize-router.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.