Implemented the DOM tree with angular directives.