File tree 6 files changed +17
-34
lines changed
_templates/playground/new
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 1
1
---
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` %> "
4
4
---
5
5
```ts
6
6
import { Component } from '@angular/core';
7
+ import { <%= pascalComponent %> } from '@ionic/angular/standalone';
7
8
8
9
@Component({
9
10
selector: 'app-example',
10
11
templateUrl: 'example.component.html',
11
- <% if (css){ -% >
12
12
styleUrls: ['./example.component.css'],
13
- < % } - %>
13
+ imports: [ <%= pascalComponent %> ],
14
14
})
15
- export class ExampleComponent {
16
- }
15
+ export class ExampleComponent {}
17
16
```
Original file line number Diff line number Diff line change @@ -62,11 +62,6 @@ module.exports = {
62
62
name : 'css' ,
63
63
message : 'Generate custom CSS files?' ,
64
64
} ,
65
- {
66
- type : 'toggle' ,
67
- name : 'angular_ts' ,
68
- message : 'Generate an Angular TypeScript file?' ,
69
- } ,
70
65
] )
71
66
. then ( ( answers ) => {
72
67
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';
12
12
import react from ' ./react.md' ;
13
13
< % } - %>
14
14
import vue from './vue.md';
15
- <% if (css || angular_ts){ % >
15
+
16
16
import 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
- < % } - %>
23
17
<% if (css){ -% >
24
18
import angular_example_component_css from ' ./angular/example_component_css.md' ;
25
19
< % } - %>
20
+ import angular_example_component_ts from './angular/example_component_ts.md';
26
21
27
22
<Playground
28
23
version =" <%= version %>"
@@ -39,21 +34,15 @@ import angular_example_component_css from './angular/example_component_css.md';
39
34
react,
40
35
< % } - %>
41
36
vue,
42
- <% if (angular_ts || css){ -% >
43
37
angular: {
44
38
files: {
45
39
'src/app/example.component.html': angular_example_component_html,
46
- < % if (angular_ts){ -% >
47
- ' src/app/example.component.ts' : angular_example_component_ts,
48
- < % } -% >
49
40
<% if (css){ -% >
50
41
' src/app/example.component.css' : angular_example_component_css,
51
42
< % } - %>
43
+ 'src/app/example.component.ts': angular_example_component_ts,
52
44
},
53
45
},
54
- < % } else { -% >
55
- angular,
56
- < % } - %>
57
46
}}
58
47
src="usage/v<%= version %> /<%= name %> /<%= path %> /demo.html"
59
48
/>
Original file line number Diff line number Diff line change @@ -11,9 +11,10 @@ import './main.css';<% } %>
11
11
12
12
function Example() {
13
13
return (
14
- <<%= pascalComponent %> ></<%= pascalComponent %> >
14
+ <>
15
+ <<%= pascalComponent %> ></<%= pascalComponent %> >
16
+ </>
15
17
);
16
18
}
17
19
export default Example;
18
20
```
19
-
You can’t perform that action at this time.
0 commit comments