Writing into a div within a view for angularjs -


using angular js , document.getelementbyid('comments1').innerhtml= how write div within view. new angular js , not know how this.

you don't 'write view' using angular. more correctly, set property on scope bind view property. this.

//in controller $scope.name = "tyler';  //in view <div> {{name}} </div> 

obviously there lot more though. i'd recommend getting deeper understanding of strengths , weaknesses of angular before decide use though.

*if did want write view, you're better off setting directive because shouldn't doing dom manipulation anywhere directive.


Comments

Popular posts from this blog

jQuery Mobile app not scrolling in Firefox -

c++ - How to add Crypto++ library to Qt project -

php array slice every 2th rule -