File tree Expand file tree Collapse file tree 6 files changed +17
-34
lines changed
_templates/playground/new Expand file tree Collapse file tree 6 files changed +17
-34
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ ---
2+ to: "<%= ` static/usage/v${ version} /${ name} /${ path} /angular/example_component_html.md` %> "
3+ ---
4+ ```html
5+ <<%= component %> ></<%= component %> >
6+ ```
Original file line number Diff line number Diff line change 11---
2- # this file only gets generated if `angular_ts` (from the command line prompt) is true
3- to: "<%= angular_ts ? ` static/usage/v${ version} /${ name} /${ path} /angular/example_component_ts.md` : null %> "
2+ arbitrary: <% pascalComponent = h . changeCase . pascal (component) %>
3+ to: "<%= ` static/usage/v${ version} /${ name} /${ path} /angular/example_component_ts.md` %> "
44---
55```ts
66import { Component } from '@angular/core';
7+ import { <%= pascalComponent %> } from '@ionic/angular/standalone';
78
89@Component({
910 selector: 'app-example',
1011 templateUrl: 'example.component.html',
11- <% if (css){ -% >
1212 styleUrls: ['./example.component.css'],
13- < % } - %>
13+ imports: [ <%= pascalComponent %> ],
1414})
15- export class ExampleComponent {
16- }
15+ export class ExampleComponent {}
1716```
Original file line number Diff line number Diff line change @@ -62,11 +62,6 @@ module.exports = {
6262 name : 'css' ,
6363 message : 'Generate custom CSS files?' ,
6464 } ,
65- {
66- type : 'toggle' ,
67- name : 'angular_ts' ,
68- message : 'Generate an Angular TypeScript file?' ,
69- } ,
7065 ] )
7166 . then ( ( answers ) => {
7267 answers . name = answers . name || answers . component . replace ( 'ion-' , '' ) ;
Original file line number Diff line number Diff line change @@ -12,17 +12,12 @@ import react_main_css from './react/main_css.md';
1212import react from ' ./react.md' ;
1313< % } - %>
1414import vue from './vue.md';
15- <% if (css || angular_ts){ % >
15+
1616import angular_example_component_html from './angular/example_component_html.md';
17- < % } else { -% >
18- import angular from ' ./angular.md' ;
19- < % } - %>
20- <% if (angular_ts){ -% >
21- import angular_example_component_ts from ' ./angular/example_component_ts.md' ;
22- < % } - %>
2317<% if (css){ -% >
2418import angular_example_component_css from ' ./angular/example_component_css.md' ;
2519< % } - %>
20+ import angular_example_component_ts from './angular/example_component_ts.md';
2621
2722<Playground
2823 version =" <%= version %>"
@@ -39,21 +34,15 @@ import angular_example_component_css from './angular/example_component_css.md';
3934 react,
4035< % } - %>
4136 vue,
42- <% if (angular_ts || css){ -% >
4337 angular: {
4438 files: {
4539 'src/app/example.component.html': angular_example_component_html,
46- < % if (angular_ts){ -% >
47- ' src/app/example.component.ts' : angular_example_component_ts,
48- < % } -% >
4940<% if (css){ -% >
5041 ' src/app/example.component.css' : angular_example_component_css,
5142< % } - %>
43+ 'src/app/example.component.ts': angular_example_component_ts,
5244 },
5345 },
54- < % } else { -% >
55- angular,
56- < % } - %>
5746 }}
5847 src="usage/v<%= version %> /<%= name %> /<%= path %> /demo.html"
5948/>
Original file line number Diff line number Diff line change @@ -11,9 +11,10 @@ import './main.css';<% } %>
1111
1212function Example() {
1313 return (
14- <<%= pascalComponent %> ></<%= pascalComponent %> >
14+ <>
15+ <<%= pascalComponent %> ></<%= pascalComponent %> >
16+ </>
1517 );
1618}
1719export default Example;
1820```
19-
You can’t perform that action at this time.
0 commit comments