Target Audience: CAST Administrators


Summary: This document provides a guide based on CAST’s field experience on how to configure AngularJS based applications using CAST AIP. These configurations are used all versions of CAST AIP 8.2.x and above for AngularJS offering (see Reference Materials below for links) to overcome limitations such as missing links. The applicability of this guide should have assessed for newer versions of CAST AIP and Extension.

Introduction to AngularJS

This section gives a brief overview of the framework.

AngularJS is an open source web application framework. It was originally developed in 2009 by Misko Hevery and Adam Abrons. It is now maintained by Google.

AngularJS is a structural framework for dynamic web apps. It lets you use HTML as your template language and lets you extend HTML's syntax to express your application's components clearly and succinctly. AngularJS's data binding and dependency injection eliminate much of the code you would otherwise have to write. And it all happens within the browser, making it an ideal partner with any server technology.

Core Features
Following are most important core features of AngularJS −

Versions of AngularJS Supported by CAST

This section highlights the AngularJS versions supported by CAST AIP 8.2.x.

File Types expected for CAST Analysis

This section highlights all the file types that can be expected to be delivered if the application has implemented this framework.


AngularJS is what HTML would have been, had it been designed for applications. HTML is a great declarative language for static documents. It does not contain much in the way of creating applications, and as a result building web applications is an exercise in what do I have to do to trick the browser into doing what I want?

The impedance mismatch between dynamic applications and static documents is often solved with:

How to identify the implementation of AngularJS:

This section details the approach for identifying the presence of AngularJS in the code delivered.

AngularJS Description:

This section gives a brief overview of AngularJS.

AngularJS takes another approach. It attempts to minimize the impedance mismatch between document centric HTML and what an application needs by creating new HTML constructs. AngularJS teaches the browser new syntax through a construct we call directives.

AngularJS Components
The AngularJS framework can be divided into following three major parts −

How to configure AngularJS in CAST AIP:

This section describes all the CAST configuration steps to be followed in order to configure AngularJS based application.

Server manager Configuration:

This section describes the Server Manager Configuration Steps.

Once after successful CAST Extend - AngularJS installation, Enable the extension through "Server Manager".

Pre Analysis Configuration:

This section describes the "Pre Analysis Configuration" Steps.

Install AngularJS Extension from CAST Extend - AngularJS. Manage it using Server Manager. Note that there is no need to create any exclusive CMS Job as mandated in other extensions.


This section gives an overview of the Enlighten diagram.

CMS Configuration:

This section describes the CMS Configuration which is required to set for AngularJS.

Name: URLCallInJS
Pattern:            var[ ]+url[ ]*\=[ ]*SPEConstants[A-Za-z0-9_\.]+\.([A-Za-z0-9_]+)\;
Replacement:   \1__URL
Type Of link:     Match

Name: SPEConstantValues
Pattern:            webAPI[A-Za-z0-9_\.]+\.([A-Za-z0-9_]+)\=[A-Za-z0-9_\+ \"]+\/([A-Za-z0-9_]+)\"
Replacement:   \1__\2__METHOD
Type Of link:     Match

KB ModificationQueries:

/* Template creating new links between existing unlinked objects */
select distinct ctv.caller_id,c2.object_id ,'callLink',0 from 
§cdt_objects c1,§cdt_objects c2,§ctv_links ctv,§cdt_objects c3,
§cdt_objects c4,§csv_object_descriptions c5 
where ctv.caller_id = c1.object_id and 
c1.object_type_str = 'HTML5 JavaScript function' 
and c2.object_type_str = 'Java Method' and c3.object_type_str ='Search String' 
and c4.object_type_str = 'Search String' and ctv.called_id = c3.object_id 
and c3.object_name like '%URL' and c4.object_name like '%METHOD' 
and split_part(c3.object_name,'__',1) = split_part(c4.object_name,'__',1) 
and split_part(c4.object_name,'__',2) = split_part(split_part(c5.description,'/',2),'"',1) 
and c5.object_id = c2.object_id and 
c5.desc_type= 'Annotation:' and c5.description like '%RequestMapping%'

Sample code:

TCC Configuration:

This section describes the TCC configuration which needs to be set.

Entry points


 If the application uses Angular JS with JSP, then the links between them needs to be created.


Reference Material


Cast Sotware for AngularJS Extension

What Is AngularJS?