Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

AngularJS - Bind HTML  error $parse

Posted on 2015-01-22
1
Medium Priority
?
342 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 2000 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

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 discusses how to implement server side field validation and display customized error messages to the client.
The viewer will learn how to dynamically set the form action using jQuery.
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)
Suggested Courses

916 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