npm.io
1.0.3 • Published 7 years ago

ember-cli-content-for-nested

Licence
MIT
Version
1.0.3
Deps
0
Size
3 kB
Vulns
0
Weekly
0

ember-cli-content-for-nested

npm version

ember-cli nested addons contentFor workaround

Usage

// index.js
const contentForNested = require('ember-cli-content-for-nested');

module.exports = {
  contentFor: contentForNested,
  // or
  contentFor(type, { rootURL }) {
    return contentForNested.apply(this, [...arguments, () => {
      switch (type) {
        case 'head':
          return `<link rel="stylesheet" href="${rootURL}assets/normalize.css">`;
      }
    }]);
  }
};