My ui-router configuration looks like this:
var homeAccess = {
name: 'home.access',
url: 'Access',
templateUrl: 'app/access/partials/webapi.html',
controller: [
'$scope',
'accessService',
'testService'
function (
$scope,
accessService: IAccessService
testService: ITestService) {
$scope.ac = accessService;
$scope.ts = testService;
}]
};
In my HTML I then use the accessService and testSaervice like this:
<input ng-model="ac.statusText" />
<input ng-model="ts.Text" />
From what I understand it would be better if I do not use $scope. So can someone tell me how I could implement this without using $scope?