Solved

AngularJS - Bind HTML  error $parse

Posted on 2015-01-22
1
287 Views
Last Modified: 2015-01-23
Hi..
I'm trying to bind HTML

   <span ng-bind-html={{fact.text}}></span>

I get an error

Error: [$parse:syntax] http://errors.angularjs.org/1.3.8/$parse/syntax?p0=%7B&p1=invalid%20key&p2=2&p3=%7B%7Bfact%7D%7D&p4=%7Bfact%7D%7D


The JSON looks like this.. any ideas?  thx


  "text": ["Quality",
                        "<b>12<b>",
                        "Report",
                        "<u>Basic</u>"],
0
Comment
Question by:JElster
1 Comment
 
LVL 22

Accepted Solution

by:
ambience earned 500 total points
ID: 40566032
With such skimpy information its hard to tell anything, though the error

"Invalid key fact"

suggests that "fact" is not in scope. See if thats indeed the case.

Also, post the controller (HTML + js) and ideally create a jsfiddle so that experts can actually see and solve it.
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction Got endorsements from your clients?  Great!  There is almost nothing better than word-of-mouth advertising.  But how can you do that on the internet?  Sure you can make a page for endorsement quotations and list them all, but who is …
How to build a simple, quick and effective accordion menu using just 15 lines of jQuery and 2 css classes
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question