dart - How to Remove a Polymer paper-listbox Item in an AngularDart Component -
i generate paper-listbox follows:
<paper-listbox class="scroll-list gutter" id="index"> <paper-item class="index-entry" *ngfor="let composition of compositions" [class.selected]="composition == selectedcomposition" (click)="onselect(composition)"> {{ composition.name }} </paper-item> </paper-listbox>
i have method deletes item database. want remove corresponding entry list well. found this stackoverflow question , tried it. gave no such method error when ran it. tried:
paperlistbox index; ... index = queryselector('#index'); ... index.remove();
it removes entire listbox. in ball park tried:
index.selecteditem().remove();
that gave me browser console error:
original exception: class 'paperitem' has no instance method 'call'. nosuchmethoderror: method not found: 'call' receiver: instance of 'paperitem' arguments: []
given error mentions paper-item makes me think i'm getting close, i'm out of ideas. how 1 delete paper-listbox item? credit, how 1 add item? that's next task.
just remove item composition
, *ngfor
updates list of <paper-item ...>
entries automatically.
Comments
Post a Comment