1

Getting this error i am retriving data from web sql using jaydata.

Error: Lexer Error: Unexpected next character at columns 27-27 [µ] in expression [foodDetail.FoodItem.Vit_C__µg_].

My code is as below

<i>
  <li><span>Vitamin C</span><span style="float:right">{{foodDetail.FoodItem.Vit_C__µg_}}</span></li>
  <li><span>Vitamin B6</span><span style="float:right">{{foodDetail.FoodItem.Vit_B6__mg_}}</span></li>
</i>
2
  • Should be a restriction of Angular parser - and should be considered a bug probably; it's allowed to use this kind of symbols in JS identifiers. Have you submitted the bug to Angular team?
    – raina77ow
    Commented Nov 25, 2013 at 10:48
  • 1
    In fact, there's one. I'd suggest checking the pull request issued for it.
    – raina77ow
    Commented Nov 25, 2013 at 10:58

1 Answer 1

0

Please try below:

angular.module("test", [])
.run(function($rootScope) {
  $rootScope.foodDetail = {
    FoodItem: {
      'Vit_C__µg_': 'Vit_C__µg_Val',
      'Vit_B6__mg_': 'Vit_B6__mg_Val',
    }
  };
});

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.