1

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.

Satish Pokala
  • 304
  • 2
  • 10
  • Answered a similar question forAAngular 7 here: https://stackoverflow.com/questions/25713345/fusioncharts-not-rendering-properly-when-base-tag-included-in-html-head – Bruno Medeiros Apr 08 '19 at 06:48

1 Answers1

1

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

Community
  • 1
  • 1
Günter Zöchbauer
  • 623,577
  • 216
  • 2,003
  • 1,567
  • hello thanks for your reply, I have made changes, but still fill url is not taking the latest url routed. fill=url('localhost:8443/fusion1#588xr___120_278_216__rgba_0_174_141_1_:0-rgba_0_174_141_1_:100') , it is taking fusion1 page url only. – Satish Pokala Aug 31 '16 at 06:55