Understanding Dynamic Scoping and TemplateRef

This post will be dedicated to template references in Angular and dynamic scoping. Although the main focus of the article will be understanding TemplateRef we will also touch semantics of programming languages by introducing the concept of scope of name binding.
The code samples for this article can be found in my GitHub account.
Introducing Template References In order to understand TemplateRef lets take a look at the NgForOf directive.

Link: http://blog.mgechev.com/2017/10/01/angular-template-ref-dynamic-scoping-custom-templates/