Questions tagged [ngroute]

AngularJS module providing routing, deeplinking services and directives for AngularJS apps.

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

Resources

879 questions
5
votes
2 answers

angular 2 routing need to click twice to trigger ngOnInit

The problem is that in routing i have to click twice to trigger ngOnInit code. The weird thing is, if I have two routes: A and B, and I clicked on A first, it will trigger the constructor only, and if I clicked on B after it, it will trigger A's…
user5049376
  • 1,322
  • 2
  • 14
  • 19
5
votes
4 answers

Login Page without Index.html Design - ngRoute (AngularJS)

I'm using ngRoute to do the routing of my AngularJS application (myApp) but I have a problem: I don't know how to NOT APPLY my index.html design (with all my sidebars) to my login.html page, which seems to be applied by default if it is defined as a…
Ariana
  • 499
  • 1
  • 7
  • 13
5
votes
2 answers

Angular-routing, direct URL navigation

I have an angular app defined on my index.html file. Using angular-routing i am routing a link named /erez to load a view with a template. It's working inside the app - when I click the link to /erez from the navbar on index.html it works…
DeanLa
  • 1,871
  • 3
  • 21
  • 37
5
votes
4 answers

Force reload route/state on link click

Currently I'm doing something like this link.on('click', function () { if (link.attr('href') !== $route.current.originalPath) return; $route.reload(); }); I'm not aware of side effects but I guess there can be some. Is there more…
5
votes
2 answers

Render initial Angular ng-view on server-side and take it from there

I want to avoid the latency in display of initial JavaScript-rendered views. I want the user to see content immediately and have Angular take it from there. I do not want to just replace this ng-view when Angular ngRoute kicks in as a blink will…
5
votes
1 answer

AngularJS, AngularUi (Bootstrap) and NgRoute

Im using AngularJS 1.4.1, ngRoute 1.4.1 and https://angular-ui.github.io/bootstrap/ The base structure is
and I use ngRoute to load each page of my…
Bob
  • 51
  • 1
  • 3
5
votes
1 answer

Angular ngRoute - Cannot GET page if enter url manually

I'm a beginner to AngularJS and have the following question. I'm playing with ngRoute module and this is my code so far: html:
5
votes
4 answers

angularjs maintain the scope variable across routes

How do I maintain the model across routes. for eg I have a list of profiles loaded onto the home page. The home page also contains a "load more" action to load more profiles, basically pushing data to the model. On clicking of a specific profile,…
4
votes
2 answers

Getting rid of #! in angularjs ngRoute

I'm working with Angularjs ngRoute for SPA with Node.js as my backend, I have 3 pages in my website say: localhost:8000/#!/ localhost:8000/#!/red localhost:8000/#!/green By googling I found the way to get rid off /**#!**/ and it worked fine only…
anna poorani
  • 690
  • 1
  • 8
  • 17
4
votes
1 answer

controller with this name is not registered in angularjs ngroute

I am creating a web app in mvc-angularjs, I am using ngroute. Angularjs controller in my layout with html code:



user6656728
4
votes
3 answers

ngResource query with composite key parameter

I have a resource, Answer, which has a composite key made of QuestionnaireId and QuestionId. The ngResource code is as follows: function answerResource($resource) { return $resource("/api/answers/:questionnaireId/:questionId", { …
Sean
  • 14,359
  • 13
  • 74
  • 124
4
votes
1 answer

Using Angular route in webapi application

I'm not sure how can I implement proper Angular routing in web api application. I'm able to open the pages using this approach: http://localhost:52876/HTML/app/borrower.html The Angular controller loads fine and all functionality is there from the…
Laziale
  • 7,965
  • 46
  • 146
  • 262
4
votes
1 answer

Are there a progress with backporting Angular 2 Router into Angular 1?

As I understand ngComponentRouter (ngNewRouter) has been deprecated. And I didn't find any other alternatives but ngRoute & ui-router, which are obviously not designed to work with components.
mrded
  • 4,674
  • 2
  • 34
  • 36
4
votes
3 answers

CSS not loaded in other views when routing in angularjs

Hey so I'm routing between views in Angularjs using routeProvider and ng-view. My issue is that my css does not get loaded when the route changes. I tried including Angular-css so that the css could be included in each view but it doesn't seem to…
Paul Bridi
  • 99
  • 1
  • 6
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…
1 2
3
58 59