Look, guys, I made some modifications and the notify works on the ionic and it shoots with a certain time.
Step here to share with you.
index.html file
<!DOCTYPE html>
<html ng-app="app">
<head>
<title>Angular Notify Demo</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="angular-notify.css" rel="stylesheet">
<link href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet">
</head>
<body ng-controller="DemoCtrl">
<div>
<div class="container">
<div class="row">
<div class="col-md-12">
<h2>angular-notify</h2>
<p class="lead">Notify - angular - ionic.</p>
</div>
</div>
<ion-content>
<br>
Hora: {{currentTime}}
<br>
</ion-content>
</div>
<script src="angular.js"></script>
<script src="angular-notify.js"></script>
<script src="demo.js"></script>
</body>
</html>
demo.js
angular.module('app', ['cgNotify']);
angular.module('app').controller('DemoCtrl',function($interval,$scope,notify,dateFilter) {
$scope.currentTime = dateFilter(new Date(), 'hh:mm');
$scope.updateTime = $interval(function() {
$scope.currentTime = dateFilter(new Date(), 'hh:mm');
$scope.horaAtual = dateFilter(new Date(), 'hh');
$scope.minutosAtual = dateFilter(new Date(), 'mm');
$scope.SegundosAtual = dateFilter(new Date(), 'ss');
if($scope.minutosAtual == 46 && $scope.SegundosAtual == 0) {
function demoMessageTemplate() {
var messageTemplate = '<span>Agora tudo deu certo!</span> ';
notify({
messageTemplate: messageTemplate,
classes: $scope.classes,
scope:$scope,
templateUrl: $scope.template,
position: $scope.position,
});
}; // fim demoMessageTemplate
window.load = demoMessageTemplate();
} // fim if
}, 1000); // fim do relogio
});
Here is every project
link