Questions tagged [angular-routerlink]

220 questions
1
vote
1 answer

Angular routerLinkActive not working when navigating using skipLocationChange

Suppose I have following routes: const routes: Routes[] = [ { path: 'a', component: AComponent }, { path: 'b', component: BComponent } ] And I have some Navbar link with routerLinkActive class when on path a like this:
  • 1
    vote
    1 answer

    Angular: detect click on current page link

    Is there any way to use Angular build in router properties, such as RouterLinkActive to detect click on the link to current page? In the footer I want to add function to scroll to top if clicked on the current page link. I have this:
    Filip Witkowski
    • 795
    • 3
    • 14
    • 24
    1
    vote
    1 answer

    routelink not redirecting to child component

    I have a child component that i want to add to my route outlet. But when i click nothing happens. Here's my routelink
    1
    vote
    2 answers

    NG04005: Invalid number of '../'

    When I have the below route Home Exception Error: NG04005: Invalid number of '../' at createPositionApplyingDoubleDots (router.mjs:1082:19) at…
    1
    vote
    0 answers

    Angular router link for subcategories not working

    I have defined categories and sub-categories for products in my angular app. I intend to have a tree structure for the categories whereby, a top-level category can theoretically have infinite number of nested sub-categories. When I navigate to the…
    1
    vote
    2 answers
    1
    vote
    0 answers

    Angular routing does not change navigation on Long base64 URL string

    I have the problem that my angular nav page is not "updating" when I click on links that look quite similar in path, they just differ in a long base64 string at the end that contains saved user profile data. Depending on the data that is saved, the…
    MMMM
    • 3,320
    • 8
    • 43
    • 80
    1
    vote
    1 answer

    Redirect to new page by replacing the current page

    My goal: user is in the welcome page(app component html) and when clicked on button, he should be able to go to another html page. I checked the tutorials and know that i should use routes to do this but whatever I do, i couldn't get this simple…
    1
    vote
    2 answers

    How can access to routerLink value via custom directive?

    How can I create a custom directive(e.g. appCheckPermission ) to check if user can view a link or button base on routerLink that applied to that element. p.s: there is a…
    user3910994
    1
    vote
    1 answer

    Lazy Loading component inside named router outlet, children in primary

    I have a component called clientComponent. Inside the component I have named routerLink, let's call it clientView. This routerLink is inside the primary router link. The clientView should show only direct children of the route. So in other…
    manneJan89
    • 1,004
    • 8
    • 27
    1
    vote
    1 answer

    One tab not navigating

    Angular project. Used by Router. There is a navigation bar with 8 items. The transition to tab 2 does not occur if you go from tab 4. Any other combination works. How to catch the problem in this situation, how to debug it? In a subscription to…
    1
    vote
    0 answers

    Angular 9 routerLink to 2 outlets at the same time

    How can I have routerLink link to both main router-outlet and secondary (sidebar) router-outlet? I have: FILTERS HOME When I am trying to combine this…
    Filip Witkowski
    • 795
    • 3
    • 14
    • 24
    1
    vote
    0 answers

    Correct pattern for dynamically loading components into an Angular application

    Angular newbie layout question. I'd like all content in app.component.html to be replaced with the content of the selected component when an item in my navigationComponent is clicked. With the way I have laid it out, the selected component content…
    Fred2020
    • 315
    • 3
    • 14
    1
    vote
    1 answer

    NgModuleFactoryLoader.load() is not able to find the module

    Please refer my project structure here I have create a project with multiple lazy loaded nested modules. On the application start up AppModule is loaded When the user clicks on login button LoginModule is loaded If the user exists i.e if login is…