Created
January 24, 2017 22:36
-
-
Save nicovalencia/0b7b19526ee0fe2467a8da7599146fca to your computer and use it in GitHub Desktop.
el-table
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ctrl | |
() => { | |
this.dataObj = new supergloo.pager('connected_users'); | |
} | |
// html | |
<el-table data-obj={{ctrl.dataObj}}> | |
// Gets transcluded into rows ("row markup") | |
<eg-table-col> | |
<img src="$item.avatar"> | |
<span>{{$item.title}}</span> | |
</eg-table-col> | |
</el-table> | |
// el-table internals | |
() => { | |
this.data = this.dataObj.data; | |
this.meta = this.dataObj.meta; | |
this.onNextPage = this.dataObj.nextPage; | |
this.onPrevPage = this.dataObj.onPrevPage; | |
this.onFilter = this.dataObj.onFilter; | |
} | |
// el-table html | |
<el-row ng-repeat="$item in ctrl.dataObj.data"> | |
<div ng-transclude> | |
</el-row> | |
^(^_^)> <3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment