Solved

AngularJS - Bind HTML  error $parse

Posted on 2015-01-22
1
265 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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
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…

746 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now