Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

explanatory comments for home page example #34

Open
msakrejda opened this issue Oct 13, 2013 · 1 comment
Open

explanatory comments for home page example #34

msakrejda opened this issue Oct 13, 2013 · 1 comment

Comments

@msakrejda
Copy link

Hi,

Thanks for the great component. I was somewhat confused by the example, though--my comments on the unclear pieces are inlined below:

    <angular-table model="[
    { id: 1, name: 'Bob', street: '1 street ave' },
    { id: 2, name: 'Kristen', street: '10 road place' },
    { id: 3, name: 'Sarah', street: '30 gravel road' }
    ]" filter-query-model="filterQuery" default-sort-column="id">
<!-- what happens if i leave out default-sort-column? does it just use the first one? does it not sort by default? -->
    <header-row>
    <header-column sortable="true" sort-field-name="id">
<!-- why the div with `display: inlineeblock`? as far as i can tell, the result is identical to the second column, which skips this -->
    <div style="display: inline-block;">Id</div>
<!-- are these needed when setting a column to sortable? what happens without them? -->
    <sort-arrow-ascending></sort-arrow-ascending>
    <sort-arrow-descending></sort-arrow-descending>
    </header-column>
    <header-column sortable="false" sort-field-name="name">
<!-- you explicitly specify both true and false--does that mean we should not rely on the default? this gets verbose -->
    Name
    </header-column>
   <!-- do i need to specify the sort-field-name in addition to the actual value below? can i still sort if i skip this? -->
    <header-column sortable="true" sort-field-name="street">
    <div style="display: inline-block;">Street</div>
    <sort-arrow-ascending></sort-arrow-ascending>
    <sort-arrow-descending></sort-arrow-descending>
    </header-column>
    </header-row>

    <row on-selected="handleRowSelection(row)" selected-color="#87cefa" even-color="#ffffff" odd-color="#eeeeee">
    <column>{{ row.id }}</column>
    <column>{{ row.name }}</column>
    <column>{{ row.street }}</column>
    </row>
    </angular-table>

Obviously, an example can't document the full API, but there are some clearly confusing pieces here--it would be great to make a better first impression.

Thanks again!

@davidjnelson
Copy link
Owner

Thanks @deafbybeheading . I agree that I need to complete the examples page. You make some excellent points. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants