import ngModule from '../module'; import Section from 'salix/components/section'; export default class Controller extends Section { constructor($element, $) { super($element, $); } goToIndex(daysAgo) { const issued = Date.vnNew(); issued.setDate(issued.getDate() - daysAgo); this.$state.go('invoiceIn.index', {q: `{"isBooked": true, "from": ${issued.getTime()}}`}); } } Controller.$inject = ['$element', '$scope']; ngModule.vnComponent('vnInvoiceInSerial', { template: require('./index.html'), controller: Controller });