PedroPovedaQ PedroPovedaQ - 6 months ago 101
AngularJS Question

Expected an assignment or function call and instead saw an expression with Angular

I'm using [JSLint][1] with ES6 style IIFE's in my Angular App and I get this error:


Expected an assignment or function call and instead saw an expression


On the following code:

{
'use strict';
angular.module('MyModule', []);
}


Should I omit 'use strict' in this case?

Answer

You don't need the { and }, it should work then.