Spring でweb アプリを作っていますが、
ng-showの部分を画面とは別のst-table しているリストを表示、ng-repeatして表示しているcolor とは別からのdtoを表示したいのですが、
どうしたら表示できますでしょうか。
Dtoとangularのつながりがわかりません。
Html
<tr ng-repeat-start="color in displayedColorList" class="selectable" ng-click="showColorDetail(color.id);" ng-class="color.id == selectedColorId ? 'selected' : ''"> <td>{{color.outforsaledate}}</td> <td>{{color.name}}</td> </tr> <tr ng-repeat-end ng-show="color.id == selectedColorId"> <td colspan="9"> <h5>作業確認</h5> <table class="table"> <thead> <tr> <th>車の名前</th> <th>車種</th> </tr> </thead> <tbody> <tr> <td>{{car.name}}</td> <td>{{car.type}}</td> </tr> </tbody> </table> </td> </tr>
.Js
testApp.controller('colorCtrl', ['$scope', '$modal', 'sharedMessageService', function($scope, $modal, sharedMessageService) { $scope.from = new Date($scope.today.getFullYear(), $scope.today.getMonth()-1, $scope.today.getDate()); $scope.to = new Date($scope.today.getFullYear(), $scope.today.getMonth(), $scope.today.getDate(), 23, 59, 59); $scope.isLoading = true; $scope.borderDate = editLockFactory.getBorderDate($scope.today); getColor(); function getColor() { $scope.isLoading = true; usSpinnerService.spin('colorSpinner'); colorFactory.getfromto($scope.from, $scope.to) .success(function(colorList) { $scope.colorList = colorList; return color; }); $scope.displayedColorList = angular.copy($scope.colorList); stopSpinner(); }) .error(function(data, status) { sharedMessageService.messages.push({ type: 'danger', content: '取得に失敗しました: Status code ' + status }); sharedMessageService.display = true; stopSpinner(); }); }
あなたの回答
tips
プレビュー