Skip to content

Instantly share code, notes, and snippets.

@BenjaminBeck
Forked from feanor07/components.my-component.js
Last active January 12, 2019 09:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BenjaminBeck/825437f6b8c603e62c1fa3926cb725a0 to your computer and use it in GitHub Desktop.
Save BenjaminBeck/825437f6b8c603e62c1fa3926cb725a0 to your computer and use it in GitHub Desktop.
so#43757863
import Ember from 'ember';
export default Ember.Component.extend({
});
import Ember from 'ember';
export default Ember.Controller.extend({
data:[{id:1,name:'a'},{id:2,name:'b'},{id:3,name:'c'}],
columns:[
{
"propertyName": "id",
"title": "ID",
},
{
"propertyName": "name",
"title": "Name",
},
{
"propertyName": "Custom",
"my-custom-property-for-component": "this is custom property",
"component": "my-component", // can be template or component
}]
});
<h1>Welcome to {{appName}}</h1>
<br>
<br>
{{outlet}}
{{models-table tableWideCustomProperty='tableWideCustomProperty'
data=data
columns=columns}}
<br>
<br>
{{column.my-custom-property-for-component}} passed to the component
<br>
{{table.tableWideCustomProperty}} passed to the component
<br>
record's id is :{{record.id}}
<br>
total data length is : {{data.length}}
{
"version": "0.12.1",
"EmberENV": {
"FEATURES": {}
},
"options": {
"use_pods": false,
"enable-testing": false
},
"dependencies": {
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.js",
"ember": "2.12.0",
"ember-template-compiler": "2.12.0",
"ember-testing": "2.12.0"
},
"addons": {
"ember-models-table":"1.12.0"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment