AngularJs Materyalinde başlangıç yapıyorum, bir 'mdbottomsheet' açmak ve bu sayfanın içine bir düğme koymak istediğinizde, ilk 'mdbottomsheet' düğmesini kapatmadan başka bir 'mdbottomsheet' açın.'mdbottomsheet'i Angularjs Material'daki başka bir' mdbottomsheet 'üzerinden açabilir miyim?
Orada<div ng-controller="MyController">
<md-button ng-click="openBottomSheet()">
Open a Bottom Sheet!
</md-button>
</div>
Js:
HTML kodu vardır
var app = angular.module('app', ['ngMaterial']);
app.controller('MyController', function($scope, $mdBottomSheet) {
$scope.openBottomSheet = function() {
$mdBottomSheet.show({
controller: 'BottomSheet',
template: '<md-bottom-sheet>Hello!
<md-button ng-click="openSecondBottomSheet()">
Open Second Bottom Sheet!
</md-button></md-bottom-sheet>'
});
};
});
ve 'BottomSheet' denetleyicisi
:var app = angular.module('app', ['ngMaterial']);
app.controller('BottomSheet', function($scope, $mdBottomSheet) {
$scope.openSecondBottomSheet = function() {
$mdBottomSheet.show({
controller: 'SecondBottomSheet',
template: '<md-bottom-sheet>Hello!</md-bottom-sheet>'
});
};
});
Bu benim kodları, o çalışıyor ancak ' SecondBottomSheet 'açıldı, ilk' BottomSheet 'kapalı! İlk 'BottomSheet' üzerinde 'SecondBottomSheet' açmak istiyorum!