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

My HTML document is not linking to my CSS stylesheet properly -

php array slice every 2th rule -

node.js - Sending sockets to client side, Error: Converting circular structure to JSON -