I am working on a Gulp file and I just set JSHint, I see this option in the .jshintrc
file:
"strict" : true
then I went to my files I put this at the very beginning:
'use strict';
angular.module('MyApp', ['ngRoute'])
.config(function($locationProvider, $routeProvider) {. . .});
and I now I am getting a new error
public/app.js line 1 col 1 Use the function form of "use strict".
so I did:
angular.module('MyApp', ['ngRoute'])
.config(function($locationProvider, $routeProvider) {
'use strict';
return { . . . }
});
and the error its gone.
So, what is the difference here and what is wrong if I don't use the strict mode?