📜  angular 8 将 cookie 设置为字符串 - TypeScript 代码示例

📅  最后修改于: 2022-03-11 14:48:37.246000             🧑  作者: Mango

代码示例1
import { CookieService } from 'ngx-cookie-service';

constructor( private cookieService: CookieService ) { }

ngOnInit(): void {
  this.cookieService.set( 'name', 'Test Cookie' ); // To Set Cookie
  this.cookieValue = this.cookieService.get('name'); // To Get Cookie
}