How can you display a user's input in another html file in AngularJS?
<div ng-app>
<div>
<label>Input:</label>
<input type="text" ng-model="uInput" placeholder="Enter text here">
<hr>
</div>
</div>
another file:
<div>
<h1>{{ uInput }}</h1>
</div>
Right now, it takes the input but doesn't display it in the new page.
In other words, how do I pass the user input to the other view?
ng-controller="someController". Declare these onbodyordivor whatever you use on those two pages. So essentially both the pages would be using same controller and shall have same values on scope. Second way, you can have routes setup, there you can mention template url and controllers. Here you shall have template urls as"page1.html"and"page2.html"but the controller declaration can be same as"someController".