angularjs - Can't render date in template -


i have in template:

<div ng-repeat="item in mainctrl.items" class="item">    <h4 ng-bind="item.title"><small ng-bind="item.pub_date"><strong></strong></small></h4>    <p ng-bind="item.content"></p> </div> 

the item.content , item.content shows respectively. however, item.pub_date don't show value in there. empty portion @ date should in rendered template.

using batarang, realized pub_date value shows in template, doesn't render or what.

this how appears when in batarang

pub_date: 2014-12-05t18:27:30.939z 

do need add date filter make work? i'm not exposing value within pub_date item or? thanks

that because h4 tag wrapping small tag overrides content. ngbind directive replaces existing content.

either move small out of h4 or use double curly notation title as:

<h4>{{item.title}}<small ng-bind="item.pub_date"><strong></strong></small></h4>


Comments

Popular posts from this blog

javascript - How to synchronize the Three.js and HTML/SVG coordinate systems (especially w.r.t. the y-axis)? -

javascript - How do I find how many occurences are there of a highlighted string, and which occurence is it? -

java - Reading data from multiple zip files and combining them to one -