Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
TypeScript 'use strict'
Message
From
15/11/2014 02:52:47
 
General information
Forum:
Javascript
Category:
Other
Miscellaneous
Thread ID:
01610964
Message ID:
01611026
Views:
32
Likes (1)
>>>>Hmm. If I place it before the module I get "missing 'use strict' .
>>>>
>>>>UPDATE: Actually, I get both warnings ('expected an assignment or function call' as well)
>>>
>>>In our code we use (for the service):
>>>
>>>
>>>(function () {
>>>    'use strict';
>>>    
>>>    var app = angular.module('sysMgrApp');
>>>
>>>    app.factory('accountsService', ['$http
>>>
>>
>>I get the same problem if I place it in a function ('expected an assignment or function call').
>>
>>I assume that you checked your Error List and that it is not generating the warning ?
>>
>>(I'm using Web Essentials 2013 1.0)
>
>Where will I see the warning? I'm using VS 2013 and mostly Google Chrome.

Errors and warnings are in the VS Error List window....

>BTW, I created a long question yesterday in regards to the browser you use for testing and unfortunately got UT error when I submitted that question.
>
>So I just ask for now - what is the best way in Angular to determine the browser and do you use any browser specific code in AngularJs application?
>
>Basically, my concern is the difference in appearance. While GC looks nice, IE and FireFox use bigger / wider tables and therefore my table requires scrolling.

There's no particularly 'angular' way of doing - in the end you still have to parse navigator.useragent (which can be unreliable).
If you google 'angular useragent' you'll find several approaches to parsing the string.
Previous
Reply
Map
View

Click here to load this message in the networking platform