I have a form that is divided into sections like so:
education: {faculty: "", high_school: ""}
experience: {experience_1: "", experience_2: "", experience_3: ""}
personalInfo: {id: "", type: "", email: "", password: "", password_new: "", first_name: "", last_name: "",…}
skills: {skill_1: "", skill_2: ""}
all inputs are displayed with ngRepeat.
<div ng-repeat="(key, val) in user" >
<div ng-repeat="(k,v) in val | filter:filterBySection" class="formParameter" >
<span class="param_label">
{{k}}:
</span>
<span e-class="form-control " class="formParameterValue" editable-text="user.{{key}}.{{k}}" e-name="{{k}}">{{v}}</span>
</div>
</div>
how would I implement a filter that will display only the chosen section. For example: If I press the education button then show only 'faculty' and 'high school'
<li ng-repeat="(a,b) in user" ng-click="filterBySection = ?:{{a}}" ng-model="filterBySection"><a href="#">{{doc_param}}</a></li>
Please provide suggestion for it.
You can show different div containers by setting a certain variable by using your button, in this case "tab". Then only the dif with the according tab-value will be shown by testing the value of "tab" with ng-show.