AngularTS
    Preparing search index...

    Class CookieService

    Provides high-level APIs for interacting with browser cookies:

    • Raw get/set/remove
    • JSON serialization helpers
    • Global defaults supplied by $cookiesProvider
    Index

    Constructors

    Methods

    • Retrieves a raw cookie value.

      Parameters

      • key: string

      Returns string | null

      – If decodeURIComponent fails.

    • Returns an object containing all raw cookies.

      Returns Record<string, string>

      – If decodeURIComponent fails

    • Retrieves a cookie and deserializes its JSON content.

      Type Parameters

      • T

      Parameters

      • key: string

      Returns T | null

      if cookie JSON is invalid

    • Sets a raw cookie value.

      Parameters

      Returns void

      if key or value cannot be encoded

    • Serializes an object as JSON and stores it as a cookie.

      Parameters

      Returns void

      if Object cannot be converted to JSON

    • Removes a cookie by setting an expired date.

      Parameters

      Returns void