의 값을 갱신하지 않는 경우와 동일한 컨트롤러 categoryCtrl 하에서 2 UI 뷰하고 :UI 뷰 내가 catalog.html 각 애플리케이션이 제어기
catalog.html
<!-- SEARCH -->
<div ui-view="search-catalog"></div>
<!-- CONTENT -->
<div ui-view="result"></div>
내가 search-catalog
뭔가를 변경의 때
.state('catalog', {
url: '/catalog',
views: {
'search-catalog': {
templateUrl: 'views/search-catalog.html',
controller: 'categoryCtrl'
},
'result': {
templateUrl: 'views/result.html',
controller: 'categoryCtrl'
},
을 app.js categoryCtrl 내부의 변경 사항은 result
에 반영되지 않습니다. 특히, 배열 $ scope.items 및 ng-repeat가 값을 업데이트하지 않습니다.
감사합니다. 귀하의 솔루션을 시도하고 알려 드리겠습니다 –
ui-views를'catalog.html'에 넣어야 만합니다. –