I was trying to understand how Angular.js works with a simple example.
<div ng-app="">
<p>Input something in the input box:</p>
<p>Name : <input type="text" ng-model="name" placeholder="Enter name here"></p>
<h1>Hello {{name}}</h1>
</div>
Is there any way that I can remove all of this, and just use angular on a separate JavaScript?
I mean to be able to do something like...
document.getElementsByTagName('input')[0].ng-model = "name";
document.getElementsByTagName('h1')[0].innerHTML = "Hello {{name}}";
Or is it mandatory to mesh with the HTML attributes?
I couldn't find any information related. Thanks in advance.
