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

MdlTabsComponent - set selected tab programmatically #29

Closed
maku opened this issue Aug 5, 2016 · 5 comments
Closed

MdlTabsComponent - set selected tab programmatically #29

maku opened this issue Aug 5, 2016 · 5 comments
Assignees

Comments

@maku
Copy link

maku commented Aug 5, 2016

Thank you for your great work. I am using MDL with angular2 for some time but not with such a component abstraction (was not aware of this library until recently)

So, I am trying it out, and first the tabs component....

When I set the selectIndex property programmatically nothing happens.

Would be really good to be able to switch the selected tab.

What do you think?

And one more. I use the tab panels also with icons (instead of title). And more customizations.. (title with icons - and icons are dynamically show or hidden)
So a great improvement would be a construct like:

<mdl-tab-panel>
   <mdl-tab-panel-title>Do whatever you want</mdl-tab-panel-title>
</mdl-tab-panel>
@mseemann mseemann self-assigned this Aug 5, 2016
@mseemann
Copy link
Owner

mseemann commented Aug 5, 2016

hi thx for your feedback! Adding the possibility to set the selectedIndex programmatically should not be the big deal - coming soon. For richer tabs I need to find a way without breaking the original material design lite implementation - will need some time...

@Avareto
Copy link

Avareto commented Aug 10, 2016

Really great work. THANKS!!!
Tried to get it to work with rc.5 but without luck: chrome console throws the following error:

zone.js:461 Unhandled Promise rejection: Template parse errors:
Can't bind to 'ngModel' since it isn't a known property of 'input'. ("
    (focus)="onFocus()" 
    (blur)="onBlur()"
    [ERROR ->][ngModel]="value">
  <span class="mdl-checkbox__label"><ng-content></ng-content></span>
  <span class"): MdlCheckboxComponent@4:4 ; Zone: <root> ; Task: Promise.then ; Value: BaseException {message: "Template parse errors:↵Can't bind to 'ngModel' sin…</span>↵  <span class"): MdlCheckboxComponent@4:4", stack: "Error: Template parse errors:↵Can't bind to 'ngMod…ocalhost:4200/vendor/zone.js/dist/zone.js:356:38)"}

any idea?

@mseemann
Copy link
Owner

Hi! Support for rc5 is in the pipeline... Please stay tuend. I hope to finish this in the next week. There are still some testing issues and the prod build throws :(.

@mseemann
Copy link
Owner

version 1.3.1 now supports programmatically tab selection and rich tab titles.

@maku
Copy link
Author

maku commented Aug 18, 2016

@mseemann thank you very much. I will give it a try...

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

3 participants