1
我有以下使用Angular JS編寫的代碼。我試圖讓我的標籤打開網址,當我點擊標籤標題。請幫忙。標籤打開角JS鏈接url鏈接
<html ng-app="blp_tabs">
<head>
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.2.8/angular.js"></script>
<script src="http://angular-ui.github.io/bootstrap/ui-bootstrap-tpls-0.10.0.js"></script>
<script>angular.module('blp_tabs', ['ui.bootstrap']);
var TabsDemoCtrl = function ($scope) {
$scope.tabs = [
{ title:"Google", url:"http://www.google.com" },
{ title:"CNN", url:"http://www.cnn.com", disabled: false }
];
$scope.navType = 'tabs';
};
</script>
<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
<div ng-controller="TabsDemoCtrl">
<tabset>
<tab ng-repeat="tab in tabs" heading="{{tab.title}}" active="tab.active" select="tab.url" disabled="tab.disabled">
</tab>
</tabset>
</div>
</body>
對不起,我需要在父加載頁面,當給定的選項卡上的用戶點擊。 –
父母?你能否更好地描述它? – Chandan
我希望頁面在父頁面中打開而不是iframe。 –