-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(playground): update template generator to support Angular standal…
…one (#3983)
- Loading branch information
1 parent
af0d981
commit f8949c0
Showing
6 changed files
with
17 additions
and
34 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
6 changes: 6 additions & 0 deletions
6
_templates/playground/new/angular_example_component_html.md.ejs.t
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
to: "<%= `static/usage/v${version}/${name}/${path}/angular/example_component_html.md` %>" | ||
--- | ||
```html | ||
<<%= component %>></<%= component %>> | ||
``` |
11 changes: 5 additions & 6 deletions
11
_templates/playground/new/angular_example_component_ts.md.ejs.t
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,16 @@ | ||
--- | ||
# this file only gets generated if `angular_ts` (from the command line prompt) is true | ||
to: "<%= angular_ts ? `static/usage/v${version}/${name}/${path}/angular/example_component_ts.md` : null %>" | ||
arbitrary: <% pascalComponent = h.changeCase.pascal(component) %> | ||
to: "<%= `static/usage/v${version}/${name}/${path}/angular/example_component_ts.md` %>" | ||
--- | ||
```ts | ||
import { Component } from '@angular/core'; | ||
import { <%= pascalComponent %> } from '@ionic/angular/standalone'; | ||
|
||
@Component({ | ||
selector: 'app-example', | ||
templateUrl: 'example.component.html', | ||
<% if (css){ -%> | ||
styleUrls: ['./example.component.css'], | ||
<% } -%> | ||
imports: [<%= pascalComponent %>], | ||
}) | ||
export class ExampleComponent { | ||
} | ||
export class ExampleComponent {} | ||
``` |
This file contains 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 characters
This file contains 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 characters
This file contains 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 characters