I encountered an issue when using Grunt's Jshint-Task with my controller and two modules split into three files. Despite including the "use strict" statement in all three files, I still receive an error prompting me to add it. As a newcomer to Angular, I'm struggling to understand why this is happening.
Any insights would be greatly appreciated!
This is my controller:
"use strict";
angular.module('calculatorApp').controller('HomeController', ['calculatorApp', function(){
var $this = this;
$this.test = function () {
$this.alert('test');
};
}]);
This is my module:
"use strict";
var calculatorApp = angular.module('calculatorApp', ['ngRoute']);
calculatorApp.config(function($routeProvider){
$routeProvider
.when('/', {
controller: 'HomeController',
templateUrl: 'home.tpl.html'
})
.otherwise({
redirectTo: '/'
});
});