added angular directive and removed external js file