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
I would like to replicate the ngIf directive from Angular in hyperscript.
To do that I need to remove or add from DOM elements based on a condition.
But I didn't find a manner with hyperscript currently.
Here an example code to begin with :
<div_="set global currentItem to 0"><div**forloopwithindex**><divclass="element**index**""><p>Hello world</p></div></div><button_="on click show :currentItem and remove others then halt the event"></div>
The idea is to hide/show (by removing or adding) element depending its index. If the index is equal tu currentItem it shows the element otherwise it is removing it.
The text was updated successfully, but these errors were encountered:
I would like to replicate the ngIf directive from Angular in hyperscript.
To do that I need to remove or add from DOM elements based on a condition.
But I didn't find a manner with hyperscript currently.
Here an example code to begin with :
The idea is to hide/show (by removing or adding) element depending its index. If the index is equal tu currentItem it shows the element otherwise it is removing it.
The text was updated successfully, but these errors were encountered: