0
votes

I have a LoginComponent class that has a Component decorator in Angular 2 (RC1).

import {Component} from "@angular/core";
@Component({
    selector: "login",
    templateUrl: "login-view.html"   // Right here
})

When the LoginComponent is loaded by the browser, it will fetch the template at the given template Url as defined above.

What I am seeing is that the template GET is returning a 404. Upon closer inspection, I am seeing that the request url is:

http://localhost:3000/%E2%80%9C/login-view.html  

I looked up the encoding and found that '%E2%80%9C' is a left double quote.

Any ideas on how there is an extra double quote here? Am I doing something wrong here?

I am seeing this using Angular 2, RC1, on the Chrome browser.

templateUrl has to be relative to your index.html and not to your component file. is this true for your url?lexith
This might have to do with the relative URL support in the RC. If you are using commonjs modules, try adding 'moduleId: module.id' to your component metadata.awiseman
@lexith - thanks for your response, but no matter what path i provide to templateUrl, I am getting the double left quote (uri encoded) prefix.freddy mercury
@awiseman - no luck with the module.id. (I also needed to change my tsconfig from systemjs to common, in order to get common style module generation); still no luck.freddy mercury