routing

Nativescript: Navigate between router-outlets

时光总嘲笑我的痴心妄想 提交于 2020-06-27 07:37:35
问题 For better introduction see the blog post about outlets. I use a TabView to navigate through my mobile app written with nativescript (ProtectedComponent). <TabView #tabView tabsBackgroundColor="#f57c00" selectedTabTextColor="#B23010" [(ngModel)]="selectedIndex" (selectedIndexChanged)="tabViewIndexChange(tabView.selectedIndex)"> <StackLayout *tabItem="{iconSource: 'res://tab-icons/cats'}"> <cats-tab></cats-tab> </StackLayout> <StackLayout *tabItem="{iconSource: 'res://tab-icons/dogs'}"> <dogs

Routing Razor Pages to /example.com/en/ format

你。 提交于 2020-06-27 04:27:07
问题 I have three languages on my website. I'm trying to get my razor pages to route to culture/localization like so: https://localhost:44396/en/ https://localhost:44396/ru/ I have hundreds of lines of code commented out at this point using methods I've been googling for the past two days and nothing seems to do the job. The website is mostly static so right now beyond the culture there is nothing else that needs routing. 回答1: Here's a way you can do it that doesn't require you to put a middleware

Routing Razor Pages to /example.com/en/ format

核能气质少年 提交于 2020-06-27 04:25:18
问题 I have three languages on my website. I'm trying to get my razor pages to route to culture/localization like so: https://localhost:44396/en/ https://localhost:44396/ru/ I have hundreds of lines of code commented out at this point using methods I've been googling for the past two days and nothing seems to do the job. The website is mostly static so right now beyond the culture there is nothing else that needs routing. 回答1: Here's a way you can do it that doesn't require you to put a middleware

Localization works when culture is set via QueryString but not when culture is in route

删除回忆录丶 提交于 2020-06-25 05:20:07
问题 This is my route: app.UseMvc(routes => { routes.MapRoute( name: "defaultWithCulture", template: "{culture=fa-IR}/{controller}/{action=Index}/{id?}"); }); but localization works when I use the link: http://localhost:1776/fa-IR/Home/About?culture=fa-ir but not when http://localhost:1776/fa-IR/Home/About why doesn't the culture in the route apply? 回答1: SSA's answer didn't solve my problem but gave me a big clue, and finally I got it to work. The thing to do is: As SSA said asp.net core has

HereMaps - These credentials do not authorize access. Can't get valid response for Public Transit API

[亡魂溺海] 提交于 2020-06-17 02:18:29
问题 I have registered for a public 90-day free trial on HereMaps few days ago and I can't get a valid response for a public transit api. Routing works properly but that API doesn't. I call example request from documentation with my valid credentials: https://transit.cit.api.here.com/v3/route.json ?app_id={APP_ID} &app_code={APP_CODE} &routing=all &dep=41.9773,-87.9019 &arr=41.8961,-87.6552 &time=2017-12-11T07%3A30%3A00 after calling it, I receive that response: { "Res": { "serviceUrl": "https:/

React with Typescript: Property 'push' does not exist on type 'History'

喜夏-厌秋 提交于 2020-06-12 06:12:22
问题 I'm trying to navigate away from a view by pushing into the history object. However when I try to push a route into it, I get an error message: Property 'push' does not exist on type 'History'. render(){ return ( <div className="loginWrapper"> withRouter(({history}) => (<button onClick={()=>{history.push('/home')}} className="btn btn-primary">Pieteikties</button>)) </div> ) } What can I do to fix this? EDIT: I also tried this: logIn(){ this.props.history.push('/new-location') } with a

On route change view doesn't scroll to top in the new page in angular2

孤街醉人 提交于 2020-05-27 12:19:00
问题 I have tried autoscroll="false" on the router-outlet but does't seem to work, is there any default method of angular2 for doing the same without using any third party library? 回答1: found answer here https://stackoverflow.com/a/39601987/5043867 we can subscribe to the route change event and scroll to the top with something in the lines of ngOnInit() { this.router.events.subscribe((evt) => { if (!(evt instanceof NavigationEnd)) { return; } document.body.scrollTop = 0; }); } Update - In Angular

On route change view doesn't scroll to top in the new page in angular2

笑着哭i 提交于 2020-05-27 12:18:25
问题 I have tried autoscroll="false" on the router-outlet but does't seem to work, is there any default method of angular2 for doing the same without using any third party library? 回答1: found answer here https://stackoverflow.com/a/39601987/5043867 we can subscribe to the route change event and scroll to the top with something in the lines of ngOnInit() { this.router.events.subscribe((evt) => { if (!(evt instanceof NavigationEnd)) { return; } document.body.scrollTop = 0; }); } Update - In Angular

On route change view doesn't scroll to top in the new page in angular2

回眸只為那壹抹淺笑 提交于 2020-05-27 12:18:06
问题 I have tried autoscroll="false" on the router-outlet but does't seem to work, is there any default method of angular2 for doing the same without using any third party library? 回答1: found answer here https://stackoverflow.com/a/39601987/5043867 we can subscribe to the route change event and scroll to the top with something in the lines of ngOnInit() { this.router.events.subscribe((evt) => { if (!(evt instanceof NavigationEnd)) { return; } document.body.scrollTop = 0; }); } Update - In Angular

change search item url and routing in codeigniter

自古美人都是妖i 提交于 2020-05-17 06:34:36
问题 I want to change the URL with Codeigniter routing: here is my url: home/search?location=BD home/search?location=BD&category[]=123 home/search?location=BD&category[]=123&category[]=124&category[]=125 like above url but I want to routing this url with home/BD home/BD/123 home/BD/123+124+125 or home/BD/123/124/125 My route.php : $route['home/(:any)/(:any)'] = 'home/search/$1'; What is my problem in route.php page? 回答1: Try to use a (.+) pattern on your route.php , the $1 will contain the