When performing a jSLint check on my Angular-based app, I encountered an "Unexpected '$scope'" error. To replicate the issue, you can try inputting the code snippet below into jslint.com.
I'm puzzled as to why the first function declaration (downloadFile) doesn't trigger an error while the second one (buildFile) does.
/*jslint browser: true*/
/*global angular */
angular.module('testApp')
.controller('FileCtrl', ["$scope", function ($scope) {
"use strict";
$scope.downloadFile = function () {
window.location = '/path/to/file';
}
$scope.buildFile = function () {
}
}]);