角度意外标识符

时间:2015-08-09 16:18:37

标签: javascript angularjs

我在角1.3.14中得到以下内容:

SyntaxError: Unexpected identifier
    at eval (native)
    at Function.n.extend.globalEval (https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js:2:2538)
    at n.fn.extend.domManip (https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js:3:17203)
    at n.fn.extend.append (https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js:3:14886)
    at null.<anonymous> (https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js:3:16246)
    at n.access (https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js:2:30124)
    at n.fn.extend.html (https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js:3:15917)
    at link (https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.3.14/angular-route.min.js:7:200)
    at Z (https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.3.14/angular.min.js:70:149)
    at A (https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.3.14/angular.min.js:59:203) <div ng-view="" class="ng-scope">(anonymous function) @ angular.js:11607$get @ angular.js:8557Z @ angular.js:8221A @ angular.js:7729g @ angular.js:7078(anonymous function) @ angular.js:6957$get.h @ angular.js:7096l @ angular.js:7756x @ angular-route.js:933$get.l.$broadcast @ angular.js:14720(anonymous function) @ angular-route.js:616(anonymous function) @ angular.js:13189$get.l.$eval @ angular.js:14401$get.l.$digest @ angular.js:14217$get.l.$apply @ angular.js:14506l @ angular.js:9659S @ angular.js:9849D.onload @ angular.js:9790
arguments
[SyntaxError: Unexpected identifier
    at eval (native)
    at Function.n.extend.globalEval (https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js:2:2538)
    at n.fn.extend.domManip (https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js:3:17203)
    at n.fn.extend.append (https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js:3:14886)
    at null.<anonymous> (https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js:3:16246)
    at n.access (https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js:2:30124)
    at n.fn.extend.html (https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js:3:15917)
    at link (https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.3.14/angular-route.min.js:7:200)
    at Z (https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.3.14/angular.min.js:70:149)
    at A (https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.3.14/angular.min.js:59:203), "<div ng-view="" class="ng-scope">"]

来源代码段:

    function consoleLog(type) {
      var console = $window.console || {},
          logFn = console[type] || console.log || noop,
          hasApply = false;

      // Note: reading logFn.apply throws an error in IE11 in IE8 document mode.
      // The reason behind this is that console.log has type "object" in IE8...
      try {
        hasApply = !!logFn.apply;
      } catch (e) {}

      if (hasApply) {
        return function() {
          var args = [];
          forEach(arguments, function(arg) {
            args.push(formatError(arg));
          });
          return logFn.apply(console, args);
        };
      }

      // we are IE which either doesn't have window.console => this is noop and we do nothing,
      // or we are IE where console.log doesn't have apply so we log at least first 2 args
      return function(arg1, arg2) {
        logFn(arg1, arg2 == null ? '' : arg2);
      };
    }
  }];
}
arguments:
    arguments: Arguments[2]
    0: SyntaxError: Unexpected identifier at eval (native) at Function.n.extend.globalEval (https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js:2:2538) at n.fn.extend.domManip (https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js:3:17203) at n.fn.extend.append (https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js:3:14886) at null. (https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js:3:16246) at n.access (https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js:2:30124) at n.fn.extend.html (https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js:3:15917) at link (https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.3.14/angular-route.min.js:7:200) at Z (https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.3.14/angular.min.js:70:149) at A (https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.3.14/angular.min.js:59:203)
    message: "Unexpected identifier"
    stack: (...)
    get stack: ()
    set stack: ()
    __proto__: Error
    1: ""
    callee: (...)
    get callee: ThrowTypeError()
    set callee: ThrowTypeError()
    caller: (...)
    get caller: ThrowTypeError()
    set caller: ThrowTypeError()
    length: 2
    Symbol(Symbol.iterator): ArrayValues()
    __proto__: Object
    this: Object

0 个答案:

没有答案