This angularJs directive example was initially done by David Mosher. I have borrow his code because he got a excellent explanation on some advanced features in Angular, mapping from HTML and explanation how this relates to angular directives, It also got some good debugging techniques, tips and tricks. I had to modify initially to get working on web server using nodejs http and add my own documentation for me to understand his code better.
Scenario :- You have html written in angular directive for a data grid and this need to translated in angular code.
His screencast
It covers:
- html as a dsl
- abstractions in html
- $compile
- $templateRequest
- $templateCache
- directive definition object
- requiring other directives
- directive communication ($scope.$broadcast, $scope.$on)