Issue: How do I know when the UI is created so that my script may expect to find named things in Components?
Solution: Normally you can hook DocumentReady - but since the UI is dynamic - it will load async. A better way is to have a angular directive - and once angular is resolving this you are sure everything is in place.
Example: I know that there will be data in my viewmodel column named "Channels" - put a directive-label in the loop like this:
In JS I will then instruct Angular to handle this directive:
In 1 I register the Directive with our AppModule, by sending in the name "channel"(2), once angular creates a row having this directive it will call link and we end up in 3 - here we check that it is the first time we are here and do our init that requires that other elements are available.