Angular 4 Material Tabs Load on Tab Select

前端 未结 4 1049
失恋的感觉
失恋的感觉 2021-01-03 04:51

Is it possible to achieve lazy loading on Angular Material Tabs? Otherwise I would need a way to run a method when entering a tab.

4条回答
  •  我在风中等你
    2021-01-03 05:32

    As the documentation reads

    While is used to switch between views within a single route,

    By using this method,you can make each of the tab separate routes and hence each of the page loads each time the route is activated.

    
    
    
    

    Please find more info here under Tabs and navigation section.

提交回复
热议问题