Quick notes for angular refactoring

recently having to refactor a complex component in angular, some experience I think could be beneficial  for the future, so take a note here:

  1. Bind child component’s property directly
  2. If not direct binding, then use viewmodel method to bind (easier to unit test also)
  3. Smuggle some simple logic in the mark up to avoid testing.
  4. Reference to child component with interface to achieve polymorphism
  5. Use [hidden] to avoid the

Expression has changed after it was checked

From <https://blog.angular-university.io/angular-debugging/>

Or set binding value after delay()

      6. service class can return observable, can be piped and subscribed, but inside component we can convert toPromise() and do async/await for better readability, catch exception and return null for the promise<T>.