File tree Expand file tree Collapse file tree 2 files changed +39
-0
lines changed
projects/elements-demo/src/app/features/examples/basic Expand file tree Collapse file tree 2 files changed +39
-0
lines changed Original file line number Diff line number Diff line change @@ -143,4 +143,37 @@ <h2>Advanced binding (objects instead of primitives)</h2>
143
143
< pre [highlight] ="codeExample4 "> </ pre >
144
144
</ div >
145
145
</ div >
146
+
147
+ < div class ="content ">
148
+ < div class ="implementation " *ngIf ="!example5 ">
149
+ < button mat-flat-button color ="accent " (click) ="example5 = true ">
150
+ < mat-icon > play_arrow</ mat-icon >
151
+ Run
152
+ </ button >
153
+ </ div >
154
+ < div class ="implementation " *ngIf ="example5 ">
155
+ < ng-template #loading > Loading...</ ng-template >
156
+ < ng-template #error > Loading failed...</ ng-template >
157
+ < deckgo-qrcode
158
+ *axLazyElement ="
159
+ 'https://unpkg.com/@deckdeckgo/qrcode@1.0.0-alpha.9/dist/deckdeckgo-qrcode/deckdeckgo-qrcode.js';
160
+ loadingTemplate: loading;
161
+ errorTemplate: error
162
+ "
163
+ content ="https://angular-extensions.github.io/elements "
164
+ style ="--deckgo-qrcode-size: 200px; "
165
+ >
166
+ </ deckgo-qrcode >
167
+ </ div >
168
+ < div class ="description ">
169
+ < p >
170
+ Cool things about the above Ionic example? Ionic is build with Stencil
171
+ and therefore, each Web Components developed and bundled with that
172
+ compiler, could also be load the exact same way as for example for the
173
+ following < code > <deckgo-qrcode> </ code > component from the project
174
+ DeckDeckGo which generates and displays a QR-Code.
175
+ </ p >
176
+ < pre [highlight] ="codeExample5 "> </ pre >
177
+ </ div >
178
+ </ div >
146
179
</ div >
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ export class BasicComponent implements OnInit {
11
11
example2 = false ;
12
12
example3 = false ;
13
13
example4 = false ;
14
+ example5 = false ;
14
15
15
16
// example state
16
17
counter = 0 ;
@@ -21,6 +22,7 @@ export class BasicComponent implements OnInit {
21
22
codeExample2 = CODE_EXAMPLE_2 ;
22
23
codeExample3 = CODE_EXAMPLE_3 ;
23
24
codeExample4 = CODE_EXAMPLE_4 ;
25
+ codeExample5 = CODE_EXAMPLE_5 ;
24
26
25
27
constructor ( ) { }
26
28
@@ -60,3 +62,7 @@ const CODE_EXAMPLE_4 = `<!-- url = 'https://unpkg.com/@ionic/core@4.6.2/dist/ion
60
62
>
61
63
</ion-datetime>
62
64
</ion-item>` ;
65
+
66
+ const CODE_EXAMPLE_5 = `<!-- url = 'https://unpkg.com/@deckdeckgo/qrcode@1.0.0-alpha.9/dist/deckdeckgo-qrcode/deckdeckgo-qrcode.js' -->;
67
+ <deckgo-qrcode *axLazyElement="url" content="https://angular-extensions.github.io/elements" style="--deckgo-qrcode-size: 300px;">
68
+ </deckgo-qrcode>` ;
You can’t perform that action at this time.
0 commit comments