That’s it. When these two buttons are clicked, the response data will be loaded. If not clicked, the default first tab will be loaded.
So, how to add different controllers to these two tabs.
The problem now is that these two tabs are just one row under the table. Are there any problems with routing?
黄舟2017-05-15 17:04:02
Can be usedurl
来控制两个tab
是不同的controller
------The following was added after the subject modified the problem description-------
What is the relationship betweenrouting control and whether is a table and the next line in it?
漂亮男人2017-05-15 17:04:02
It’s good to use ng-include
,
ng-include
可以动态引入不同的template
,适合你这里的tab
You can dynamically introduce different template
to suit your tab
needs
Every template
里自己写自己的controller
is fine, how simple, for example:
tab1_template
<p ng-controller="tab1Ctrl">
....
....
</p>
tab2_template
<p ng-controller="tab2Ctrl">
....
....
</p>