Angular2 RC5 Fusion Charts with routing not workin

2019-07-23 04:12发布

I am using Angular2 rc5 with routing, So in index.html I wrote

document.write('<base href="' + document.location + '" />')

I am using fusion charts in my app.

I have 2 charts in following url in components

/fusion1 chart here works properly default url for app

and when I click on link the url becomes now

/fusion2 here chart won't render properly it displays labels but wont render palette colors.

If we see fill url in svg it displays like this

fill=url('localhost:8443/fusion1#588xr___120_278_216__rgba_0_174_141_1_:0-rgba_0_174_141_1_:100')

My fill url is not taking updated route url which has to take

localhost:8443/fusion2

any help will be appreciated.

1条回答
太酷不给撩
2楼-- · 2019-07-23 05:01

Provide APP_BASE_HREF instead of the <base> tag to configure the router, then you can set <base href="..."> independent of the router.

providers: [{provide: APP_BASE_HREF, useValue: '/'}]

See also Angular 2 router no base href set

查看更多
登录 后发表回答