-
Notifications
You must be signed in to change notification settings - Fork 13.5k
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
ion-tab directive should support scope variable binding #646
Comments
Fixes ionic-team#634. Fixes ionic-team#334. Fixes ionic-team#175. fixes ionic-team#646.
Fixes ionic-team#634. Fixes ionic-team#334. Fixes ionic-team#175. fixes ionic-team#646.
Supported as of nightly and 0.9.26+ |
It looks like this still doesn't work. The tab title reads "tab.title" but it should be "Flask" or "Clipboard". It would work fine with the {{}} syntax. |
Titles are interpolated, not bound. This will be a lot clearer once we have docs up (and make sure all our titles follow the same conventions!) Try this: |
Sorry, I'm not sure what you mean by "interpolated, not bound". What I would have liked to see is a way to dynamically change the title, icon etc for a tab. If that's not possible / too costly I'm going to try and figure out a workaround. |
This will work: |
Thank you Andy, I understand that. Maybe I'm having problems expressing my self properly. There is now a text field in each tab. Every time a tab is selected the value of tab.title is updated to the current time and displayed in the text field. What I would have liked is that the title of the tab is changed as well. |
I have this exact use case (app data changes, would like the tab title to update dynamically). Has there been any progress or updates on this issue? |
Same here, would like to translate my title and so update the title on language change.. |
I use the same in below way <ion-tab title="{{ 'coffee_title_label' | translate }}"> But when it is <ion-tab translate="coffee_title_label" title="{{ 'coffee_title_label' | translate }}"> I referred the below codepen example Can you let me know, what am doing wrong here ! |
The ion-tab directive currently does not support the binding of scope variables to it's attributes.
For instance to set the title from a scope variable
tabTitle
one can dobut not
This means the tab title will always be set to a fixed value and any later changes of
tabTitle
will not update the title attribute of the tab.As far as I can tell this is true for all attributes of the ion-tab directive.
The text was updated successfully, but these errors were encountered: