mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-10-01 14:41:32 +00:00
Simple list component with array watching
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
<script src="/bower_components/underscore/underscore-min.js"></script>
|
||||
<script src="/bower_components/underscore-observable-arrays/underscore-observe.js"></script>
|
||||
|
||||
<!-- Defines element markup -->
|
||||
<template>
|
||||
<ul id="list"></ul>
|
||||
@@ -31,11 +34,12 @@
|
||||
};
|
||||
*/
|
||||
|
||||
/*
|
||||
var self = this;
|
||||
// TODO: unobserve for old _items value if needed
|
||||
_.observe(_items, function(new_array, old_array) {
|
||||
|
||||
_items = new_array || [];
|
||||
self._render();
|
||||
});
|
||||
*/
|
||||
|
||||
this._render();
|
||||
}
|
||||
|
Reference in New Issue
Block a user