I have a custom directive - let's call it tableDisplay. I want to be able to show/hide a column based on an attribute (we'll call it show-edit-column which I have working) BUT I also want to be able to, on each row, determine whether or not the given row is editable. I'd like to do this by passing in another attribute (allow-edit-row-condition) that tells the conditional statement each row should use to determine whether its editable or not.
Something like the following.
<table-display show-edit-column="true" allow-edit-row-condition="row.value === 'OK'">
I just don't know how to pass row.value === 'OK' in a way that can then be used on each row. Any ideas/suggestions?
row.value? Isrowdefined in the parent scope of your directive?