Questions tagged [angular-route-segment]

A lightweight extension for AngularJS $route service which supports tree-like nested views and routes, and advanced flow handling.

53 questions
11
votes
2 answers

Invalid configuration of route '': routes must have either a path or a matcher specified

AppRouting.ts import { BrowserModule } from '@angular/platform-browser'; import { NgModule } from '@angular/core'; import { Routes, RouterModule } from '@angular/router'; import { HomeComponent } from '../buyer/home/home.component'; const routes:…
8
votes
1 answer

Angular Inject $http into config or provider into run

I am using angular-route-segment in my angular app and an trying to configure the segments from a json feed. I have having problems with this, because I can't figure out how to inject $http into the app.config function. This fails with Unknown…
gwin003
  • 7,432
  • 5
  • 38
  • 59
4
votes
1 answer

Error: Cannot match any routes, URL segment undefined

I have a parent component as a list of items TokenData with URL segment as locahost:4200/tokens, when I click each row of the list, it should navigate to a child component as each item's detail. The URL segment of the child component should be in…
Hoàng Nguyễn
  • 1,121
  • 3
  • 33
  • 57
4
votes
1 answer

Angular2: Just update the last segment of a route

I've got a route in my app in the form localhost/opportunity/:id/volunteers. I want to build a routerLink to navigate to different pages on the same level (i.e. localhost/opportunity/:id/waitlist). Following the options outlined in the API…
John
  • 9,249
  • 5
  • 44
  • 76
3
votes
2 answers

ERROR Error: Uncaught (in promise): Error: Cannot match any routes. URL Segment: 'list' Error: Cannot match any routes. URL Segment: 'list'

I have a simple app working with angular5, but I got the following error: ERROR Error: Uncaught (in promise): Error: Cannot match any routes. URL Segment: 'list' Error: Cannot match any routes. URL Segment: 'list' I'm trying to edit the…
dEs12ZER
  • 788
  • 4
  • 24
  • 51
3
votes
1 answer

Angular2 - No provider for LoggedInGuard

I'm making a Anuglar2 rc-4 web application. I'm trying to restrict routes but when i add my login guard, it tells me there is no provider. My normal login service code works fine, its just when i try to add the login guard and canActive routes. Any…
AJ_
  • 3,787
  • 10
  • 47
  • 82
3
votes
4 answers

adding or removing classes based on route changes in angular

I have 3 routes containing 3 forms Im trying to set bootstrap active class on current tab based on the current route in angular.I used angular route module. How can I achieve this. I m attaching the js code please check and help please …
kiran gudla
  • 177
  • 1
  • 11
3
votes
1 answer

Angular $route.reload() not reloading controller

I am trying to reload a route from my controller using $route.reload() but nothing is happening. Here's my controller: app.controller("FooController", function($scope, data, $route) { $scope.model = data.model; $scope.meta = data.meta; …
Charlie
  • 10,227
  • 10
  • 51
  • 92
2
votes
2 answers

Angular 2 route to the same component with different urls

How can I route to the same component but with different urls and different data, for example /exports/open - ExportsListComponent data: {exportstatus: 'open'} /exports/submitted - ExportsListComponent data: {exportstatus:…
AlexFF1
  • 1,233
  • 4
  • 22
  • 43
2
votes
2 answers

How to implement the route relative redirects with the query params and the fragment

I have one problem in developing Angular project. I tried to find the solution on how to implement the route relative redirects with When the URL redirects, in which origin redirect has its relative the query params and the fragment. For example,…
2
votes
1 answer

"Cannot read property 'untilResolved' of undefined" in angular-route-segment?

I am setting up a simple routing configuration with angular-route-segment and Angular is throwing this error on app load: TypeError: Cannot read property 'untilResolved' of undefined Neither Angular nor angular-route-segment provide anything more…
Nate Barbettini
  • 51,256
  • 26
  • 134
  • 147
1
vote
1 answer

Problem while trying to do routing in Angular

import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; const routes: Routes = [ {path: 'login', component: LoginComponent}, {path:'forget-password', component: ForgetPasswordComponent}, {path:'**',…
1
vote
0 answers

sharing data between two routes angular

i am trying to pass data between two routes called Teacher and Student.Both routes are taking the same components with another views. i have issue to pass booleans from teacher to student i was building a services like this: service : import…
hamlet
  • 21
  • 2
1
vote
1 answer

how to use different navbar for different type of user in Angular 5/4?

I'm working on a Angular5 free template that I found on github. It contains only one navbar but for my case I have 2 type of users (Admin and Manager) which do not have the same navbar at all. How can I resolve this? How can I redirect each one of…
1
vote
0 answers

how to set default view using angular-route-segment (not in index.html) angular js

In my MEAN application for nested views I am using angular-route-segment. Everything works fine with the nested views except for the initial default screen. my first page (index.html) contains header & footer with buttons connect & disconnect. This…
1
2 3 4