replacing element using directive