Last active
October 21, 2022 14:14
-
-
Save SanderElias/043e7904de7e10b9ba9a3ef948c3dde8 to your computer and use it in GitHub Desktop.
Revisions
-
SanderElias revised this gist
Oct 21, 2022 . 1 changed file with 5 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,20 +1,21 @@ import {Component, Inputs, InputDefault, html, css} from '@angular/core' export class MySampleComponent implements Component { #title = "world!"; selector: 'app-my-sample-component`; css = css` ul { list-style: none } `; template: html` <H1>Hello {{#title}}</H1> <ul> <li *ngFor="let item of inputs.items | async">{{item.name}}</li> </ul> <footer>{{inputs.footerTest}}></footer> `; inputs = Inputs({ items: { @@ -26,6 +27,6 @@ export class MySampleComponent implements Component { default: '', typing: string } }); } -
SanderElias created this gist
Oct 21, 2022 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,31 @@ import {Component, Inputs, InputDefault, html, css} from '@angular/core' export class MySampleComponent implements Component { #title = "world!" css = css` ul { list-style: none } ` template: html` <H1>Hello {{#title}}</H1> <ul> <li *ngFor="let item of inputs.items | async">{{item.name}}</li> </ul> <footer>{{inputs.footerTest}}></footer> ` inputs = Inputs({ items: { default: InputDefault.none, // works like replaySubject, only emits after first value observable: true, typing: Item[] }, footerTest: { default: '', typing: string } }) }