j-Empty
pathтрябва да съдържа източник на данни, който ще бъде наблюдавано
Конфигуриране:
icon {String}икона (предварително:ti ti-database)parent {String}- родителски контейнер, който поставя минимална височина (предварително:parent)- Размер на височината на
height {Number}(ако не искате да използватеparent, по подразбиране:undefined) margin {Number}марж (дефолт:0)topoffset {Boolean}прилагаelement.offset().topкато марж (предварително:false)topposition {Boolean}прилагаelement.position().topкато марж (предварително:false)- NEW
wait {Boolean}чака за данните (предварително:false)
Използване 1:
<ui-component name="empty" path="datasource" class="hidden">
Items not found
</ui-component>
<ui-bind path="datasource" config="show:value && value.length" class="hidden"></ui-bind>Използване 2:
<ui-component name="empty" path="datasource" class="hidden">
<script type="text/html">
Items not found
</script>
<div>
YOUR CONTENT. This DIV will be hidden automatically if the "datasource" is empty.
</div>
</ui-componentИзползвайте го с <ui-component name="empty">Когато компонентът все още не е зареден, jComponent Изтегляне на първия адрес в DEF.fallback (След това Componentator Източник: Питър Шерка Componentator Съставни съставки, лиценз на MIT.
<ui-component name="empty" path="datasource" config="parent:window;wait:false" class="hidden">The datasource is empty.</ui-component>
<script>
var datasource = [];
// Empty component will be hidden after 5 seconds
PUSH('datasource', { item: 1 }, 5000);
</script>