Added url functionality

Synchronized the functionality with directive