IdentityIQ continues to grow in its usage of the popular front-end framework, Angular. In the end, Angular just creates Javascript and your IIQ plugins leverage that javascript. We’ll use what expertise we have to create Angular apps, to create wonderful IIQ plugins.
Hello, im developing a new plugin using angular, but in my case, my iiq development instance is not running locally, when im serving my angular app locally im getting a cors error.
will i have to include a config in web.xml? i tried to include this config bellow within the iiq instance web.xml, but i still having trouble with cors:
That’s a known issue/feature with local Angular development. It’s actually a security feature, but quite annoying when you’re developing locally.
To get around this, you can instruct Angular to set up a proxy so that these requests are being sent from the angular server instead of the browser.
To do this, create a proxy.conf.json file in the root of your angular app (so the subdirectory inside the plugin folder), with these contents:
Inside, the angular.json file, this should go in the projects.pluginapp.architect.serve.configurations.development section.
So you’re telling Angular:
when running in development mode,
when serving the app
when clicking on any link that goes to /identityiq
then, instead of having the browser do that, make sure that it looks like it’s coming from the app and not directly from the browser, and forward it to http://localhost:8080.
Make sure to adjust the url for your local dev setup, if you use a different port.
Im building a plugin with multiple components and using Angular routing to navigate pages.
Routing works when I do an ‘ng serve’ but when I deploy it to IIQ, it just shows Page Not Found.
Do you have any examples on how to correctly setup routing?
I haven’t played around with routing much.
I have a suspicion it’s possible that the angular framework of the plugin framework itself somehow takes precedence over the plugin’s routing.
Hopefully I get a chance to look at this soon… I’ll keep you posted.