mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
Minor improvements
This commit is contained in:
@@ -16,7 +16,7 @@ import {Component} from "angular2/core";
|
||||
List below is a web component bound to array of items coming from angular.<br>
|
||||
Add/remove buttons control angular array and web component reacts on changes.
|
||||
</p>
|
||||
<simple-list [items]="items"></simple-list>
|
||||
<simple-list [items]="items" class="list-unstyled"></simple-list>
|
||||
<button (click)="addItem()">add item</button>
|
||||
<button (click)="removeItem()">remove item</button>
|
||||
</div>
|
||||
@@ -28,7 +28,7 @@ export class Page2View {
|
||||
items = ['one', 'two', 'three'];
|
||||
|
||||
addItem() {
|
||||
this.items.push('test');
|
||||
this.items.push(new Date());
|
||||
}
|
||||
|
||||
removeItem() {
|
||||
|
@@ -72,8 +72,8 @@
|
||||
this.list.innerHTML = '';
|
||||
if (_items && _items.length > 0) {
|
||||
for (var i = 0; i < _items.length; i++) {
|
||||
var item = document.createElement('div');
|
||||
item.textContent = 'item ' + i;
|
||||
var item = document.createElement('li');
|
||||
item.textContent = _items[i];
|
||||
this.list.appendChild(item);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user