Questions tagged [angularjs-routing]

Use for ngRoute, the built-in routing module in AngularJS, which can map the browser URL to a defined route.

Is used for deep-linking URLs to controllers and views (HTML partials).
It watches $location.url() and tries to map the path to an existing route definition.

Routes can be defined through the $routeProvider API. The $route service is typically used in conjunction with ngView directive and the $routeParams service.

See:

Related tags

1283 questions
0
votes
1 answer

What is the singnificance of the forward slash in Angular.js url?

I saw here in the Angular js documentation that A path should always begin with forward slash (/); the $location.path() setter will add the forward slash if it is missing. This is so different from what I do previously, which does not need the…
0
votes
0 answers

Configure AngularJS routes

I'm starting with AngularJS and I'm having some issues with routes. I configured my project for html5mode, I set my tag, and everything was ok. The problem comes when I try to use a bootstrap modal. The link that fires the modal is:
user2071887
  • 123
  • 1
  • 2
  • 5
0
votes
1 answer

Link route to directive? Or another way?

I have an unusual question. I have this old page that I want to convert to angular.js. http://transience.me/TD/ I have 5 pages worth of html loaded on one page and the only visible portion is the part that has been navigated to. i.e. home is at x…
Dr. Chocolate
  • 2,043
  • 4
  • 25
  • 45
0
votes
1 answer

AngularJS: Refrain from changing the browser location URL to stop user from bookmarking an error page?

I have a form that I need to submit, if something goes wrong I would like to show an error page, I have a controller and view for this but I would like for the browser location textbox not to change to avoid the user from bookmarking the error…
Martin
  • 23,844
  • 55
  • 201
  • 327
0
votes
0 answers

AngularJS routing failure

Please can someone tell me why the Views are not being inserted into the ng-view placeholder? I'm using the standard Visual Studio MVC project template with a HomeController and all my .cshtml files are in /Views/Home I'm browsing to…
Bobbler
  • 633
  • 1
  • 7
  • 21
0
votes
2 answers

Angularjs - using $routing - when I manually put "#/section/ + myId" , it resets my page

So I am trying to implement routing in my app. Here is a sample jsFiddle of what I am trying to do: http://jsfiddle.net/GeorgiAngelov/9yN3Z/114/ So far everything is working fine and as I am moving through the sections, my routing changes and…
Georgi Angelov
  • 4,338
  • 12
  • 67
  • 96
0
votes
1 answer

how does angular's routing rewrite the address bar when I hit a page directly?

So I am trying to understand angular's routing/address rewriting behaviour logic when I hit a page's address directly i.e. go to index.html instread of just'/'. (You might question why I am doing that. Its because I am trying to use Angularjs in an…
Scott Wright
  • 186
  • 1
  • 11
0
votes
3 answers

AngularJS routing for dynamic urls, how?

I'm trying to understand how can i configure my angularJS routing given the following case: We have a search page where we display the search results based on tags provided (1..n tags). we would like that a user to be able to parse enter a url as…
Or A
  • 1,789
  • 5
  • 29
  • 55
0
votes
1 answer

Page reload using angularJs

I am newbie to angularJS. I have started learning with CRUD operation. I am getting a problem that when I delete an entry then the page should reload I have gone through $location and $route too. and implementing as follow : config app.config(…
Rohitashv Singhal
  • 4,517
  • 13
  • 57
  • 105
0
votes
1 answer

Angularjs - one page application with stored JSON data for offline use

I'm looking into using AngularJS for an upcoming project but I am having difficulty getting my head around the views/routing, specifically for an app with only one page. The page consists of a form or wizard, however I want all data to be loaded on…
jmc
  • 620
  • 14
  • 24
0
votes
0 answers

angularjs, make router work for same url but with different number of GET parameters

is there a posiibility to tell angularjs route config to ignore get parameters, like we have a page with list of items with url: site.com/request/list, router works fine but when we add sorting/filtering we have to show the same page, but router…
Cassius
  • 153
  • 1
  • 14
0
votes
2 answers

AngularJS nested routes example questions

Any explanation why the sample code (ui-router/sample/index.html) for angular-ui-router (https://github.com/angular-ui/ui-router) looks like this. Specifically: Why the nested definitions of objects like controllers? Why the specification of…
justingordon
  • 12,553
  • 12
  • 72
  • 116
0
votes
1 answer

AngularJS $location.path() changed after upgrading to 1.1.15

I have a NavigationController that has a selectedItem for the current selected item in a navigation list. It uses $location.path() to try and set it to a default value. It's in hashbang mode. Here is a simplified…
chubbsondubs
  • 37,646
  • 24
  • 106
  • 138
0
votes
1 answer

Controller doesn't work after URL change

In short: I have a controller that triggers some jQuery in my AngularJS web page to fade out a play button and a corresponding image. But, when the URL changes, the controller fails to work on subsequent pages. I'm using a dynamic URL, and I think…
0
votes
1 answer

ngController method called twice

I've got an angularjs app with a nav bar inside my index.html page like that :