router

Durandal routing issue

為{幸葍}努か 提交于 2019-12-12 05:48:36
问题 I have small SPA test app with Durandal. Also I have very wired issue. First, my folder structure is: App --durandal --viewmodels ----user.js --views ----user.html --main.js And when structure is like that all works just fine. But if I create structure like App --durandal --_user ----viewmodels ------user.js ----views ------user.html I get error like localhost/App/_users/ viewmodels /users.html 404 Not Found. And that happens after user.js are loaded by require.js. my main.js looks like

Setting router queryParams in angular 2 do not work

孤街醉人 提交于 2019-12-12 04:57:52
问题 I try to pass an Arry to router queryParams,but it doesn't work every time. this is my code : clickOrg(event) { if (this.idLists[this.idLists.length - 1] != event.id) { this.idLists.push(event.id); this.type = event.type; console.log (this.idLists) this.router.navigate(['userManage'], { queryParams: {idLists:this.idLists,type:this.type} }); } } the result of the log (this.idLists) is right but the router's queryParams didn't update Any help would be appreciated. 回答1: I'm also have a problem

Backbone router: Use hashbangs

妖精的绣舞 提交于 2019-12-12 04:37:50
问题 I was setting up a simple router in Backbone.js while I noted an issue, I googled for a long time and found some solutions. The problem is that whenever I navigate to a url, this url will work while I'm inside the app itself, but once you bookmark it and return it will obviously return a 404 since that page doesn't exist. Backbone.history.navigate('test', true); This will navigate to http://www.domain.com/test , which is great, but once you refresh the same URL it returns a 404. There are

Nativescript Angular - No provider for Router! (RC4 - Router 3.0.0-beta.2)

怎甘沉沦 提交于 2019-12-12 03:49:37
问题 The following Nativescript Angular application- demonstrates navigation using <router-outlet></router-outlet> - but after to ANGULAR "2.0.0-rc.4" and ROUTER "3.0.0-beta.2", the application fails to load. ERROR thrown: No provider for Router! JS: EXCEPTION: Error in ./AppComponent class AppComponent_Host - inline template:0:0 JS: ORIGINAL EXCEPTION: No provider for Router! JS: ORIGINAL STACKTRACE: JS: Error: DI Exception JS: at NoProviderError.BaseException [as constructor] (/data/data/org

Angular2 router causes extra browser history entry

蹲街弑〆低调 提交于 2019-12-12 03:34:47
问题 In Angular2 I want to be able to navigate directly to a route and be able to hit back (in the browser) once to go to the last page that I was on. If you first go to any website (I used google.com), then put this plnkr in your browser bar: http://run.plnkr.co/9D5IDnHv0UkUFM82/. If you hit the browser's back button, instead of taking you to the previous page, it keeps you on the plnkr until you hit back again. I believe this is because although I navigated directly to the "home" route, when I

AngularJS Tabs with UI.Router

吃可爱长大的小学妹 提交于 2019-12-12 03:28:41
问题 I have a single page app with vertical tables to the left. I'm able to to click on each tab and the expected content is showing. The problem I'm having is I'm not able to programmatically change the ng-checked to "true" for the selected tab and "false" for the unselected tab. Because of this the selected tab is always on the first tab in the list of tabs. I've provided all the codes (6 files) to run this app so you can see what im talking about Index.html <html ng-app= "mainApp"> <head>

Angular2 Router and OnInit

一世执手 提交于 2019-12-11 23:36:55
问题 I recently started having difficulty with the Angular2 router. The issue was that components that were outside the router-outlet would have their ngOnInit methods called. But components that were inside the router-outlet would not. I'd had previous issues with the Angular2 router as well. But that issue seemed to be related to external Javascript code whereas this one seemed to be clearly an issue with the Angular2 lifecycle hooks. I put together some Plunker's but couldn't reproduce the

Can I use nginx as reverse proxy in this particular case?

寵の児 提交于 2019-12-11 18:44:10
问题 I need to know if it is possible to use Nginx as a reverse proxy to serve several web apps hosted each one in a different Raspberry Pi. As it can be seen in the diagram, the Raspberries will be all connected to an unmanaged switch, the first switch I intend to install nginx so it could serve as reverse proxy depending on the website requested from the internet. Ex: wwww.site1.com, www.site2.www, etc Is this possible? Will I be able to access those RPis from a computer connected to the modem,

how to use a batfch file to log in to a router and then send commands to the router

我与影子孤独终老i 提交于 2019-12-11 18:24:39
问题 I am attempting to write a batch file to open a telnet session , connect to router ,enter username and password and finally send a command to the router, I have two different routers I am attempting this with . one of them a netgear i can successfully unlock telnet on the router (it is locked by default and once unlocked ,reverts after reboot) open telnet session and connect to the router.to unlock telnet i have a program telnetenable.exe which is stored in c:/ echo off echo c:/telnetenable

Angular 2 router queryParams are not added into url

為{幸葍}努か 提交于 2019-12-11 17:36:29
问题 I have an auth guard, which protects somes pages of my web-app. During the redirect i wanted to add queryParams to my url to allow user to come back to the site he want to pass. Code below was working for a few time. Today i realised that queryParms are not present in the url async canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Promise<boolean> { let isLogged: boolean = this.loggedInCustomer.isLoggedIn(); if (!isLogged) { console.log(state.url); this.router