Skip to content

Global configuration for overridable defaults

Choose a tag to compare

@poteto poteto released this 28 Mar 17:27
· 358 commits to master since this release

You can now override defaults and specify your own, by adding a flashMessageDefaults option to config/environment:

module.exports = function(environment) {
  var ENV = {
    // ...

    flashMessageDefaults: {
      timeout      : 10000,
      priority     : 200,
      sticky       : true,
      showProgress : true,
      type         : 'foobar',
      types        : [ 'warning', 'notice', 'foobar' ]
    },

    // ...
  }
}

This lets you override defaults for various options – most notably, you can specify exactly what types you need, which means in the above example, you can do Ember.get('flashes').{warning,notice,foobar}.

Thanks to @johnotander for this feature.

Changelog
  • Removed bundled CSS in favour of keeping things minimal
  • Added ability to override defaults
  • [DEPRECATE] registerType is now a private method and will be deprecated in 1.0.0
  • The service, object and component are now exposed to the app