Answer the question
In order to leave comments, you need to log in
How to pass ng-switch value to ng-include?
There are 2 html documents:
first-doc.html
<div class="first-doc">
<select ng-model="selection">
<option value="1">Первый</option>
<option value="2">Второй</option>
</select>
</div>
<div class="second-doc">
<select ng-model="selection" ng-switch="selection">
<div ng-switch-when="1">первый вариант</div>
<div ng-switch-when="2">второй вариант</div>
<div ng-switch-default>ничего не выбрано</div>
</select>
</div>
<div class="wrapper">
<div ng-include="first-doc.html"></div>
<div ng-include="second-doc.html"></div>
</div>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question