Questions tagged [angularjs-ng-route]

The ngRoute module provides routing and deeplinking services and directives for angular apps.

From Angularjs documentation:

The ngRoute module provides routing and deeplinking services and directives for angular apps.

See $route for an example of configuring and using ngRoute

Resources

328 questions
4
votes
0 answers

Dynamically building AngularJS routes at runtime based on JSON config

I have a JSON config that I'd like to build my angular routes based off of. In essence, I'd like the angular app to fetch the json, build the routes, then bootstrap the application. I've come up with a working solution, but it doesn't seem to follow…
4
votes
3 answers

How to change the view from controller in angular js?

I am new to angular js and trying to work with ng-view and ngRoute directives. I have a loginPage.html in which i have code for login button written as follows and on clicking…
Minions
  • 1,273
  • 1
  • 11
  • 28
4
votes
0 answers

Angular ngRoute: How to temporarily disable reloadOnSearch?

In AngularJS 1.4.8 with ngRoute, I am trying to capture search parameters from the URL and then clear them from the URL without reloading the route. This can be achieved easily enough by setting reloadOnSearch: false in my route config. However,…
Shaun Scovil
  • 3,905
  • 5
  • 39
  • 58
4
votes
1 answer

Angular Controller not found

Problem Definition I am using AngularJS's ngRoute module for the first time and I am running into some trouble with it. I have a index.cshtml page in which I reference my routingModule by setting the ng-app. I also have a ng-view so that when I…
user1022425
  • 63
  • 1
  • 5
4
votes
2 answers

ng-Route is not loading the view, a blank screen is displayed without any errors

I am trying to creae an application in angular using ng-route but i cannot get it to work. I did search the issue and tried suggestions like to move my ng-app to but nothing seems to work. I have added a plunker link…
naah
  • 43
  • 1
  • 6
4
votes
1 answer

Getting $injector:modulerr after including ['ngRoute']

Having a $injector:modulerr error after including ngRoute. Using AngularJS 1.2.26 var app = angular.module('myApp', ['ngRoute']); app.config(function ($routeProvider) { $routeProvider.when('/', {controller: indexController1, templateURL:…
KaA6438
  • 108
  • 1
  • 7
3
votes
0 answers

Using `history.replace` with Angular 1.x

I need help using history.replaceState on an Angular 1.x app. My Chrome extension interacts with someone else’s app, and I want to load a Url in that app with an extra query parameter that my extension can read, and then use history.replaceState to…
3
votes
2 answers

Angular Route for sub folder gives error

I have written 2 ng-app in one project, one is user and the other admin. To remove the # from the url I had used the below code in both app.config function $locationProvider.html5Mode(true); and in app/index.html and in…
ekta
  • 67
  • 10
3
votes
1 answer

checklist-model module does not work when using ng-route

I was trying to use [checklist-model] (https://github.com/vitalets/checklist-model) module in my app but I caught an error that I have figured out it was because of using (ngRoute) module in the same app. var mainMod = angular.module('MainApp',…
t.tah
  • 53
  • 4
3
votes
1 answer

Is it possible to use multiple views or nested views in ngRoute angularjs?

.when('/login', { templateUrl: '/Login/_Login.aspx', controller: 'LoginCtrl', caseInsensitiveMatch: true, resolve: { deps: ['$ocLazyLoad', function ($ocLazyLoad) { return $ocLazyLoad.load([{ …
Sachin
  • 142
  • 8
3
votes
1 answer

How to load template from dropdown menu Angular

I am fairly new to angular and am working with a client that wants a dropdown allowing users to select their neighborhood which is then saved in a cookie to load upon return. I am able to save cookie but am having trouble getting dropdown selected…
3
votes
2 answers

Using Adal.js with $stateProvider

We have an AngularJS SPA, and we have been using Adal.js for authentication. Till now we were handling the routes using $routeProvider (ngRoute module), but due to some recent requirement, we need to move away from the route provider method and…
3
votes
1 answer

Build breadcrumbs with custom names

I'm trying to make my own breadcrumbs service for a web app I'm coding. The only issue is that I want to have custom names for the breadcrumbs, as in their names are not going to be in the path. One idea I have is to replace all
SpooXter
  • 119
  • 1
  • 10
3
votes
1 answer

AngularJS Application not booting

I am trying to start an angularjs project, however for some reason I can't seem to get it started correctly. It probably is some kind of mistake that I am to blind for to see. Here is the code:
muuk
  • 932
  • 1
  • 7
  • 15
3
votes
1 answer

Angular ngRoute conditional .when()

I'd like to implement a conditional .when(), like this: .when('/abc', { // if MyService.allow == true template: '' // else redirectTo: '/' }) My /abc route shall be like "secured" by a variable hold in one of…
BAERUS
  • 4,009
  • 3
  • 24
  • 39
1
2
3
21 22