JSFiddle - React, Tailwind, and code Playground

HTML

<div ng-app="test" ng-controller="test">
    {{test}}
    <button ng-click="logServiceScope()">Log service context</button>
</div>

JavaScript

var app = angular.module('test', [])
.controller('test', function ($scope, test) {
	console.log('Controller context', this);
    $scope.test = 'Hi guys';
    
    $scope.logServiceScope = function () {
    	test.test();   
    }
})
.service('test', function(){
    this.hi = 'huys';
    this.test = function () {
    	console.log('service context', this);   
    }
});