File tree Expand file tree Collapse file tree
samples/tutorials/reactivity
site/tutorials/content/reactivity Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -16,9 +16,8 @@ export class MyElement extends LitElement {
1616
1717 render ( ) {
1818 return html `
19- < button @click =${ this . flipCoin } > Flip a coin!</ button >
20- < p > Result: ${ this . result } </ p >
21-
19+ < button @click =${ this . flipCoin } > Flip a coin!</ button >
20+ < p > Result: ${ this . result } </ p >
2221 ` ;
2322 }
2423}
Original file line number Diff line number Diff line change @@ -16,8 +16,8 @@ export class MyElement extends LitElement {
1616
1717 render ( ) {
1818 return html `
19- < button @click =${ this . flipCoin } > Flip a coin!</ button >
20- < p > Result: ${ this . result } </ p >
19+ < button @click =${ this . flipCoin } > Flip a coin!</ button >
20+ < p > Result: ${ this . result } </ p >
2121 ` ;
2222 }
2323}
Original file line number Diff line number Diff line change @@ -17,9 +17,8 @@ export class MyElement extends LitElement {
1717
1818 render ( ) {
1919 return html `
20- < button @click =${ this . flipCoin } > Flip a coin!</ button >
21- < p > Result: ${ this . result } </ p >
22-
20+ < button @click =${ this . flipCoin } > Flip a coin!</ button >
21+ < p > Result: ${ this . result } </ p >
2322 ` ;
2423 }
2524}
Original file line number Diff line number Diff line change @@ -15,9 +15,8 @@ export class MyElement extends LitElement {
1515
1616 render ( ) {
1717 return html `
18- < button @click =${ this . flipCoin } > Flip a coin!</ button >
19- < p > Result: ${ this . result } </ p >
20-
18+ < button @click =${ this . flipCoin } > Flip a coin!</ button >
19+ < p > Result: ${ this . result } </ p >
2120 ` ;
2221 }
2322}
Original file line number Diff line number Diff line change @@ -15,8 +15,8 @@ export class MyElement extends LitElement {
1515
1616 render ( ) {
1717 return html `
18- ${ map ( this . groceries , ( item ) =>
19- html `< button @click =${ ( ) => this . removeItem ( item ) } > x</ button > ${ item } < br > `
18+ ${ map ( this . groceries , ( item ) =>
19+ html `< button @click =${ ( ) => this . removeItem ( item ) } > x</ button > ${ item } < br > `
2020 ) }
2121 ` ;
2222 }
Original file line number Diff line number Diff line change @@ -14,8 +14,8 @@ export class MyElement extends LitElement {
1414
1515 render ( ) {
1616 return html `
17- ${ map ( this . groceries , ( item ) =>
18- html `< button @click =${ ( ) => this . removeItem ( item ) } > x</ button > ${ item } < br > `
17+ ${ map ( this . groceries , ( item ) =>
18+ html `< button @click =${ ( ) => this . removeItem ( item ) } > x</ button > ${ item } < br > `
1919 ) }
2020 ` ;
2121 }
Original file line number Diff line number Diff line change @@ -31,6 +31,6 @@ export class MyElement extends LitElement {
3131 < label > Backward: < input id ="backward " @input =${ this . onInput } .value =${ this . backward } > </ label >
3232 < div > Forward text: ${ this . forward } </ div >
3333 < div > Backward text: ${ this . backward } </ div >
34- `
34+ ` ;
3535 }
3636}
Original file line number Diff line number Diff line change @@ -21,6 +21,6 @@ export class MyElement extends LitElement {
2121 < label > Backward: < input id ="backward " @input =${ this . onInput } .value =${ this . backward } > </ label >
2222 < div > Forward text: ${ this . forward } </ div >
2323 < div > Backward text: ${ this . backward } </ div >
24- `
24+ ` ;
2525 }
2626}
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ export class MyElement extends LitElement {
3333 if ( changedProperties . has ( '_showMessage' ) ) {
3434 const final = this . _message . getBoundingClientRect ( ) . width ;
3535 const starting = 0 - final ;
36- var player = this . _message . animate ( [
36+ this . _message . animate ( [
3737 { transform : `translateX(${ starting } px)` } ,
3838 { transform : `translateX(0)` }
3939 ] , {
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ export class MyElement extends LitElement {
1818 _showMessage = false ;
1919
2020 @query ( '#message' )
21- _message ! : HTMLParagraphElement ;
21+ _message ! : HTMLDivElement ;
2222
2323 render ( ) {
2424 return html `
You can’t perform that action at this time.
0 commit comments