joebartels / ember-cli-js-cookie

zero fanciness wrapper over the global Cookies from js-cookie library
MIT License
7 stars 4 forks source link

Ember-cli-js-cookie

Installation

Usage

import Ember from 'ember';
import Cookies from 'ember-cli-js-cookie';

const { RSVP } = Ember;

export default Ember.Route.extend({

  beforeModel() {
    if (!Cookies.get('logged-in')) {
      return RSVP.reject();
    }
  }
});

js-cookie library

https://github.com/js-cookie/js-cookie