angular-routing

    3熱度

    2回答

    我有應用程序的結構是這樣的: 1. app 1. Shared Module 2. Modules 1. ExternalSourceModule Child Modules 1. SourceModule 2. EntityModule ExternalSourceSharedModule ExternalS

    0熱度

    1回答

    我有一個角(4.2.5)的應用程序,並在我的代碼的某個時刻,我這樣做: this._appService .post('/createhero/save', opts) .subscribe( (resData: any) => { this._router.navigate(['home']); } ); 路由器調

    2熱度

    2回答

    這裏是我的代碼, <!DOCTYPE html> <html ng-app="myApp"> <head> <title></title> <link rel="stylesheet" type="text/css" href="css/bootstrap.min.css"> </head> <body> <script src="lib/jquery.m

    1熱度

    1回答

    我的路由配置如下: { loadChildren: './public#PublicModule', path: '' }, { loadChildren: './home#HomeModule', path: 'home' }, { path: '**', redirectTo: '/404' } 在一些模板(如果它很重要,我們稱之爲xxx.component.html)我創建了一個按鈕

    0熱度

    1回答

    我跟隨this tutorial。這是我發現測試路由的唯一現代示例。我希望能夠使用模擬組件。可悲的是,the delivered plunker不起作用。 路由器:應用程序導航到 「」 您重定向到/ home 預計'是 '/家'。 和 路由器:應用程序導航到 「搜索」 把你帶到/搜索 預計'是 '/搜索'。 有同樣的問題,如果我更換: imports: [ RouterTestingModule.

    0熱度

    1回答

    我構建了一個具有根模塊的應用程序,然後在此模塊下有3個子模塊。在模塊1中,有一個組件可以在模塊3中重複使用,但是,如果我直接訪問模塊3中的組件URL,組件將永遠不會加載(我認爲發生這種情況是因爲模塊1未加載)。我已經嘗試過的部件從模塊1導出和根模塊引導它,但我得到一個錯誤,指出組件選擇沒有被發現 ---編輯--- 根模塊 @NgModule({ declarations: [

    0熱度

    1回答

    我的Angular應用程序的路由有問題,它在URL上添加括號時應該不會。 我有一個'深'嵌套路由,所以我一直在嘗試不幸的方法。 我只有在嵌套的最底部的問題,所以最後的路線可能 ,我希望這樣的: http://localhost:4200/#/customers/1/overview 我得到這個: http://localhost:4200/#/customers/1/(overview) 我去耦從

    0熱度

    1回答

    我有一個頭和頁腳一個簡單的主模板的應用程序,像這樣 <section style="margin-bottom:70px"> <nav-menu></nav-menu> </section> <section> <router-outlet></router-outlet> </section> <section> <foot></foot> </secti

    0熱度

    1回答

    我目前正在使用angular-cli項目。但是,在通過router.navigate導航組件加載組件後,運行組件構造函數時,ngOnInit和ngAfterViewInit掛鉤不會激活。 我在這條路線是/login,我要前往/controlpanel 我讀過https://github.com/angular/angular/issues/8012,但遺憾的是沒有幫助,因爲polyfills不影響

    0熱度

    1回答

    我有一個類似於http://example.com/login/?redirect="/user#account"的URL,因此我在此存儲redirect值,並使用它在成功登錄後導航到該頁面。如果redirect查詢中沒有任何# (hash)值,那麼這可以正常工作,但如果它具有該值然後將該值重定向到該路由,即使用戶未登錄,它也應該重定向到http://example.com/login/#/log