我有以下内容:
angular.module("thingy", ["ngCookies"]).directive("welcome", function() {
return {
link: function($scope, el, attr, ctrl) {
(if $cookies.something) {
// conditional cookie logic
}
},
templateUrl: "assets/html/_welcome.html"
};
})
如何从该链接功能中读取或写入 cookie?