下面是我的选项卡式窗口,请建议我在指令模板内为以下菜单提供 javascript 的位置。
下面是我的指令
app.directive('basictabs', function() {
return {
restrict: 'AE',
replace: true,
template :'<div class="tab-menu">\
<ul>\
<li class="unselected"><a href="#">Tab 01</a></li>\
<li class="selected"><a href="#">Tab 02</a></li>\
<li class="unselected"><a href="#">Tab 03</a></li>\
<li class="unselected"><a href="#">Tab 04</a></li>\
</ul>\
<div class="tab-content">\
<div class="tab-01">\
Content in Tab 01 goes here.\
</div>\
<div class="tab-02">\
Content in Tab 02 goes here.\
</div>\
<div class="tab-03">\
Content in Tab 03 goes here.\
</div>\
<div class="tab-04">\
Content in Tab 04 goes here.\
</div>\
</div>\
</div>'
};
});