I have an angular 2 app (built with Angular RC1) that is using the class RouteConfig from the router-deprecated module of RC1.
import {Component} from "@angular/core";
import {RouteConfig, RouterOutlet} from "@angular/router-deprecated";
import {LoginComponent} from "./login/login";
@RouteConfig([
{path: "/", redirectTo: ["Login"]},
{
path: "/login",
component: LoginComponent,
name: "Login"
}])
@Component({
selector: "my-app",
template: "<router-outlet></router-outlet>",
directives: [RouterOutlet]
})
export class AppComponent {
}
As seen above, when the user hits localhost:3000 on the browser, I am seeing the browser url redirect to:
http://localhost:3000/%E2%80%9C/%E2%80%9C/%E2%80%9C/login
I am seeing a related issue with Component decorator templateUrls. Here's my other stackoverflow post
I must be missing or doing something wrong here. Any ideas?
I suspect it might have to do with the config SystemJS?
<base href="/">
in<head>
or usePathLocationStrategy
(default) with a server that doesn't support it. – Günter Zöchbauer<base href="/">
tag. – freddy mercury