Whenever you're ready, walk me through how you'd approach this.
Explain Angular lifecycle hooks and how you would flatten a nested array in TypeScript.