0
Good, I have a problem with my code. I was supposed to get all the tests 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 showing up a guy’s exams, in each box, all kinds of.
What is the format of the data returned by the call
/ClinicalExams/SelectExam/id
?– Vinícius Gobbo A. de Oliveira
The call data is returned via json. within json comes the following content 0: {Clinicalexamtypes: [{Clinicalexams: [{,... }, {,... }, {,... }, {,... }],… }, {ClinicalExams: [{,… }, {,… }],… }],… }
ClinicalExamCategoryId: 1
ClinicalExamTypes: [{ClinicalExams: [{,… }, {,… }, {,… }, {,… }],… }, {Clinicalexams: [{,... }, {,... }],... }] Company: {id: 1, name: "Clinica Safemed", commercialRegistrationNumber: null, sharedBilling: false,... } Companyid: 1 clinicalExamCategoryDetail: "cat1" clinicalExamCategoryName: "cat1" 1: {Clinicalexamtypes: [{Clinicalexams: [{,... }, {,... }],... }, {Clinicalexams: [{,... }, {,... }],... }],...}
– Bruno Santos
Update your question with the idented data. Do not post in the comment.
– Vinícius Gobbo A. de Oliveira