changed html codes in index.html to a directive