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
1
vote
1 answer

AngularJS routing issue bad url

Have generate my route in my app: app.config( function($routeProvider){ $routeProvider .when('/',{ templateUrl: './partials/home/home.html', controller: 'mainCtrl'} ) .when('/article',{ …
darkiron
  • 1,174
  • 1
  • 10
  • 20
1
vote
1 answer

ngRoute not working: [$compile:tpload]

Im new to angularjs so its hard for me to figure this thing out. Im getting error of [$compile:tpload]. What could be a problem here? HTML:
...
Access JS: var App =…
Vanagasa
  • 13
  • 5
1
vote
1 answer

AngularJS Routes Created from json data all same view template

I need to make a post-type in my simple angular app... I have a json file with contacts { "contacts": [ { "name": "Alf", "tel": [ { "home": "0134567890" } ], "address": "1 A…
Omar
  • 2,726
  • 2
  • 32
  • 65
1
vote
1 answer

How to refresh or reload assets after route in angularjs?

I have a website with animations effects. When I load the page for the first time, everything works. But, if I navigate by routes, "/", "/about", this animations dosnt start. Here an example with screenshots: First load "home.html": Everything…
Federico Ribero
  • 309
  • 4
  • 20
1
vote
1 answer

Node.JS and AngularJS Routes with API routes

So I am using Node.JS with Express as my backend and my servlet for API. I'm using AngularJS as my front end. Through many Google searches, I finally solved my problem of using ngRoute with AngularJS and Node.js. And ended up with this: var index =…
1
vote
1 answer

my angular routes have a '#%2F' before the actual URL I have defined in the app.js

I am setting up my angular routes in the app.js as so: .config(function ($routeProvider) { $routeProvider .when('/', { templateUrl: 'views/main.html', controller: 'MainCtrl', controllerAs: 'main' }) …
Muhammad Ali
  • 119
  • 3
  • 13
1
vote
1 answer

Inhibit google map reload on Angularjs route change

I have a google map as the background for my site. It is used on separate routes to add a visual feature to data shown in the various routes. I would like to make sure this does not get reloaded on every route change which causes a flash of white…
1
vote
0 answers

ng-click and ngRouting on mobile devices

I am completely new to Angularjs and haven’t been doing any code for ages. I started setting up my website again with Angularjs. I have a main page and an about page, to which the user gets via ngRoute on ng-click (or hitting space). Once on the…
1
vote
1 answer

How to group routes using angular ui-router?

How to group routes in ui-router? For example, i have following routes in my app #/products/p1 #/products/p2 #/products/p3 One way of defining states will be, .state(‘products.p1’) .state(‘products.p2’) .state(‘products.p3’) But i am looking for…
1
vote
0 answers

route pattern understanding with the help of ngRoute

You may call it reinventing the wheel, however, I'd like a senior architect level to answer this, especially who knows the underpinnings of angular js especially or can do himself in plain vanilla JavaScript. Although Angular is more sophisticated…
1
vote
2 answers

Multiple controllers working within ngRoute example

I have a small ngRoute example I am trying that to use multiple applications and controllers with. The first app/controller is for the main page, while the second set of app/controller is for the html that ngRoute loads up after pressing a button. …
mherr
  • 348
  • 1
  • 7
  • 25
1
vote
1 answer

Route with directive as template

How to pass a fields variable to directive in ng route configuration, Or in another phase? .when('/test',{template:""}) How to assign param to directive in routing phase?
Mhd Wael Jazmati
  • 636
  • 9
  • 18
1
vote
2 answers

Angular view change resets $scope variables

Say I have two views that share a controller. Both views use the ng-route service. If a scope variable is changed in one view and then you switch to the second view, how come the second view doesn't update? Example: My controller has a variable that…
nj51
  • 15
  • 2
1
vote
1 answer

How to stop the redirecting to a page when it was not triggered by an click event

I am trying to develop an single page web application using angular js. Now when i click a AddFilm button it redirects to the AddNewFilm.html where a message will be displayed and buttons will be hidden in the current view ,for routing i used the…