Exams by type AngularJs

0

Well, I have a problem with my code. I was supposed to get all the exams of a certain type.

<div class="box-body" id="teste" ng-app="app" ng-init="chargeData()" ng-controller="FormCtrl">
    <ul class="nav nav-tabs" role="tablist">
        <li ng-repeat="category in categories"><a href="#{{category.ClinicalExamCategoryId}}" data-toggle="tab">{{category.clinicalExamCategoryName}}</a></li>
    </ul>
    <div class="tab-content">
        <div ng-repeat="category2 in categories2" class="tab-pane" id="{{category2.ClinicalExamCategoryId}}">
            <br>
            <div class="row">
                @*<div class="row" ng-init="chargeType(category2.ClinicalExamCategoryId)">*@
                    <div class="col-xs-6" ng-repeat="type in category2.ClinicalExamTypes">
                        <div class="box box-primary">
                            <div class="box-header">
                                <h3 class="box-title">{{type.clinicalExamTypeName}}</h3>
                                <div class="row">
                                    <div class="col-xs-6" ng-init="chargeExam(type.ClinicalExamTypeId);">
                                        @*<div class="col-xs-6" ng-repeat="exam in stdFromTemplate">*@
                                            <div class="col-xs-12">
                                                <dynamic-form template="stdFromTemplate" ng-model="stdFormData">
                                                </dynamic-form>
                                            </div>
                                        @*</div>*@
                                    </div>
                                </div>
                            </div>
                        </div>
                        <br>
                    </div>
                </div>
            </div>
        </div>
    </div>

$scope.chargeExam = function (id) {
             $http.get("/ClinicalExams/SelectExam/" + id).success(function (data, status, headers, config) {
                 $scope.stdFromTemplate = {};
                 $scope.stdFromTemplate = data;
             }).error(function (data, status, headers, config) {
                 $scope.state = "ERRO DE EXECUÇÃO";
             });
         }

It turns out that instead of appearing exams of one type, in each box, all types appear.

    
asked by anonymous 20.02.2015 / 10:28

0 answers