templateUrl fails on a Component decorator in angular 2 - is prefixing extra double quote '%E2%80%9C' to url

核能气质少年 提交于 2020-01-17 06:51:39

问题


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.

来源:https://stackoverflow.com/questions/37471855/templateurl-fails-on-a-component-decorator-in-angular-2-is-prefixing-extra-dou

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!