$scope.data = {}; $scope.term = ['question1','question2','question3']; $scope.add = function(){ if($scope.data.mode == 'question1') return 'answer.html'; else if($scope.data.mode == 'question2') return 'question.html'; else if($scope.data.mode == 'question3') return 'price.html'; }; $scope.list = {}; $scope.result = function(){ if($scope.list.mode == 'yes') return 'Ответ верный'; else if($scope.list.mode == 'no') return 'Ответ неверный'; } }); </script> </head> <body ng-controller="studyCtrl"> <div class="container"> <div class="col-md-4 new"> <h2>Вопросы:</h2> <label> <div class="radio" ng-repeat="button in term"> <input type="radio" ng-model="data.mode" value={{button}}/> {{button}}<br> </div> </label> </div> <div class="col-md-8"> <ng-include src="add()"></ng-include> </div> {{result()}} 

The add () function, when called, does not display the result of its work — the connection of the selected html page.

Closed due to the fact that off-topic participants Kromster , cheops , aleksandr barakin , user194374, Grundy Jun 16 '16 at 10:40 .

It seems that this question does not correspond to the subject of the site. Those who voted to close it indicated the following reasons:

  • "The question is caused by a problem that is no longer reproduced or typed . Although similar questions may be relevant on this site, solving this question is unlikely to help future visitors. You can usually avoid similar questions by writing and researching a minimum program to reproduce the problem before publishing the question. " - aleksandr barakin, Grundy
  • “Questions asking for help with debugging (“ why does this code not work? ”) Should include the desired behavior, a specific problem or error, and a minimum code for playing it right in the question . Questions without an explicit description of the problem are useless for other visitors. See How to create minimal, self-sufficient and reproducible example . " - Kromster, cheops, Community Spirit
If the question can be reformulated according to the rules set out in the certificate , edit it .

  • If you are given an exhaustive answer, mark it as correct (a daw opposite the selected answer). - Nicolas Chabanovsky

1 answer 1

Your html is not valid, value should look like value="{{button}}" .
Modern browsers are smart, and they are able to bring html to a valid form, so in this case the slash will catch on value, since there are no spaces.

And your own so that you can choose to install one option, and not all radio buttons should have the same name tags, for example name="templateSrc"

  • Thanks for the help - it all worked !!! - prochka
  • Thanks again for the helpful comment! - prochka