Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: Bug: Ionic-1.0.0-beta14 - Parse error for lines with $attr.class on Android 2.3 #3062

Closed
revie opened this issue Feb 9, 2015 · 0 comments

Comments

@revie
Copy link

revie commented Feb 9, 2015

Type: bug

Platform: android 2.x webview

Running the latest Beta 14, I ran into the following error when running on Android 2.3:

D/CordovaLog( 349): file:///android_asset/www/lib/ionic/js/ionic.bundle.js: Line 46718 : SyntaxError: Parse error
E/Web Console( 349): SyntaxError: Parse error at file:///android_asset/www/lib/ionic/js/ionic.bundle.js:46718

which appears to be this line:

var headerBarEle = jqLite('<ion-header-bar>').addClass($attrs.class).attr('align-title', alignTitle);

and first reported by akhil in the Forum at:

http://forum.ionicframework.com/t/ionic-beta-14-gives-js-error-in-android-emulator/15474/5

Apparently, older versions of Android don't like "$attrs.class", as first identified last year:

#1228

Changing "$attrs.class" to "$attrs['class']" in the Ionic bundle seems to have fixed the problem for me, with no side effects in the other versions of Android and iOS I'm testing in. Should this same change be integrated back into the source tree for others who may be experiencing the same problems?

@revie revie changed the title Bug: Ionic-1.0.0-beta14 - Parse error for lines with $attr.class on Android 2.3 bug: Bug: Ionic-1.0.0-beta14 - Parse error for lines with $attr.class on Android 2.3 Feb 9, 2015
@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Sep 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant