约翰爸爸角度风格指南的Jslint设置不起作用

时间:2016-01-07 10:20:25

标签: angularjs

https://github.com/johnpapa/angular-styleguide#function-declarations-to-hide-implementation-details约翰给出了他的风格指南,角度很棒,但这里的问题是当我打开它时,它向我显示超出范围的错误我无法找到任何正确的方法来处理它。我不能全局关闭范围。

(function () {
        'use strict';
        angular.module('TimeSheetApp.Profile', [])
        .controller('ProfileController', ['$scope', '$log', ProfileController]);

        function ProfileController($scope, $log) {
        $log.log("ProfileController loaded!");
        }
}());

而短线输出是

#1'ProfileController'超出范围。     .controller('ProfileController',['$ scope','$ log',ProfileController]); //第6行,第61行  #2未使用'$ scope'。     function ProfileController($ scope,$ log){//第8行,Pos 32

1 个答案:

答案 0 :(得分:0)

请参阅Does jshint understand Angular?

另一种解决方法是在行尾添加//ignore jslint

相关问题