Questions tagged [router]

A router is a device that forwards data packets across multiple networks. DO NOT USE THIS TAG FOR QUESTIONS REGARDING URL ROUTING OR SINGLE PAGE APPLICATION ROUTERS

NOTE: This tag should not be used for questions on configuring or port forwarding applications on routers. Such questions are off topic for StackOverflow, and should be directed to SuperUser instead. Questions involving routing in single page applications should insetad be tagged with the appropriate routing library such as or . Question asking about routing server side applications should be tagged with and the appropriate framework.

Excerpt from Wikipedia on March 29th 2011:

A router is a device that forwards data packets across computer networks. Routers perform the data "traffic directing" functions on the Internet. A router is a microprocessor-controlled device that is connected to two or more data lines from different networks. When a data packet comes in on one of the lines, the router reads the address information in the packet to determine its ultimate destination. Then, using information in its routing table, it directs the packet to the next network on its journey. A data packet is typically passed from router to router through the networks of the Internet until it gets to its destination computer. Routers also perform other tasks such as translating the data transmission protocol of the packet to the appropriate protocol of the next network, and preventing unauthorized access to a network by the use of a firewall.

The most familiar type of routers are home and small office routers that simply pass data, such as web pages and email, between the home computers and the owner's cable or DSL modem, which connects to the Internet (ISP). However more sophisticated routers range from enterprise routers, which connect large business or ISP networks up to the powerful core routers that forward data at high speed along the optical fiber lines of the Internet backbone.

3818 questions
36
votes
5 answers

this.props.history.push works in some components and not others

I am trying to programmatically change pages using browserHistory.push. In one of my components, but not in a component that I embedded inside of that one. Does anyone know why my project is throwing the error below only for the child component…
Rbar
  • 3,740
  • 9
  • 39
  • 69
34
votes
4 answers

vue.js - Organize big single page application with multiple views

I'm playing with new MVVM framework - Vue.js (http://vuejs.org/). It was really nice in simple examples and demos but now I'm trying to create big SPA with multiple views and I'm realizing that the best pattern how to do it is not described in…
Kosmetika
  • 20,774
  • 37
  • 108
  • 172
32
votes
7 answers

Pass invisible or hidden parameters using routerLink Angular

I have router link like below:
Sai M.
  • 2,548
  • 4
  • 29
  • 46
30
votes
1 answer

Adding Parameter to Angular router.navigate

First of all, I am not sure if this is the right way, to achieve what I want.. I am trying to add an export binding like the following to a router.navigate()-method: The problem is that I never use the directive,…
reveN
  • 552
  • 2
  • 8
  • 20
25
votes
2 answers

Angular 7 Router - Navigate without adding to the history

Using Angular Router, I want to navigate to another url without adding it to the browser history. this.router.navigateByUrl(`${pathWithoutFragment}#${newFragment}`); Can I do it with only Angular?
Alex York
  • 365
  • 1
  • 3
  • 6
25
votes
6 answers

Ember.js Router: How to animate state transitions

Has somebody found a good way to animate state transitions? The router immediately removes the view from the DOM. The problem with that is that I can't defer that until the end of the animation. Note: I'm using v1.0.0-pre.4.
david8401
  • 379
  • 1
  • 3
  • 11
23
votes
4 answers

How can I get the url pathname on a server component next js 13

So basically I have a server component in app dir and I want to get the pathname. I tried to do it using window.location but it does not work. Is there any way I can do this?
Updater XD
  • 261
  • 1
  • 3
  • 8
23
votes
2 answers

RouterLink with multiple params in Angular

I want to create a link to the route with multiple parameters and bind them in tempalte. Until now, I've been doing this by executing the function on (click) event, but I was wondering if it's possible within RouterLink's binding. Here is the…
22
votes
1 answer

Populating a child router-outlet Angular2

Since I heard Angular's Router supports nested tags, I'm trying to use two of them. I"m using the latest Angular-CLI, converting from ui-router to Angular's Router. I can't get the second router-outlet to populate content. (The…
curtybear
  • 1,458
  • 2
  • 20
  • 39
22
votes
1 answer

Backbone.js: trailing slash in the end of url route

I have url routes in my app Router.js: 'items': 'items', 'items/drafts': 'itemsDrafts', 'items/drafts/new': 'itemsDraftsNew', ... But in browser when I define items/drafts/new/ it gives me 404 error :( Is there a way to make this urls the same…
Kosmetika
  • 20,774
  • 37
  • 108
  • 172
22
votes
2 answers

How is source port for HTTP determined? Is there ever collision in NAT?

I know that when a HTTP request is made, packets are sent from a seemingly-random high-numbered port (e.g. 4575) on the client to port 80 on the server. Then the server sends the reply to the same high-numbered port, the router knows to route that…
Ram Rachum
  • 84,019
  • 84
  • 236
  • 374
21
votes
1 answer

Targeting named outlet via routerLink adds extraneous "/"

I'm trying to launch a modal in my app via routing. Everything seems to work except that an extra slash is added to the URL that prevents it from resolving. The Url should look like this (and it works if I enter it…
Brian
  • 1,363
  • 3
  • 12
  • 26
21
votes
5 answers

In Angular2 RC4 how do I add components to the precompile array?

I just updated my Angular2 project to RC4 and the router is now sending out this warning message in the console when I open my application: router.umd.js:2466 'FrontpageComponent' not found in precompile array. To ensure all components referred to…
Jeeveegee
  • 235
  • 2
  • 7
20
votes
7 answers

Programmatically changing wireless router settings - Netgear ideally

Is it possible to programmatically change settings on a Netgear wireless router using C#? I have settings that I change often and I would like to create my own interface for making those changes. Currently I navigate to the admin web page…
DarLom
  • 1,100
  • 2
  • 12
  • 30
20
votes
5 answers

Fetch unique identifier for a WiFi router

Is there any way I can get any unique identifier for a particular wifi router? I'm trying to write an Android app that needs to know which router it is connected to. I know that android provides a way to get the BSSID of the currently connected…
Urban
  • 2,201
  • 24
  • 52