ユーザーにさまざまな通知を表示する機能をコントローラー内に実装しようとしています。
問題は、期間を関数パラメーターにしたいのですが、うまくいかないようです。
どうして?。
どうすればこれを修正できますか?.
$scope.layout.showNotification = function(msg, duration){
$scope.layout.notification.message = msg;
$scope.layout.notification.visible = true;
if(!duration || duration === null)
return
$timeout(function(){
$scope.layout.notification.visible = false;
$scope.layout.notification.message = "";
}, duration);
}