merchantApp.directive('logout', function(common,$location){
return {
restrict: 'A',
link: function (scope, element, attrs) {
element.click(function(){
common.clearCookies();
$location.path("/merchantlogin");
})
}
};
})
This is my custom directive. I want redirect to merchant login page. The clearCookies function also working fine, But redirect is not working please help.....