ServiceNow with its innovative service delivery solutions brings major breakthroughs to some of the biggest challenges of the service industry. In this successful journey of ServiceNow, AngularJS has been highlighted as one of the key forces in enabling ServiceNow to deliver a one-stop solution to all the service industry problems. In this post, let’s examine in how AngularJS contributed to the successful journey of ServiceNow.
Earlier to the AngularJS integration, there was a bit of confusion and difficulty in the implementation of ServiceNow Portal. As the demand was heavy coding and everything developed is to be integrated manually.
Till the Geneva version of ServiceNow, everything was implemented in Jelly script which was created by ServiceNow to render a user interface and a CMS system was used in the implementation of the service portal.
In Jelly Script, the code is to be written in XML format. The application was a multi-page application that needs to load the whole HTML code every time when the need to change view or to load other pages raises. As every time reloading of HTTPS calls was done frequently, which in turn increases the development time. This process also brings the overhead of the writing code for implementation of every widget.
To overcome all the above issues ServiceNow implemented AngularJS. ServiceNow implemented AngularJS in the Geneva version but had some issues. From the Helsinki release, ServiceNow totally shifted to AngularJS framework and avoiding the need of Jelly Script.
AngularJS is a JavaScript framework follows the MVC architecture. AngularJS with its ease in development and built-in features made ServiceNow implementation easy and flexible. Integration of AngularJS helped in the development of single-page applications, and MVC architecture made user interface made easy in ServiceNow. The MVC architecture is a vital thing for implementing single page application in ServiceNow. Below is the MVC architecture:
For a successful integration of AngularJS with ServiceNow follow the steps mentioned below:
Download the AngularJS plugin from the official website https://angularjs.org/ to storage.
Go to ServiceNow portal, then create a new blank UI Script. UI scripts are client-side JavaScript library files which are stored in the database to easily customize.
You can add a description if you like, but keep the script field blank and click Submit.
By using <g:require> tag include UI Script.
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<g:requires name="angularjs.min.1.3.2.jsdbx" />
</j:jelly>
Note: Prior to ServiceNow Helsinki release AngularJS was imported manually in to the ServiceNow portal, whereas now it is inbuilt.