Skip to content

Commit

Permalink
[CLEANUP beta] Remove template CP on Ember.Component.
Browse files Browse the repository at this point in the history
  • Loading branch information
rwjblue committed Aug 9, 2015
1 parent a5b5213 commit e71d6a8
Showing 1 changed file with 1 addition and 42 deletions.
43 changes: 1 addition & 42 deletions packages/ember-views/lib/views/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,48 +135,7 @@ var Component = View.extend(TargetActionSupport, ComponentTemplateDeprecation, {
set(this, 'context', this);
},

/**
A components template property is set by passing a block
during its invocation. It is executed within the parent context.
Example:
```handlebars
{{#my-component}}
// something that is run in the context
// of the parent context
{{/my-component}}
```
Specifying a template directly to a component is deprecated without
also specifying the layout property.
@deprecated
@property template
@public
*/
template: computed({
get() {
var templateName = get(this, 'templateName');
var template = this.templateForName(templateName, 'template');

Ember.assert('You specified the templateName ' + templateName + ' for ' + this + ', but it did not exist.', !templateName || !!template);
return template || get(this, 'defaultTemplate');
},
set(key, value) {
return value;
}
}),

/**
Specifying a components `templateName` is deprecated without also
providing the `layout` or `layoutName` properties.
@deprecated
@property templateName
@public
*/
templateName: null,
template: null,

/**
If the component is currently inserted into the DOM of a parent view, this
Expand Down

0 comments on commit e71d6a8

Please sign in to comment.