【发布时间】:2013-05-31 04:47:58
【问题描述】:
我有类似以下内容:
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?
【问题讨论】:
标签: cookies angularjs angularjs-directive