i already can get a cookie as the following. i call this cookie in my module and pass it as a parameter.how do i change the code to get a cookie in angular?
$(document).ready(function ()
{
Cookie();
});
function getCookie(cname)
{
var name = cname + "=";
var ca = document.cookie.split(';');
for (var i = 0; i < ca.length; i++)
{
var c = ca[i].trim();
if (c.indexOf(name) == 0) return c.substring(name.length, c.length);
}
return "";
}
function Cookie()
{
var cookie = getCookie('Id');
}
function Module($http)
{
var self = this;
self.$http = $http;
self.CookieID = getCookie('Id');
self.test=function(){
var params = { testId:self.CookieID }
}
}