JSHint (r10): 'angular' is not defined

后端 未结 2 817
眼角桃花
眼角桃花 2020-12-13 13:06

I have the following:

angular.module(\'test\')
    .controller(\'TestMenuController\',
    [
        \'$http\',
        \'$scope\',
        \'$resource\',
           


        
2条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-13 13:35

    One way to tackle this is to modify your .jshintrc and set angular as one of the predefined variables, as Jayantha said.

    .jshintrc would look like this:

    {
      "predef": ["angular"]
    }
    

提交回复
热议问题