You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using ionicons with Ionic 4 and angular. I would like to change the deployment to put the ionicons svg files into a different directory than svg/. I know how to do this in angular.json but I can't figure out how to tell ionicons about the new location.
There is a resourcesUrl property inside the ion-icon component that seems to figure in [1] if I could set it. I don't understand how to set it through so all components get the setting.
Does anyone know how to override the resourcesUrl path so I can point to a different location?
I believe in some cases this is pretty important issue. E.g. I'm trying now to perform gradual migration of some wordpress based app into ionic and so started with embedding ionic as a page, lets say under /ionic/slug and so almost succeeded with --base-href /ionic/ and --deploy-url <dist bundle location> - unfortunately svgs used by ionic components are still tried to be loaded from /ionic/svg/. After some debugging I found that in @ionic/angularappInitialize there is a call to defineCustomElements where we could add resourcesUrl attribute which then will be passed via @ionic/coredefineCustomElements from loader.js to bootstrapLazy that performs crucial setup (currently just baseURI is used):
plt.$resourcesUrl$ = new URL(options.resourcesUrl || './', doc.baseURI).href;
I am using ionicons with Ionic 4 and angular. I would like to change the deployment to put the ionicons svg files into a different directory than
svg/
. I know how to do this in angular.json but I can't figure out how to tell ionicons about the new location.There is a resourcesUrl property inside the ion-icon component that seems to figure in [1] if I could set it. I don't understand how to set it through so all components get the setting.
Does anyone know how to override the resourcesUrl path so I can point to a different location?
1: https://github.com/ionic-team/ionicons/blob/master/src/components/icon/icon.tsx#L181
The text was updated successfully, but these errors were encountered: