javascript - Two way data binding for html contents in angularjs? -


i have content coming server. want bind model variable using angularjs.

suppose i'm getting following server.

<html>   <body>         <div id="post">       <div id="post-id">123</div>       <div id="post-author">shahal</div>       <div id="post-content">lorem ipsum dolor sit amet, consectetur adipisicing elit. quisquam, tempora.</div>     </div>   </body> </html> 

i want create model variable post contents of appropriate fields in it. it's not possible ngbind scope-->view 1 way binding. , can't use ngmodel.please help.

although title says two way data binding, your comments deduced want single way data-binding.
if case, way :

<div id="post">   <div id="post-id">{{post.id}}</div>   <div id="post-author">{{post.author}}</div>   <div id="post-content">{{post.content}}</div> </div> 

Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -