diff --git a/awx/ui/client/features/templates/index.controller.js b/awx/ui/client/features/templates/index.controller.js index fd0850d582..5f305345a9 100644 --- a/awx/ui/client/features/templates/index.controller.js +++ b/awx/ui/client/features/templates/index.controller.js @@ -1,12 +1,19 @@ -function IndexTemplatesController (strings, dataset) { +function IndexTemplatesController ($scope, strings, dataset) { let vm = this; vm.strings = strings; vm.count = dataset.data.count; + + $scope.$on('updateDataset', (e, { count }) => { + if (count) { + vm.count = count; + } + }); } IndexTemplatesController.$inject = [ + '$scope', 'TemplatesStrings', - 'Dataset' + 'Dataset', ]; export default IndexTemplatesController;