InfomediaLtd / angular2-materialize

Angular 2 support for Materialize CSS framework.
https://infomedialtd.github.io/angular2-materialize/
MIT License
407 stars 140 forks source link

Can't change tab in tabs in Angular code (not triggering) #399

Open austrolex opened 6 years ago

austrolex commented 6 years ago

I am trying to change tabs in my Angular code by reacting to a click event on an icon. However it doesn't work....

changeTab() {
    this.tabAction.emit({action: 'tabs', params: ['select_tab', 'test3']});
  }

From MaterializeCSS docs: $(document).ready(function(){ $('ul.tabs').tabs('select_tab', 'tab_id'); });

What am I doing wrong or is this even possible?

Dakayl commented 6 years ago

See my pull request https://github.com/InfomediaLtd/angular2-materialize/pull/411

With it, your action works. I was having the same problem.