I am new to Javascript world and doing Angular.JS. I wrote a simple hello world code where I use ng-controller to assign a variable with 'Hello World' and I bind the value in HTML.
<div ng-controller="Controller">{{DisplayData}}</div>
my controller is
function Controller($scope) { $scope.DisplayData = "Hello World"; }
When I run the code and it displays 'Hello World' properly as I expected. Out of curiosity, I checked the code behind and expecting 'Hello World' inside a div, instead it showed my HTML code with angular directives in it.
I read the doc in http://docs.angularjs.org/guide/concepts#startup expecting to get an idea why is it doing it but I am not really sure I understood.
So here are my questions; I thought HTML is static and browsers render the HTML as it is. So if we need to create anything dynamic, we eval the values and replace them with actual value through java script, before we create the final DOM objects. is the understanding wrong?