Skip to content

Commit 7e1dbb6

Browse files
authored
Merge pull request #47 from manudwarf/add-example-id
Add id to example component
2 parents 1807dab + 48d11ea commit 7e1dbb6

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

addon/components/docs-demo/x-example/component.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,10 @@ import layout from './template';
44
export default Component.extend({
55
layout,
66

7-
classNames: 'docs-demo-example'
7+
classNames: 'docs-demo-example',
8+
9+
init() {
10+
this._super(...arguments);
11+
this.set('elementId', 'example-' + this.get('name'));
12+
}
813
});

0 commit comments

Comments
 (0)