Title: Add support for "<%_", "_%>" and "-%>" delimiters in templating in @angular-devkit/core · Issue #23169 · angular/angular-cli · GitHub
Open Graph Title: Add support for "<%_", "_%>" and "-%>" delimiters in templating in @angular-devkit/core · Issue #23169 · angular/angular-cli
X Title: Add support for "<%_", "_%>" and "-%>" delimiters in templating in @angular-devkit/core · Issue #23169 · angular/angular-cli
Description: 🚀 Feature request Command (mark with an x) generate Description The templating for the @angular/devkit library uses EJS, sort of but doesn't support whitespace slurping the way that the documentation of EJS has declared it. Having this w...
Open Graph Description: 🚀 Feature request Command (mark with an x) generate Description The templating for the @angular/devkit library uses EJS, sort of but doesn't support whitespace slurping the way that the documentati...
X Description: 🚀 Feature request Command (mark with an x) generate Description The templating for the @angular/devkit library uses EJS, sort of but doesn't support whitespace slurping the way that the documen...
Opengraph URL: https://github.com/angular/angular-cli/issues/23169
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Add support for \"\u003c%_\", \"_%>\" and \"-%>\" delimiters in templating in @angular-devkit/core","articleBody":"# 🚀 Feature request\r\n\r\n### Command (mark with an `x`)\r\n\r\n- [x] generate\r\n\r\n### Description\r\n\r\nThe templating for the @angular/devkit library uses EJS, sort of but doesn't support whitespace slurping the way that the documentation of EJS has declared it. Having this would enable schematic templates to be much more flexible with their whitespace and therefor easier to read while still creating nicely formatted files.\r\n\r\n### Describe the solution you'd like\r\n\r\nThe three delimiters: `\"\u003c%_\"`, `\"_%>\"` and `\"-%>\"` should just be added and work the same way that they do in EJS.\r\n\r\nI already have an idea of the code that I'd like to add, and a pull request almost ready. It's very simple and only affects one file.\r\n\r\n### Examples\r\n\r\nWithin [@schematics/angular](https://npmjs.com/package/@schematics/angular) this would allow an example like the following\r\n```\r\nimport { NgModule } from '@angular/core';\r\nimport { BrowserModule } from '@angular/platform-browser';\r\n\u003c%_ if (routing) { %>\r\nimport { AppRoutingModule } from './app-routing.module';\r\n\u003c%_ } -%>\r\nimport { AppComponent } from './app.component';\r\n\r\n@NgModule({\r\n declarations: [\r\n AppComponent\r\n ],\r\n imports: [\r\n \u003c%_ if (routing) { -%>\r\n AppRoutingModule,\r\n \u003c%_ } -%>\r\n BrowserModule\r\n ],\r\n providers: [],\r\n bootstrap: [AppComponent]\r\n})\r\nexport class AppModule { }\r\n```\r\n\r\nWhich would generate with the correct whitespace.","author":{"url":"https://github.com/vector67","@type":"Person","name":"vector67"},"datePublished":"2022-05-18T14:12:45Z","url":"https://github.com/angular/angular-cli/issues/23169"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:ecd39972-570a-e480-2faa-fda0f4b62e1e |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8612:2C4BED:354EABB:43BD64B:6B01E2B8 |
| html-safe-nonce | 73f2b89c8e1f01e55b0396fe918c7b873cefba6c1f088eda0765ad4b15ec2a2c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NjEyOjJDNEJFRDozNTRFQUJCOjQzQkQ2NEI6NkIwMUUyQjgiLCJ2aXNpdG9yX2lkIjoiMTM5MDE4NTY2NjAyMDc2MjI5NiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 30d6d247dff62160a8be5508a9bc3b04080e8f9f8172573bfd693e0ffe832145 |
| hovercard-subject-tag | issue:1240033062 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/angular/angular-cli/23169/issue_layout |
| twitter:image | https://opengraph.githubassets.com/68ff68e9888ed46eb14d7cdd87cc2461cfee5f81fb1dcd86210f7a5cc55f3c7f/angular/angular-cli/issues/23169 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/68ff68e9888ed46eb14d7cdd87cc2461cfee5f81fb1dcd86210f7a5cc55f3c7f/angular/angular-cli/issues/23169 |
| og:image:alt | 🚀 Feature request Command (mark with an x) generate Description The templating for the @angular/devkit library uses EJS, sort of but doesn't support whitespace slurping the way that the documentati... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | vector67 |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| turbo-cache-control | no-preview |
| go-import | github.com/angular/angular-cli git https://github.com/angular/angular-cli.git |
| octolytics-dimension-user_id | 139426 |
| octolytics-dimension-user_login | angular |
| octolytics-dimension-repository_id | 36891867 |
| octolytics-dimension-repository_nwo | angular/angular-cli |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 36891867 |
| octolytics-dimension-repository_network_root_nwo | angular/angular-cli |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | canary-1 |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width