[英]Navigating to the current URL of a named (nested) router nests the route call
我有一個基本的 ClazzComponent、ClazzModule 和 ClazzRouting 模塊。 ClazzComponent 通過我的 AppComponent 中的主要<router-outlet>呈現。 ClazzComponent 有一個 SlideOverComp ...
[英]Navigating to the current URL of a named (nested) router nests the route call
我有一個基本的 ClazzComponent、ClazzModule 和 ClazzRouting 模塊。 ClazzComponent 通過我的 AppComponent 中的主要<router-outlet>呈現。 ClazzComponent 有一個 SlideOverComp ...
[英]Angular routerLinkActive not working when navigating using skipLocationChange
假設我有以下路線: 在這樣的路徑上,我a一些與routerLinkActive類的 Navbar 鏈接: 當我使用skipLocationChange從路徑a導航到路徑b時出現問題 瀏覽器 url 沒有改變,它仍然在/a上,視圖更改為組件 B,但routerLinkActive不應用is-activ ...
[英]How do parent link in Angular and then click on child link get other style
我需要做父鏈接。 我做了,但確定它是正確的。 當我單擊 routerLinkActive="router-class" 時,子鏈接和父鏈接可以獲取類“路由器類”,但是當我單擊子鏈接時 - 父鏈接必須更改獲取類 routerLinkActive="router-class-other-style"如果 ...
[英]router-link VueJS can't link to an element in the same page
我正在嘗試開發一個文檔的側邊欄,它鏈接到同一頁面上的元素 當我使用a標簽時,我可以在每個元素之間導航,但我不知道如何設置活動鏈接的樣式當我使用router-link更改 URL 但頁面停留在當前元素上時,它不會to屬性上的指定元素。 使用router-link我可以輕松地設置活動鏈接的樣式: ...
[英]How to switch icon when containing class 'active' in Vuejs
我有一個帶有圖標的底部導航欄。 當路由器鏈接具有“活動”類時,它怎么會變成活動圖標? 默認圖標 1 處於活動狀態。 ...
[英]item menu: define a routerlink active by default when launching the application
一切都在標題中,我希望菜單的第一項采用“主要”風格的棱角材料。 這是我的代碼,僅當我單擊菜單項時才有效 我怎樣才能做到這一點 ? 謝謝 ...
[英]How to apply styles to an active router-link in Vuejs
我有一個包含多個這樣的側邊欄項目的側邊欄 側邊欄項目有這樣的路由器鏈接 路由器配置有linkExactActiveClass: 'active', 我應該怎么做這里的活動側邊欄項目的樣式 ...
[英]routerLinkActive on parent element not working when routerLink is not directly inside parent, but in seperate component
當該 div 內的一條路由處於活動狀態時,我想在該 div 上設置 class 。 當我將帶有 routerLink 指令的鏈接直接放在 div 中時,這與 routerLinkActive 指令一起工作得很好:<div class="menu" routerLinkActive="activ ...
[英]Routerlink isExactActive change image Vue
有沒有辦法做這樣的事情: Img src 應該取決於鏈接是否完全處於活動狀態。 如果活動 pic_active 應該顯示,如果不是活動 pic-inactive 應該顯示。 我怎樣才能使這項工作? 我是 vue 的初學者,我一直在尋找幾個小時...... 謝謝! ...
[英]routerLinkActive id coupled with [ngClass]
下面的網絡鏈接演示了 routerLinkActive id 在用作不同 HTML 元素的 boolean 值時的工作 [ngClass] https://stackblitz.com/edit/routerlinkactivesimple?file=src%2Fapp%2Fapp.module ...
[英]How to add active navigation based on URL in angular?
這是我的問題——我創建了一個帶有 RouterLink 指令的導航欄,我希望我的導航鏈接對當前的 URL 路徑有效,所以我使用的是 RouterLinkActive 指令。 但是我的 CSS 活動 class 沒有更新到任何 URL 路徑。 我不知道為什么。 這個問題有什么解決辦法嗎? 這是我的代 ...
[英]Using ActiveRouterLink directive is not working as aspected
這是當前的路由器設置,它工作正常。 這是路徑search下的延遲加載模塊所以網址變成如下...... search/all search/web search/guides search/user search/books 現在我收到了一個刪除“/所有”的請求,只使用 url 作為search ,所 ...
[英]routerLinkActive class dosen't apply if there is already a class present to that component
我遇到了一個有線問題,我有一個 angular 材料側邊欄,並且我有用於路由應用程序的按鈕讓我把代碼放在下面 所以我在 css 文件中使用如下應用默認樣式的按鈕 下面是我想在 routerLink 處於活動狀態時應用的樣式 但是選定的樣式沒有得到應用我嘗試了各種技巧來應用它,但無法像使用 route ...
[英]Style button of dropdown toggle depending on RouterLinkActive of nav-link
我的導航欄包含 3 個項目:2 個帶有<a>元素的<li>和一個下拉 btn-group。 當遵循導航鏈接下拉選項之一時,我想突出顯示下拉切換按鈕。 這是我的代碼: 我想根據下拉菜單項的 routerLinks 之一是否處於活動狀態來更改按鈕的樣式。 但是,由於按鈕本身不 ...
[英]DxDataGrid does not trigger routerLink when keyboard navigation
我正在使用 devextreme 數據網格。 我有下一個代碼: 每當我單擊一行時,它都會按預期工作,但是當鍵盤導航(向上和向下)時, selectedRowKeys[]會更新,但 routerLink 不會觸發。 我也有 routerLinkActive 的問題。 它不會“突出顯示”活動鏈接。 參 ...
[英]Angular routerLinkActiveOptions
我有一些這樣的鏈接 您在 params 中看到我有?activeOnly=false當我的 url 像這種方法時一切正常 contract?activeOnly=false active css class 添加到 html 中,用戶可以看到它是活動鏈接我遇到的問題是有時 url 可以像這樣的合同 ...
[英]Angular: clean way to bind template var based on active routerlink
構建一個Angular 4應用程序,但是我也會接受一個適用於v5 +的答案。 我有一個由導航按鈕組成的導航欄,如下所示: 我知道我可以根據當前路由是否將按鈕的routerLink與以下內容匹配,將自定義類“ active”添加到元素: 但是,我需要一種基於此條件(無論路由是否當 ...
[英]routerLinkActive not working for <li> and <a> Combination
以下鏈接對我有用: 但鏈接對我不起作用: 我想知道li和組合有什么問題? ...
[英]Add Active class for multiple routes in Angular
我有一個帶有多個選項的側邊欄。我將routerLinkActive類設置為在單擊時使特定選項處於活動狀態,但是現在如果我從該路線走得更深或其他路線,則該活動類別將被刪除。我想保持一個選項處於活動狀態多條路線。 我的HTML代碼如下。 如您在第一張圖片中看到的那樣,路由是['/' ...
[英]Vuejs active router link does not work, tried multipled ways
我無法使活動按鈕(路由器鏈接標簽)亮起。 這是我的代碼: 當我打印$route.path它返回正確的路徑,而button.path是我在數據對象中的數據,它可以工作。 所以情況應該是正確的。 但是'is-active'類沒有被激活。 (此主題: VueJS精確活動類 ) ...