Skip to content
Amiel Martin edited this page Dec 19, 2015 · 4 revisions

Requirements

ember-data-url-templates 0.1.0 is known to work with ember-data >= 1.0.0-beta.18, ^1.13, and ^2.0.

Newer versions of ember-data are also likely to work. Are you using ember-data-url-templates with a newer version of ember-data? Please update this list or open an issue :)

Installation

ember install ember-data-url-templates

Usage

Then, import UrlTemplates and mix it in to your adapter.

For example, to use url templates with all adapters, use an application adapter like this:

// app/adapters/application.js

import DS from 'ember-data';
import UrlTemplates from 'ember-data-url-templates';

export default DS.RESTAdapter.extend(UrlTemplates, {
  urlTemplate: '{+host}/api/{pathForType}{/id}{?query*}',
});