Skip to main content

Questions tagged [routes]

Questions about mapping URLs to Controllers and Actions.

routes
244 votes
10 answers
81k views

Is it possible to make an ASP.NET MVC route based on a subdomain?

Is it possible to have an ASP.NET MVC route that uses subdomain information to determine its route? For example: user1.domain.example goes to one place user2.domain.example goes to another? Or, can ...
Dan Esparza's user avatar
  • 28.3k
8 votes
1 answer
5k views

Multiple levels in MVC custom routing

I am trying to build my own little cms. I created an abstract pageBase class that is inherited by Static, Reviews, Articles, News. Each having there own controller methods. My problem is that I need ...
James Andrew Smith's user avatar
680 votes
31 answers
756k views

How to detect a route change in Angular?

I am looking to detect a route change in my AppComponent. Thereafter I will check the global user token to see if the user is logged in so that I can redirect the user if the user is not logged in.
AngularM's user avatar
  • 16.5k
386 votes
10 answers
604k views

Send data through routing paths in Angular

Is there anyway to send data as parameter with router.navigate? I mean, something like this example, as you can see the route has a data parameter, but doing this it's not working: this.router....
Motomine's user avatar
  • 4,414
147 votes
16 answers
162k views

Add a prefix to all Flask routes

I have a prefix that I want to add to every route. Right now I add a constant to the route at every definition. Is there a way to do this automatically? PREFIX = "/abc/123" @app.route(PREFIX + "/")...
Evan Hahn's user avatar
  • 12.5k
256 votes
9 answers
424k views

A potentially dangerous Request.Path value was detected from the client (*)

I am receiving the rather self explanatory error: A potentially dangerous Request.Path value was detected from the client (*). The issue is due to * in the request URL: https://stackoverflow.com/...
user avatar
83 votes
4 answers
106k views

Draw path between two points using Google Maps Android API v2

Google changed its map API for Android and introduced API V2. The previous codes for drawing path are not working with API V2. I have managed to draw a path with API V2. I had searched a lot for the ...
Zeeshan Mirza's user avatar
339 votes
18 answers
182k views

S3 Static Website Hosting Route All Paths to Index.html

I am using S3 to host a javascript app that will use HTML5 pushStates. The problem is if the user bookmarks any of the URLs, it will not resolve to anything. What I need is the ability to take all url ...
Mark Nutter's user avatar
  • 5,589
230 votes
8 answers
214k views

Angular 2 router no base href set

I am getting an error and can't find why. Here is the error: EXCEPTION: Error during instantiation of LocationStrategy! (RouterOutlet -> Router -> Location -> LocationStrategy). angular2....
Jason Spick's user avatar
  • 6,088
90 votes
12 answers
129k views

htaccess redirect for Angular routes

I have an angular application with several routes, such as: site.com/ site.com/page site.com/page/4 Using angular's html5 routing mode, these resolve correctly when you click links to them from ...
Lucas Penney's user avatar
  • 2,664
147 votes
3 answers
351k views

Routing with Multiple Parameters using ASP.NET MVC

Our company is developing an API for our products and we are thinking about using ASP.NET MVC. While designing our API, we decided to use calls like the one below for the user to request information ...
CodingWithoutComments's user avatar
165 votes
21 answers
169k views

Angular2 Routing with Hashtag to page anchor

I wish to add some links on my Angular2 page, that when click, will jump to specific positions within that page, like what normal hashtags do. So the links would be something like /users/123#userInfo ...
Stone's user avatar
  • 1,901
399 votes
31 answers
142k views

No route matches "/users/sign_out" devise rails 3

I've installed devise on my app and applied the following in my application.html.erb file: <div id="user_nav"> <% if user_signed_in? %> Signed in as <%= current_user.email %...
vich's user avatar
  • 11.9k
183 votes
4 answers
272k views

Laravel - Route::resource vs Route::controller

I read the docs on the Laravel website, Stack Overflow, and Google but still don't understand the difference between Route::resource and Route::controller. One of the answers said Route::resource ...
Sonique's user avatar
  • 6,940
116 votes
13 answers
152k views

Use anchors with react-router

How can I use react-router, and have a link navigate to a particular place on a particular page? (e.g. /home-page#section-three) Details: I am using react-router in my React app. I have a site-...
Don P's user avatar
  • 62.5k

15 30 50 per page
1
2 3 4 5
171