Questions tagged [angular2-router]
119 questions
0
votes
0 answers
Angular 2 [routerLink] Not Resolving in Browser
Without adding too much code or documentation to my question, I'm having a resolving issue with the [routerLink] code for our Angular 2 Demo:
Versioning
Node.js - v4.4.7
@angular - 2.0.0-rc.1
app/app.component.ts
@RouteConfig([
{
path:…

Mindsect Team
- 2,311
- 5
- 29
- 36
0
votes
1 answer
Angular 2 routes current url with params
I'm trying to use Angular 2 rc-4 with new Router.
export const appRoutes:
RouterConfig =[
{
path: "",
component: HomeComponent,
terminal: true,
data: {
title: "Home"
}
},
{
path: "Users",
…

Vladimir Rodchenko
- 1,052
- 15
- 25
0
votes
1 answer
Nested Routing in angular2
Hello All Angular2 Developers,
Here is a challenge I am facing and not knowing how to resolve it.
I have my app.component.ts file as follows:
import { Component } from '@angular/core';
import {ROUTER_DIRECTIVES} from '@angular/router';
import {…

Baradwaj Aryasomayajula
- 1,184
- 1
- 16
- 42
0
votes
0 answers
Using ROUTE_DIRECTIVES outside AngularJS 2 main component
I started developing a new application in AngularJS 2 and I got stuck planning it.
I got a bootstrap template with a sidebar menu and a content div.
Sample of HTML:
...
0
votes
1 answer
RouteConfig function not found in angular2 rc4 issue (plain JS)
After upgrading to RC4 I have this issue configuring router:
ng.router.RouteConfig is not a function
I am using plain JavaScript.
This is how I bootstrap:
ng.platform.browser.bootstrap(AppComponent,[
ng.router.ROUTER_PROVIDERS,
new…

Daniel Dudas
- 2,972
- 3
- 27
- 39
0
votes
2 answers
Angular2 rc3 injecting router into tests
Since I upgraded to Angular2 rc3 any tests that need the Router injected are now failing. Previously I was using the ROUTER_FAKE_PROVIDERS available from the router/testing file but that doesn't seem to exist any longer. Any suggestions?

HomeBrew
- 849
- 2
- 12
- 25
0
votes
1 answer
Angular2 router 3.0.0-alfa7. Can't navigate to route
Angular2 version: rc3
Router version: 3.0.0-alfa7
boot.ts:
import { provideRouter, RouterConfig } from '@angular/router';
import {AppComponent} from "./main/app.component"
import {UsersComponent, UserListComponent, UserEditComponent} from…

forik
- 149
- 4
- 15
0
votes
2 answers
Error 404: Cannot found @angular/router/bundles/router.umd.js
I am setting up routing in Angular 2, and everything is the same based on the documentation from their website.
Here is an example of my import in my app.component.ts
import {Component} from '@angular/core';
import {ROUTER_DIRECTIVES} from…

Mix Austria
- 925
- 2
- 15
- 35
0
votes
1 answer
Child routes are not allowed for "/". Use "..." on the parent's route path
I have a parent page kms.html which is loading with router-outlet which loads Login page and my landing page based on login I implemented routing ... now after routing to my landing page which again have router-outlet, in landing component if I…

sudhir
- 1,387
- 3
- 25
- 43
0
votes
1 answer
Prevent the duplciate path/route usage in the routerLink
Thats my html file:
Tests
This terminal route is already defined the parent component Routes configuration.
Due to maintaining my software I would like to declare kind of a constant string and re-use it from my…

Pascal
- 12,265
- 25
- 103
- 195
0
votes
0 answers
How to load an angular2 app into another Angular2 app
I have an angular2 app that has a navbar, a sidebar and a content-area at: http://localhost:4200/
When navbar/sidebar items are clicked, I want the content-area to get it's content from other angular2 apps we will have set up, kind of like a…

user1873196
- 57
- 2
- 8
0
votes
1 answer
angular2 router.navigate along with data - hide data from URL
I want to navigate to some page in angular2 along with data, while doing so data is coming in URL. Is there a way to pass data without showing it in URL?
I'm using the following code:
this._router.navigate('test',{hugeJsonData:…

Krishna
- 1,865
- 4
- 18
- 26
-1
votes
1 answer
Why are Angular 2+ Router route definitions Javascript Objects instead of Typescript Classes?
The default use of the Angular 2+ Router involves adding route definitions to the app-routing module.
app-routing.module.ts
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { AboutComponent }…

Logan Kitchen
- 744
- 3
- 13
- 26
-2
votes
2 answers
Angular 2 routing with interpolation
I have category drop down, Based on category i want to update menus router link.
Lets consider I have selected Category1 then SubMenu1 router link should be
BASE/category1/submenu1. same way for category 2 router link should be…

Amol Hegana
- 147
- 1
- 10