Skip to content

Instantly share code, notes, and snippets.

@javaeeeee
Created February 5, 2017 19:04
Show Gist options
  • Save javaeeeee/298968e7fd19805fb17de136c192dea2 to your computer and use it in GitHub Desktop.
Save javaeeeee/298968e7fd19805fb17de136c192dea2 to your computer and use it in GitHub Desktop.
Two HTML section each of which has its own controller.
<section ng-controller="HelloController">
<h4>AngularJS Greeting</h4>
<label for="name">Type your name here:</label>
<input id="name" type="text" ng-model="myModel">
<p>Hello {{myModel}}!</p>
</section>
<section ng-controller="GoodbyeController">
<h4>AngularJS Farewell</h4>
<label for="fName">Type your name here:</label>
<input id="fName" type="text" ng-model="myModel">
<p>Goodbye {{myModel}}!</p>
</section>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment