diff --git a/packages/ember-routing-htmlbars/lib/keywords/render.js b/packages/ember-routing-htmlbars/lib/keywords/render.js index 9be9782c97f..2e7155b0bbb 100644 --- a/packages/ember-routing-htmlbars/lib/keywords/render.js +++ b/packages/ember-routing-htmlbars/lib/keywords/render.js @@ -74,7 +74,10 @@ export default { } // # legacy namespace + let originalName = name; name = name.replace(/\//g, '.'); + Ember.deprecate(`Using a slash for namespacing with the {{render}} render helper has been deprecated. + Please replace "${originalName}" with "${name}" in your call to the {{render}} helper.`, !originalName.match(/\//g)); // \ legacy slash as namespace support var templateName = 'template:' + name; diff --git a/packages/ember-routing-htmlbars/tests/helpers/render_test.js b/packages/ember-routing-htmlbars/tests/helpers/render_test.js index b5a6dc4b051..88578c1535c 100644 --- a/packages/ember-routing-htmlbars/tests/helpers/render_test.js +++ b/packages/ember-routing-htmlbars/tests/helpers/render_test.js @@ -552,7 +552,7 @@ QUnit.test('{{render}} works with slash notation', function() { Ember.TEMPLATES['blog.post'] = compile('{{uniqueId}}'); - runAppend(view); + expectDeprecation(() => { runAppend(view); }, /Using a slash for namespacing/); var singletonController = container.lookup('controller:blog.post'); equal(singletonController.uniqueId, view.$().html(), 'rendered with correct singleton controller');