JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.1/angular-sanitize.js"></script>
<div ng-app="myApp" ng-controller="dummy">
<a href="" ng-click="testArray()">Click</a>
</div>
JavaScript
angular.module('myApp', [])
.service('test', function() {
this.array = []
})
.controller('dummy', ['$scope', 'test', function ($scope, test) {
$scope.testArray = function() {
$scope.test = test;
console.log("test: ", test);
};
}]);