I have a web form that contains the following two blocks:
<div class="mm-FilterRow">
<div>First Name:</div>
<div><i ng-hide="user.FirstName">Loading...</i><select ng-show="choices.FirstNames" ng-model="user.FirstName" ng-options="o as o for o in choices.FirstNames"></select></div>
</div>
<div class="mm-FilterRow">
<div>Last Name:</div>
<div><i ng-hide="user.LastName">Loading...</i><select ng-show="choices.LastNames" ng-model="user.LastName" ng-options="o as o for o in choices.LastNames"></select></div>
</div>
As you can see, the only difference between those two are the Scope-Variables "user.FirstName|user.LastName" and the selection options "choices.FirstNames|choices.LastNames"
Because I have about 10 divs of the same structure I would like to do something like: (This is pseudocode, non-working)
<div ng-include="singlerow.html" caption="First name" scopetarget="user.FirstName" scopeSource="choices.FirstNames">
<div ng-include="singlerow.html" caption="Last name" scopetarget="user.LastName" scopeSource="choices.LastNames">
Is there a chance to achieve what I want? Or do I have to keep those ugly copy/paste-variants?