winjs / angular-winjs

Project to smooth the AngularJS/WinJS interaction
Other
126 stars 46 forks source link

try.buildwinjs.com/#angular error #48

Closed asglu closed 9 years ago

asglu commented 9 years ago

Hello,

I have been trying angular-winjs in my cordova app and found errors like the angular expressions are not working properly also I have found the same error in the at

http://try.buildwinjs.com/#angular

and here my snapshot

http://i.imgur.com/PvEJ5Rr.png

AmazingJaze commented 9 years ago

Thanks for the bug report. Just for clarification, are you saying that you see the same error when you use the angular sample code from http://try.buildwinjs.com/#angular in your cordova app?

asglu commented 9 years ago

Yes, same error. I added a snapshot of my app in WP8 emulator. Here is the snapshot again http://i.imgur.com/PvEJ5Rr.png

frenchyjef commented 9 years ago

Hi,

Similar issue when using the angular-winjs library in my SPA web application. It is working on Microsoft Edge and Chrome but not Safari and Firefox.

This issue can be reproduced with any of the samples at http://try.buildwinjs.com/#angular

Can you advice on which previous version to fallback on while you investigate this issue?

The issue seems to occur when angular is trying to load the winjs module i.e. angular.module('app', ['winjs'])

I have tested with the following versions...

    "angular": "~1.4.2",
    "winjs": "~4.1.0",
    "angular-winjs": "~3.1.0",

Thanks, J-F

osmanm commented 9 years ago

This is a shot in the dark. Issue I have experienced is the word "use strict" usually when winjs doesn't load in the angular-winjs file. Just for kicks comment out that line. It's the second or the third line and try again.

frenchyjef commented 9 years ago

Success, it worked!

FYI, In the Firefox developer tools, there is a warning stating that 'use scripts' does not allow functions declared in a "if-else" statement... Seems that there is a line in the winjs library that causes that issue.

Will this fix be included in a future release on winjs?

osmanm commented 9 years ago

I'm sure the winjs team will have a fix some time soon.

AmazingJaze commented 9 years ago

@asglu @frenchyjef @osmanm This should be fixed in angular-winjs 3.1.1, released earlier today.

frenchyjef commented 9 years ago

Confirmed, thanks!