Implementing custom directives in AngularJS
In my first article we briefly discussed about AngularJS and the importance of such a framework to build dynamic web applications. Before continuing with the second part of it, I decided to write an article about one of its beautiful concepts called "Directives", since it is better to understand the importance of it with a real world usage rather than a detailed explanation. I will be demonstrating the importance of Directives by building our own custom directive step by step. What is a directive? The word 'directive' was not that familiar to us before AngularJS was introduced. If you have used HTML before, (Ok, pardon me! I know you won't be reading this article if you haven't used HTML before! :)) you know what are elements, attributes, classes, comments etc. Elements <html> <body> <script> <div> You know many of them. Attributes href hidden id label Sounds familiar right? Therefore I assume you already kn...