()
| 104 | }); |
| 105 | |
| 106 | constructor() { |
| 107 | effect(() => this.submenu()?.parent.set(this)); |
| 108 | effect(() => this._pattern.pendingFocusEffect()); |
| 109 | |
| 110 | // Check for any violations after the DOM has been updated. |
| 111 | if (typeof ngDevMode === 'undefined' || ngDevMode) { |
| 112 | afterRenderEffect({ |
| 113 | read: () => { |
| 114 | const violations: string[] = []; |
| 115 | if (!this.parent) { |
| 116 | violations.push('ngMenuItem must be placed inside an ngMenu or ngMenuBar container.'); |
| 117 | } |
| 118 | reportViolations(violations, this.element); |
| 119 | }, |
| 120 | }); |
| 121 | } |
| 122 | } |
| 123 | |
| 124 | ngOnInit() { |
| 125 | this.parent?._collection.register(this); |
nothing calls this directly
no test coverage detected