Our Blog > Blog Detail

Web Content Viewer- Asponte Custom Skin


WCM Quick Hits: Accessing ibmPortalConfig from Angular

  • Created By: Chris Knight
  • Updated: January 25, 2017
  • Tags: developer, wcm, quickhits


While developing a single page Angular application that we were using within the WCM Script Portlet (Script Application in newer CF levels), we needed to get the currently logged in user name.  Rather than writing new code to be able to do so, we wanted to leverage the ibmPortalConfig javascript application that the portal theme sets up.


When we tried to leverage the ibmPortalConfig object within the angular code, it was not available.  The reason was that it wasn't scoped in a way that the angular code was able to retrieve the variable.


Using the Angular $window:



We were able to gain access to the ibmPortalConfig object:

var portalConfig = $window.ibmPortalConfig;

Contact Form- Asponte Custom Skin


Contact Us


Call Us 888-926-9434
Complementary Content