Note: This way you can make your code generic and in future if you have to add some more directives you only have to add it in your JSON and it will pick the correct directive and render it, you don't have to change your view every time for it.