update badge count on search

This commit is contained in:
Jake McDermott 2018-04-09 15:04:52 -04:00
parent 51d43e59e4
commit 04d8642daf
No known key found for this signature in database
GPG Key ID: 3B02CAD476EECB35

View File

@ -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;