62 questions
2
votes
2
answers
105
views
Underline the selected navitem after open link in new tab
I have a navbar that the selected/active navitem is recognizable by an orange underline. However, when I open another navitem in a new tab (by rightclick), the default navitem is underlined and not ...
0
votes
1
answer
775
views
Angular RouterLink Issue
Object:
I have a menu with a searchBarInput
on InputValueChange
=> update the url by adding a key search with the input value
=> it work well but by doing that I destroyed the sidebar ...
0
votes
1
answer
508
views
Navigating to the current URL of a named (nested) router nests the route call
I have a base ClazzComponent, ClazzModule and ClazzRouting Module. The ClazzComponent is rendered through the primary <router-outlet> in my AppComponent.
The ClazzComponent has a ...
0
votes
1
answer
92
views
How do parent link in Angular and then click on child link get other style
I need do parent link. I did, but sure it correct.
When I click routerLinkActive="router-class" , child and parent link can to get class "router-class",
but I when click on child ...
0
votes
1
answer
2k
views
router-link VueJS can't link to an element in the same page
I'm trying to developp a sidebar of a documentation who it links to elements on th same page
<div class="mt-6">
<li class="relative">
&...
0
votes
1
answer
495
views
item menu: define a routerlink active by default when launching the application
It’s all in the title, I’d like the first item of my menu to take the
'primary' style of angular material.
Here is my code that works only when I clicked on a menu item
<div class="menu&...
1
vote
1
answer
519
views
routerLinkActive on parent element not working when routerLink is not directly inside parent, but in seperate component
I want to set a class on a div when one of the routes inside that div is active. This works all fine with the routerLinkActive directive when I put links with a routerLink directive directly inside ...
1
vote
2
answers
710
views
routerLinkActive id coupled with [ngClass]
Below web-link demonstrates the routerLinkActive id working when used as a boolean value for a distinct HTML element' [ngClass]
https://stackblitz.com/edit/routerlinkactivesimple?file=src%2Fapp%2Fapp....
-1
votes
1
answer
72
views
Using ActiveRouterLink directive is not working as aspected
This is the current router setup and it works fine.
this is a lazy loaded module under the path search
so the url's become as follows...
search/all
search/web
search/guides
search/user
search/books
...
2
votes
1
answer
287
views
routerLinkActive class dosen't apply if there is already a class present to that component
I came across a wired problem where I have an angular material sidebar and in that I have buttons used for routing the applications let me put the code below
<div fxLayoutAlign="start stretch&...
3
votes
0
answers
381
views
How to make RouterLinkActive got an access to RouterLink which is provided within ng-template
Is there any way to provide an access to ContentChildren which are inside ng-template?
If you look at the example you see the issue - the routerLinkActive directive does not see any routerLink ...
2
votes
3
answers
29k
views
Angular routerLinkActiveOptions
I have some link like this
<li routerLinkActive="active" class="nav-item">
<a [routerLink]="['contracts']"
[queryParams]="{ activeOnly: false }"
class="nav-link">Contracts</a>
<...
-2
votes
1
answer
442
views
routerLinkActive not working for <li> and <a> Combination
The links below Works for me:
<li routerLink="/profile/education" [routerLinkActive]="'active-link'">Education</li>
<li routerLink="/profile/education" [routerLinkActive]="'active-...
0
votes
1
answer
510
views
Vuejs active router link does not work, tried multipled ways
I cannot make the active button (router-link tag) to light up.
Here is my code:
<div class="bottom-buttons">
<span v-for="button in buttons" class=...
0
votes
1
answer
2k
views
How to apply Angular routerLinkActive for tab component that sharing same path
I've created a page using angular material with sidebar and tab. Im using angular 7. Here is sample image ->
sample image:
When I navigate to content tab, is-active class no longer apply to ...
1
vote
1
answer
1k
views
Angular 7 activated routes all active after refresh
When I reload/refresh my app the routes in the menubar are displayed and all of the items are set to active. I have configured for the Routes:
export const routes: Routes = [
{
path: '', ...
2
votes
4
answers
5k
views
on router link active change icon
<div class="menuItem mb-3" *ngFor="let menuItem of menuItems">
<a routerLink="{{menuItem.link}}" routerLinkActive="active">
<img src="{{menuItem.icon}}" alt="{{menuItem.name}...
1
vote
1
answer
911
views
Angular 6 and PrimeNG p-table (Tables)
Using a route with children in it. The parent route is recipes.component and in it, I includes a recipe-list.component and the .
The recipe-list.component utilizes the PrimeNG p-table and when you ...
1
vote
1
answer
3k
views
angular RouterLinkActive not matching child paths
I am relatively new to Angular and am trying to get a highlight to work on my NavBar. I have been through some other articles but they are not quite helping.
In my app-routing.ts file
const routes: ...
8
votes
1
answer
23k
views
Angular 6 routerLinkActive not working
I am building a site using Angular 6 and have been stuck for a few days now on a problem. I am trying to change text color (list items) on a navbar based on the active page. I have seen examples on ...
19
votes
6
answers
21k
views
Angular routerLinkActive for multiple paths
In my Angular 5 project I've got a bootstrap nav-bar menu. routerLinkActive does work nicely when the start of the path matches the routerlink of the menu, like:
<li [routerLinkActive]="['active']"...
0
votes
2
answers
2k
views
How to add css class to a active in-page-link (hashtag link) - Angular
I have an Angular, single-page-website with the next layout
<body>
<!-- Header -->
<div class="header">
<a [href]="{{ '#' + page1_Id }}">Page1</a>
<a [...
0
votes
1
answer
569
views
Router link active is not working properly with ngModel
I am working with routing and using routerLinkActive to make a link active. Link is not activated when using ngModel in html.
This is the exact scenario..
In component I am calling web service which ...
2
votes
2
answers
3k
views
RouterLinkActive is not set after reloading a page
I am working with routing and navigation. I am using [routerLinkActive]="['active']" to make a link active. It works fine when I navigate to other route.
But when current page is refreshed, '...
2
votes
0
answers
1k
views
Angular Material 2 Tab Links unable to set default active tab
After a successful login on the login page, the route changes to the "inbound" view, which has two tabs in the navbar, "inbound" and "outbound". I'd like for the "inbound" navtab to be already ...