Switched tm html to directive