アラートのためのアングルストラップアラートサービスを使用しており、アラートが開いた後でアラートメッセージに焦点を当てることで、それらをアクセス可能にする必要があります。角膜ストラップアラートonShow機能が発砲しない
警告オプションにonShow関数を追加しようとしましたが、onShow関数が起動していません。
これを動作させるにはどうすればよいですか?ここでオプション構成
Itinerary.alertConflict = function() {
if ($rootScope.conflictShown) return false;
$rootScope.conflictShown = true;
$rootScope.conflictAlert = $rootScope.showAlert({
template: '/Content/views/alerts/exhibition-conflict.html',
animation: 'am-fade-and-slide-top',
placement: 'top',
type: 'warn',
show: true,
onShow: function() {
alert('TEST');
$timeout(function() {
var message = document.getElementById('alert');
if (message !== null) {
message .focus();
}
});
}
});
}
これは#2.3.9以下のバージョンを使用したい場合に関数を呼び出すことができます。 – ARJUN