You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
<tableng-if="items" border='10'><trng-repeat="item in items track by item.id">
...
<td><ang-click="removeFromList(item)">Remove</a></td></tr></table>
removeFromList modifies the existing array, so the array is always the same object. After the user deletes all the items, we might expect the table will be removed from the DOM because of ngIf and the fact that empty arrays are considered falsy in ngIf, ngShow, etc. However, it doesn't happen.
Consider the following code:
removeFromList
modifies the existing array, so the array is always the same object. After the user deletes all the items, we might expect the table will be removed from the DOM because ofngIf
and the fact that empty arrays are considered falsy inngIf
,ngShow
, etc. However, it doesn't happen.A plunk to play with: http://plnkr.co/edit/FVM0k2K3t4HutA4pZDk4?p=preview
The text was updated successfully, but these errors were encountered: