j-Empty
pathdeve contenere una fonte di dati che sarà monitorata
Configurazione:
icon {String}un'icona predefinita (predefinito:ti ti-database)parent {String}un contenitore parentale che stabilisce una altezza minima (default:parent)- Dimensioni di altezza
height {Number}(se non si desidera utilizzareparent, standard:undefined) margin {Number}a margine (default:0)topoffset {Boolean}applicaelement.offset().topcome margine (default:false)topposition {Boolean}applicaelement.position().topcome margine (default:false)- NEW
wait {Boolean}attende i dati (default:false)
Caso di utilizzo 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>Caso di utilizzo 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-componentUtilizzare con <ui-component name="empty">Quando il componente non è ancora caricato, jComponent Scarica il codice in prima utilizzazione dall'indirizzo DEF.fallback (Il Componentator La storia di Peter Širka.Fonte: il Componentator Ristorante dei componenti, licenza 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>