<commit_before>
[![Build Status](https://travis-ci.org/CorrelatorSharp/angular-correlator-js.svg?branch=master)](https://travis-ci.org/CorrelatorSharp/angular-correlator-js)

# angular-correlator-sharp

A simple angular module providing support for the [correlator sharp package](https://github.com/ivanz/CorrelatorSharp).


## Installation

Cureently the alpha is not published on NPM, will update when beta goes live on NPM.

`npm install angular-correlator-sharp --save`


## Usage

You can use the provided service to interact with the current scope and create new sub scopes.

```javascript

	angular
		.module('myApp', [ 'correlator-js' ])
		.controller('myController', ['$scope', 'csActivityScope', function ($scope, csActivityScope) {

            // The id of the 'myController_child' scope.
            $scope.stateChangeCorrelationId = csActivityScope.current.id.value;

            // Change the current scope.        
            csActivityScope.new('myController');

            // Nest a context as a child scope.
            csActivityScope.child('myController_child');

            // The id of the 'myController_child' scope.
            $scope.currentCorrelationId = csActivityScope.current.id.value;

            // The id of the 'myController' scope.
            $scope.parentCorrelationId = csActivityScope.current.parent.id.value;

            // Generate a new root scope<commit_msg>update the docs from former package name<commit_after>
[![Build Status](https://travis-ci.org/CorrelatorSharp/angular-correlator-js.svg?branch=master)](https://travis-ci.org/CorrelatorSharp/angular-correlator-js)

# angular-correlator-js

A simple angular module providing support for the [correlator sharp package](https://github.com/ivanz/CorrelatorSharp).


## Installation

This package is in beta and while it has been stable for awhile, caution should be taken when integrating it into production projetcs.

`npm install angular-correlator-js --save`


## Usage

You can use the provided service to interact with the current scope and create new sub scopes.

```javascript

	angular
		.module('myApp', [ 'correlator-js' ])
		.controller('myController', ['$scope', 'csActivityScope', function ($scope, csActivityScope) {

            // The id of the 'myController_child' scope.
            $scope.stateChangeCorrelationId = csActivityScope.current.id.value;

            // Change the current scope.        
            csActivityScope.new('myController');

            // Nest a context as a child scope.
            csActivityScope.child('myController_child');

            // The id of the 'myController_child' scope.
            $scope.currentCorrelationId = csActivityScope.current.id.value;

            // The id of the 'myController' scope.
            $scope.parentCorrelationId = csActivityScope.current.parent.id.value;

            // Generate a new root scope
{'fraction_non_alphanumeric': 0.10329289428076256, 'fraction_numerical': 0.0, 'mean_word_length': 3.064788732394366, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5116779', 'n_tokens_mistral': 820, 'n_tokens_neox': 781, 'n_words': 224}