Having trouble wrapping my head around something in Angular. I have a page where I list blog posts (or will, anyway). The posts are stored within a database. Angular gets them from a php script. That's all fine and dandy, but these blogs will understandably have tags (a, img, etc.) embedded in them. Angular doesn't seem to like that.
After searching around here I found an answer two the error produced when my blog posts had newline characters in them (the horror). (white-space: pre-wrap). I'm finding no such love with an embedded tag. Also, having a double quotation mark in a message results in the page not being rendered and an error in the console.
I'm sure this has been asked many times, but the search is only yielding me false positives. :(
EDIT: plunker or jsfiddle will require me to change the model a bit. Let me try this.
Here's the actual code.
<script>
function aboutController($scope,$http) {
var site = "http://onfilm.us";
var page = "/about.php";
$http.get( site + page )
.success(function(response) {
for ( i = 0; i < response.length; i++ ) {
console.log( response[i] )
}
$scope.data = response;
});
}
</script>
</head>
<body>
<script src="header.js"></script>
<div class="centered" style="top: 50px; width: 500px" data-ng-app="" data-ng-controller="aboutController">
<div class="" style="font-family: sans-serif;" data-ng-repeat="item in data">
<div class="text">{{ item.message }}</div>
</div>
</div>
</body>
You can see the output in action here: http://onfilm.us/about.html
The troubling part would be in this snippit. taken from Erick Kim's informative website ... It shows up as string literal w/ the code above... not a link.
You can see the whole data it's reading in here if you want: http://onfilm.us/about.php