import { Injectable } from '@angular/core' ; import { CookieService } from 'ngx-cookie-service' ; @ Injectable ( ) export class UtilsService { constructor ( private cookie ) { } getCookieValue ( key ) { return this . cookie . get ( key ) ; } setCookieValue ( key , value , expireDate ? , path ? ) { this . cookie . set ( key , value , expireDate , path ) ; } deleteCookie ( key , path ? ) { this . cookie . delete ( key , path ) ; } }