Hi all!
I have a so weird problem. I developed a single page application in angular 10 and i followed this guide:
https://github.com/hcl-dx/sample-angular-script-application
This app is visible if I am logged, instead if I logout, I don't see anything and I don't have errors in Google Chrome console. Of couse I gave all permissions and site area at my page.
Have you any idea?
Thanks!
Have you taken a look at the user permissions for the Script Application Portlet itself? That is where I would look next. If the anonymous user has been assigned as a user for the Script Application, then I would check the script application WCM permissions.
yes, we did it. If I edit my script portlet and I insert a simple text "Hello!" in the index.html of the script portlet, I always see this text, so I don't think the problem is about permissions.
When I log in my index.html contains <app-root></app-root> and this app-root contains my angular components, when I logout instead my app-root is empty if i inspect the source of the html page of HCL portal.
It's so so weird! I really don't know how it can be possible that an angular 10 script portlet works when i log in and then when i log out disappears.
Any ideas?
Did you also confirm these steps were followed - these may change what ng tags are added to the page.
Set (or create) both the dynamic.parameter.tag.enabled and the renderingplugin.shortform.enabled resource environment provider values of the WCM WCMConfigService service to false in the HCL Digital Experience Integrated Solutions Console, as this feature can interfere with Angular code that uses square brackets. Make sure to restart the WebSphere_Portal server after these updates. Click here for more information on these settings.
The Angular router requires the HTML base tag to be present on the page. Do this by setting the theme parameter com.ibm.portal.theme.hasBaseURL to true. The XML script to do this can be found here, and can be imported using the Administration portlet.
I have to put this on my system today for a project I am working on, so I may run into the same issue you see. If I do, I'll let you know!
Tomorrow I will follow again these steps you wrote and I will let you know. If it doesn't work I think that the faster solution is to downgrade angular app version until it works for anonymous users too, otherwise I have to write Java code and embed the app or rewrite the app in a simple js/html/css losing all my code :(
Please advice me if you will have the same problem.
Thanks a lot for the help! Good night!
Any news @Jack Derbyshire ? I tried again with permissions and configuration as it was adviced, but nothing changed. So I decided to test an angular 8 hello world app in my portal
Finally I had to put my app in an iframe, because all hello world Angular apps with Angular previous versions gave me errors. I tested Angular 5,6,7,8,9 with no routing and css. Maybe the problem is typescript, I don't know, I want to try with vuejs and ECMA to see if I will have the same problem.