Solved

AngularJS - Bind HTML  error $parse

Posted on 2015-01-22
1
297 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

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

Suggested Solutions

I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
Introduction JSON is an acronym for JavaScript Object Notation.  It is a text-string data transport mechanism, capable of representing simple or complex data structures in a consistent and easy-to-read manner.  Similar in concept to XML, but more e…
The viewer will learn how to dynamically set the form action using jQuery.
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…
Suggested Courses

710 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