如何删除基本标签?
How do I remove the base tag?
SVG 已损坏,解决方案是删除基本标签并手动附加网址,但我找不到基本标签。这是有问题的问题:https://github.com/ember-cli/ember-cli/issues/2633
它在 config/environment.js 中的两个位置:
var ENV = {
modulePrefix: 'projectname',
environment: environment,
baseURL: '/',
...
if (environment === 'test') {
// Testem prefers this...
ENV.baseURL = '/';
ENV.locationType = 'none';
删除这两行并确保所有相对 URL 都是正确的。
另一种解决方案是将当前路径名添加到 URL ref.
`url(${location.pathname}#${id})`
但是,如果路径名未绑定,这会在路由转换时中断。您可以通过绑定 Router
的 url 属性 来解决此问题,但这会进入大麻区域。
var view = this;
var container = view.container;
container.lookup('router:main').get('url'); // Bind this guy
SVG 已损坏,解决方案是删除基本标签并手动附加网址,但我找不到基本标签。这是有问题的问题:https://github.com/ember-cli/ember-cli/issues/2633
它在 config/environment.js 中的两个位置:
var ENV = {
modulePrefix: 'projectname',
environment: environment,
baseURL: '/',
...
if (environment === 'test') {
// Testem prefers this...
ENV.baseURL = '/';
ENV.locationType = 'none';
删除这两行并确保所有相对 URL 都是正确的。
另一种解决方案是将当前路径名添加到 URL ref.
`url(${location.pathname}#${id})`
但是,如果路径名未绑定,这会在路由转换时中断。您可以通过绑定 Router
的 url 属性 来解决此问题,但这会进入大麻区域。
var view = this;
var container = view.container;
container.lookup('router:main').get('url'); // Bind this guy