Title: Angular compiler - custom decorators with ngOnDestroy does not work with AOT build · Issue #16023 · angular/angular · GitHub
Open Graph Title: Angular compiler - custom decorators with ngOnDestroy does not work with AOT build · Issue #16023 · angular/angular
X Title: Angular compiler - custom decorators with ngOnDestroy does not work with AOT build · Issue #16023 · angular/angular
Description: Versions 4.0.0 Repro steps Create a class decorator with debugger statement export function Test() { return function ( constructor ) { debugger; } } Use the class on a component @Component({...}) @Test() export class TestComponent {} Run...
Open Graph Description: Versions 4.0.0 Repro steps Create a class decorator with debugger statement export function Test() { return function ( constructor ) { debugger; } } Use the class on a component @Component({...}) @...
X Description: Versions 4.0.0 Repro steps Create a class decorator with debugger statement export function Test() { return function ( constructor ) { debugger; } } Use the class on a component @Component({...}) @...
Opengraph URL: https://github.com/angular/angular/issues/16023
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Angular compiler - custom decorators with ngOnDestroy does not work with AOT build","articleBody":"### Versions\r\n4.0.0\r\n\r\n### Repro steps\r\n1. Create a class decorator with debugger statement \r\n```js\r\nexport function Test() {\r\n return function ( constructor ) {\r\n debugger;\r\n }\r\n}\r\n```\r\n2. Use the class on a component\r\n```js\r\n@Component({...})\r\n@Test()\r\nexport class TestComponent {}\r\n\r\n```\r\n3. Run the command `ng build --aot --prod`\r\n\r\n### The log given by the failure.\r\nThe debugger statement never called. The decorator **doesn't** work. \r\n\r\nI also tried to create the decorator as npm package and compile the source file with the angular compiler `ngc -p tsconfig.json` but with no luck. \r\n\r\n### Desired functionality.\r\nCustom decorators should be support out of the box by AOT.\r\n\r\n### Note:\r\nIt's not an angular-cli problem, the problem was also the same with angular2-webpack-starter.\r\n\r\n","author":{"url":"https://github.com/ArielGueta","@type":"Person","name":"ArielGueta"},"datePublished":"2017-04-15T20:01:44Z","url":"https://github.com/angular/angular/issues/16023"}
| 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:21dad705-9660-3f3e-4ed9-489cd8f478ce |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CB0C:1F7384:19EF735:223AC85:6B0148A2 |
| html-safe-nonce | bc16e2dae28c9a65a269b89411a00543241a5d5887b0b4da123effe3087d04d2 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQjBDOjFGNzM4NDoxOUVGNzM1OjIyM0FDODU6NkIwMTQ4QTIiLCJ2aXNpdG9yX2lkIjoiNDA5NDYzNTgwNjc2ODA1NjQ4MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | c6e2c543ad0f0e805ae06356aeeb42b52c106aa9cd2c558537b9fc701286405a |
| hovercard-subject-tag | issue:221969489 |
| 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/16023/issue_layout |
| twitter:image | https://opengraph.githubassets.com/5aac641e74d91ed68ef4a3dd1779e0ba9763ef1f16685991b1b5c520971965f4/angular/angular/issues/16023 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/5aac641e74d91ed68ef4a3dd1779e0ba9763ef1f16685991b1b5c520971965f4/angular/angular/issues/16023 |
| og:image:alt | Versions 4.0.0 Repro steps Create a class decorator with debugger statement export function Test() { return function ( constructor ) { debugger; } } Use the class on a component @Component({...}) @... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | ArielGueta |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| turbo-cache-control | no-preview |
| go-import | github.com/angular/angular git https://github.com/angular/angular.git |
| octolytics-dimension-user_id | 139426 |
| octolytics-dimension-user_login | angular |
| octolytics-dimension-repository_id | 24195339 |
| octolytics-dimension-repository_nwo | angular/angular |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 24195339 |
| octolytics-dimension-repository_network_root_nwo | angular/angular |
| 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 | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width