0
メインのHTMLの上にあるすべてのコンテンツが異なるブートストラップモーダルの中に読み込まれる単一のページアプリケーションがあります。どのようにしてモーダルパーマリンクを生成しますか
私は現在、角と角度のブートストラップモーダルを使用しています。
もう1つの問題は、モーダルにはパーマリンクがないことです。モーダルコントローラーは次のとおりです。
angular.module('inventarioNgApp')
.controller('WorldCtrl', function($scope, $uibModal, $log) {
$scope.items = ['item1', 'item2', 'item3'];
$scope.animationsEnabled = true;
$scope.open = function(size) {
var modalInstance = $uibModal.open({
animation: $scope.animationsEnabled,
templateUrl: 'views/modal.html',
controller: 'ModalInstanceCtrl',
size: size,
resolve: {
items: function() {
return $scope.items;
}
}
});
modalInstance.result.then(function(selectedItem) {
$scope.selected = selectedItem;
}, function() {
$log.info('Modal dismissed at: ' + new Date());
});
};
$scope.toggleAnimation = function() {
$scope.animationsEnabled = !$scope.animationsEnabled;
};
});
angular.module('inventarioNgApp')
.controller('ModalInstanceCtrl', function($scope, $uibModalInstance, items) {
$scope.items = items;
$scope.selected = {
item: $scope.items[0]
};
$scope.ok = function() {
$uibModalInstance.close($scope.selected.item);
};
$scope.cancel = function() {
$uibModalInstance.dismiss('cancel');
};
});
モーダルのパーマリンクを生成する方法はありますか?
ルータを使用していますか?そうでなければ、 '$ location.search()' – charlietfl