It seems $cookies only allows to set the Key/Value pair.
But i need to set the domain parameter as well. I need to set the cookie from one subdomain of website and use it from all subdomains of website.
I am using the angularJS and Twitter Bootstrap.