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

st-ratio can not be declared as a function #828

Open
dmlgncn opened this issue Jan 22, 2018 · 1 comment
Open

st-ratio can not be declared as a function #828

dmlgncn opened this issue Jan 22, 2018 · 1 comment

Comments

@dmlgncn
Copy link

dmlgncn commented Jan 22, 2018

Hi all,
I want to calculate table columns width dynamically. Because my columns count will be dynamic, not fixed count. But st-ratio can not be declared as a function? Could you please help me?
And also I searched st-ratio in smart-table directive is it as function or not. I could not found anything about it.

I write my html code like below:

`<td st-ratio="getRatio()">{{row.firstName}}</td>`

and in my function I returned float after calculation. But it does not work.

@dmlgncn dmlgncn changed the title st-ratio can not declared as a function st-ratio can not be declared as a function Jan 22, 2018
@MrWook
Copy link
Contributor

MrWook commented Jan 23, 2018

Hello @dmlgncn,

stRatio isn't in the main SmartTable. It is just an exmaple directive in the documentation and it will just add the width to the element like you can see in the documentation.

So you need to create your own stRatio directive.

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