Angular 2 http and https routes

1 view
Skip to first unread message

sech...@gmail.com

unread,
Nov 8, 2016, 7:12:57 PM11/8/16
to Angular2
There is an Angular 2 based application with two routes:

const appRoutes: Routes = [
{
path: 'home',
component: HomeComponent
},
{
path: 'login',
component: LoginComponent
}
];

The "/home" route should go to "http://mysite/home" and "/login" should go to "https://mysite/login". Please pay attention the first one starts with "http://" and the second one starts with "https://". How is it possible to configure the router to use different origins for routes? Or at least http / https for the same origin?

Reply all
Reply to author
Forward
0 new messages