0

I have an angular js application and I would like to add a new page which will be accessible from a new URL. This page contains data from a web service.

How can I use $location to add a new URL and to get my page informations from a different path.

I do the following:

https://docs.angularjs.org/guide/$location#when-should-i-use-location-

function monitoringCtrl($scope, $cookieStore) {
    $scope.$root.isActive = true;
    $location.path('/monitoring');
    $location.replace();
}

when I tried the path : http://loccalhost:8080/#/monitoring, this will redirect me to the first page of my app, and not my page.

Thanks in advance.

georgeawg
  • 48,608
  • 13
  • 72
  • 95
BackToReal
  • 143
  • 1
  • 5
  • 15
  • Which UI-Router version? 0.X or 1.X? Which Version of AngularJS? The default hash bang was changed to `#!` instead of `#`. – georgeawg Jul 26 '19 at 22:59
  • Possible duplicate of [angularjs 1.6.0 (latest now) routes not working](https://stackoverflow.com/questions/41211875/angularjs-1-6-0-latest-now-routes-not-working) – georgeawg Jul 26 '19 at 23:00
  • @georgeawg C'est la version 1.X () – BackToReal Jul 30 '19 at 08:07

0 Answers0