On this page:

Target audience:

Users of the extension providing AngularJS support for Web applications.

Summary: This document provides basic information about the extension providing AngularJS support for Web applications.

Extension ID


What's new?

Please see AngularJS - 2.0 - Release Notes for more information.


This extension provides support for AngularJS.

In what situation should you install this extension?

If your Web application contains AngularJS source code and you want to view these object types and their links with other objects, then you should install this extension:

Regarding Front-End to Back-End connections, we do support the following cross-technology stacks:

AngularJS Front-End connected JEE Back-EndAngularJS Front-End connected Node.js Back-End

Supported AngularJS versions

The following table displays the list of AngularJS versions that this extension supports:

AngularJS VersionTransaction SupportRules SupportType of Support
1.0(tick)(tick)Full-stack use case support
1.2(tick)(tick)Fullstack use case support
1.3(tick)(tick)Fullstack use case support
1.4(tick)(tick)Fullstack use case support
1.5(tick)(tick)Fullstack use case support
1.6(tick)(tick)Fullstack use case support
1.7(tick)(tick)Fullstack use case support

Comparison with existing support for JavaScript in CAST AIP

CAST AIP has provided support for analyzing JavaScript via its JEE and .NET analyzers (provided out of box in CAST AIP) for some time now. The HTML5/JavaScript extension (on which the AngularJS extension depends) also provides support for JavaScript but with a focus on web applications. CAST highly recommends that you use this extension if your Application contains JavaScript and more specifically if you want to analyze a web application, however you should take note of the following:

In CAST AIP 8.3.x support for analyzing JavaScript has been withdrawn from the JEE and .NET analyzers.

Function Point, Quality and Sizing support

This extension provides the following support:

Function Points
Quality and SizingSecurity

CAST AIP compatibility

This extension is compatible with:

CAST AIP release


7.3.4 and all higher 7.3.x releases(tick)

Supported DBMS servers

This extension is compatible with the following DBMS servers:

CAST AIP releaseCSSOracleMicrosoft
All supported releases(tick)(tick)(error)


(tick)An installation of any compatible release of CAST AIP (see table above)

Dependencies with other extensions

Some CAST extensions require the presence of other CAST extensions in order to function correctly. The AngularJS extension requires that the following other CAST extensions are also installed:

Note that when using the CAST Extension Downloader to download the extension and the Manage Extensions interface in CAST Server Manager to install the extension, any dependent extensions are automatically downloaded and installed for you. You do not need to do anything.

Download and installation instructions

Please see:

The latest release status of this extension can be seen when downloading it from the CAST Extend server.

Packaging, delivering and analyzing your source code

Once the extension is downloaded and installed, you can now package your source code and run an analysis. The process of packaging, delivering and analyzing your source code is described below:

What results can you expect?

Once the analysis/snapshot generation has completed, you can view the results in the normal manner (for example via CAST Enlighten):

E.g. : AngularJS Front-end connected to Node.js Back-end

E.g. : AngularJS Front-end connected to JEE/Spring MVC Back-end

Web Service calls

The following libraries are supported for Web Service HTTP calls:

Once the AngularJS extension analysis is finished, the analyzer will output the final number of web service calls created.

These web services are resolved to web service operations on the server side for the following supported frameworks: Node.js, JAX-RS, Spring MVC:


	.then(function () {
		return $injector.get('api');
	}, function () {
		return $injector.get('localStorage');

	.then(function success() {
		return store.todos;
	}, function error() {
		angular.copy(originalTodos, store.todos);
		return originalTodos;


return $resource('resources/scenarios/:id/mapping', {'id':'@id'}, {
    'query': { method: 'GET', isArray: false },
	'update': {method:'PUT', isArray: false }


angular.module('Patient', [])
	.service('Patient', ['$rootScope','Restangular', function($rootScope, Restangular){
	var Patient	= Restangular.service('patients');
	Restangular.extendModel('patients', function(model){
		model.fullname = function(){
			return this.fname+' '+this.sname;
		model.over18 = function(){
			if(this.age >= 18){
				return 'yes';
				return 'no';
		return model;

	return Patient;

angular.module('PatientsService', []).service('PatientsService', ['$rootScope','Restangular', 'Patient', function($rootScope, Restangular, Patient){
	var service = {
		currentPatient: [],
		setCurrentPatient: function(patient){
			this.currentPatient = patient;
			$rootScope.$broadcast('currentPatient.change', patient);
		getPatients: function(){
				$rootScope.$broadcast('patientList.change', patients);
		removePatient: function(patient){
				//refresh list
		createPatient: function(newPatient){

	return service;
angular.module('PatientsAppointmentsCtrl', ['ngGrid']).controller('PatientsAppointmentsCtrl', ['$scope', 'PatientsService', 'Patient', function($scope, PatientsService, Patient){

	$scope.appointments = [];

	$scope.$on('currentPatient.change', function(event, currentPatient){
		//get appointments
		if(currentPatient != null){
				$scope.appointments = appointments;
			$scope.appointments = [];


The following specific objects are displayed in CAST Enlighten:

AngularJS Application
AngularJS Controller
AngularJS Directive
AngularJS Directive Controller
AngularJS Factory
AngularJS Model function
AngularJS Service
AngularJS Get Resource Service
AngularJS Post Resource Service
AngularJS Put Resource Service
AngularJS Delete Resource Service
AngularJS Get Http Service
AngularJS Post Http Service
AngularJS Put Http Service
AngularJS Delete Http Service

AngularJS State

If your application is supposed to be communicating with services, ensure you have GET, POST, PUT, DELETE Service objects created after the analysis.

Structural Rules

The following structural rules are provided:

2.0.11-funcrel https://technologies.castsoftware.com/rules?sec=srs_angularjs&ref=||2.0.11-funcrel
2.0.10-funcrel https://technologies.castsoftware.com/rules?sec=srs_angularjs&ref=||2.0.10-funcrel
2.0.9-funcrel https://technologies.castsoftware.com/rules?sec=srs_angularjs&ref=||2.0.9-funcrel
2.0.8-funcrel https://technologies.castsoftware.com/rules?sec=srs_angularjs&ref=||2.0.8-funcrel  
2.0.7-funcrel https://technologies.castsoftware.com/rules?sec=srs_angularjs&ref=||2.0.7-funcrel

Technical notes

AngularJS Service objects and Transactions

AngularJS Service objects are not considered by CAST AIP as being part of any transaction (they are considered as technical function points). Instead, the AngularJS Service's functions are considered to be part of the transaction. Therefore when looking at the results of an AngularJS analysis, links to the AngularJS Service's functions should be checked to ensure that the expected transactions exist. Transactions within AngularJS are ALWAYS from functions or methods to functions or methods (objects which are executable).

Avoid using unsanitized AngularJS application (1020546)

The AngularJS Quality Rule Avoid using unsanitized AngularJS application (1020546) is designed to list violations for missing items. When this type of Quality Rule is violated, it is not possible to place a bookmark at the location in the code where the violation occurs since the violation is for something that is missing. In this situation, for this specific Quality Rule, the following is done:

Known Limitations

In this section we list the most significant functional limitations that may affect the analysis of applications using AngularJS:

AngularJS objects declared with prototypes

The extension does not detect AngularJS objects when they are declared with prototype. For example:

xxx.service('ContentService', ['$rootScope', '$window', '$resource', '$q', '$log', 'ManageContentURIs', attContent.content]);

attContent.content.prototype.retrieveContent = function(criteria, useStubs) {
var useStub = useStubs?useStubs:false;
var deferred = this.q.defer(),