Javascript ui视图未呈现角度ui选项卡的相应模板?
ui视图不适用于ui选项卡。请看情况,并请告诉我哪里我错了 在客户页面中,我正在调用页面更新客户,通过单击任何客户customers.view.html,此页面包含客户列表。当我点击任何客户时,它会像下面的url一样打开链接<代码>http://localhost:3000/home/#/updatecustomer/5 customers.view.htmlJavascript ui视图未呈现角度ui选项卡的相应模板?,javascript,html,angularjs,Javascript,Html,Angularjs,ui视图不适用于ui选项卡。请看情况,并请告诉我哪里我错了 在客户页面中,我正在调用页面更新客户,通过单击任何客户customers.view.html,此页面包含客户列表。当我点击任何客户时,它会像下面的url一样打开链接http://localhost:3000/home/#/updatecustomer/5 customers.view.html <a><i ui-sref="home.updatecustomer({ customerId: {{customer.id}
<a><i ui-sref="home.updatecustomer({ customerId: {{customer.id}} })" class="fa fa-edit pull-right" ng-click="$event.stopPropagation()"></i></a>
<uib-tabset active="active">
<uib-tab ng-repeat="tab in tabs" heading="{{tab.title}}" active="tab.active" disable="tab.disabled">
<div ui-view="{{tab.view}}"></div>
</uib-tab>
</uib-tabset>
<div>profile of customer </div>
<div>Setting for customer </div>
控制器
var app = angular.module('app') ;
app.controller('TabsDemoCtrl', TabsDemoCtrl);
TabsDemoCtrl.$inject = ['$scope', '$state'];
function TabsDemoCtrl($scope, $state){
$scope.tabs = [
{ title:'profile', view:'profile', active:true },
{ title:'setting', view:'setting', active:false }
];
}
index.html
<a><i ui-sref="home.updatecustomer({ customerId: {{customer.id}} })" class="fa fa-edit pull-right" ng-click="$event.stopPropagation()"></i></a>
<uib-tabset active="active">
<uib-tab ng-repeat="tab in tabs" heading="{{tab.title}}" active="tab.active" disable="tab.disabled">
<div ui-view="{{tab.view}}"></div>
</uib-tab>
</uib-tabset>
<div>profile of customer </div>
<div>Setting for customer </div>
profile.html
<a><i ui-sref="home.updatecustomer({ customerId: {{customer.id}} })" class="fa fa-edit pull-right" ng-click="$event.stopPropagation()"></i></a>
<uib-tabset active="active">
<uib-tab ng-repeat="tab in tabs" heading="{{tab.title}}" active="tab.active" disable="tab.disabled">
<div ui-view="{{tab.view}}"></div>
</uib-tab>
</uib-tabset>
<div>profile of customer </div>
<div>Setting for customer </div>
客户简介
Setting.html
<a><i ui-sref="home.updatecustomer({ customerId: {{customer.id}} })" class="fa fa-edit pull-right" ng-click="$event.stopPropagation()"></i></a>
<uib-tabset active="active">
<uib-tab ng-repeat="tab in tabs" heading="{{tab.title}}" active="tab.active" disable="tab.disabled">
<div ui-view="{{tab.view}}"></div>
</uib-tab>
</uib-tabset>
<div>profile of customer </div>
<div>Setting for customer </div>
为客户设置
在ui-sref
<a ui-sref="home.updatecustomer({ customerId: customer.id })" class="pull-right"><i class="fa fa-edit"></i></a>
如果您能够将状态更改为home.updatecustomer
,则选项卡应该可以工作
更新
固定属性:
- 已将
传递到ui sref
标记a
- 通过
类到向右拉
标记a
试试这个,因为atn也提到过我也有同样的想法,希望它能帮助从ui视图中删除括号,这是不需要的。我不知道这是不是问题…@GustavoGabriel我删除了但仍然没有工作,我不认为这会有任何问题,因为在工作演示中,我们使用的是相同的东西…@geeks你能不能也在你的plunkr中添加配置??