Suppose you have an object named `shareholder` in your 'myController', here's what you can do:
<div ng-controller="myController as $ctrl">
<input name="shares" ng-model="$ctrl.shareholder.shares" type="number" required />
<input name="name" ng-model="$ctrl.shareholder.name" required />
</div>
Remember to make your `shareholder` object `public` if accessed outside the controller.
If you are using `$scope`, here is how you can handle it:
$scope.shareholder = {
shares: 'value from input'
name: 'value from input'
}
In the view, you will use:
<input name="shares" ng-model="shareholder.shares" type="number" required />
<input name="name" ng-model="shareholder.name" required />