UNPKG

todomvc

Version:

> Helping you select an MV\* framework

21 lines (17 loc) 400 B
/*global define */ 'use strict'; define([ 'flight/lib/component' ], function (defineComponent) { function mainSelector() { this.toggle = function (e, data) { var toggle = data.all > 0; this.$node.toggle(toggle); }; this.after('initialize', function () { this.$node.hide(); this.on(document, 'dataStatsCounted', this.toggle); }); } return defineComponent(mainSelector); });