Monday, 15 June 2015

javascript - JSHint some errors -


Why JSHint tells me:

JSHint: missing semicolon (W033)

and

JSHint: 'myApp' has not been defined. (W117)

Controller. Js:

  'strict use' myApp.controller ('NavbarCtrl', function NavbarController ($ area, $ location) {$ scope.routeIs = function (routeName ) {Return $ location.path () === routeName;};}); ...   

You have already opened a similar question and now it is. Please ask all the same questions in a single post.

Here is the updated code that will work for you.

  / * global myApp * / // if myApp is defined globally in some files 'strict use'; Var myApp; // If myApp is not already defined MyApp.controller ('NavbarCtrl', function NavbarController ($ Range, $ location) {$ scope.routeIs = functionName} {return $ location.path () === routeName;} ;}); ...  

No comments:

Post a Comment