Skip to content

buster95/AngularNotify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AngularNotify Module

REQUERIMIENTOS

  • jQuery 1.10 or Higher

USO DE ESTE MODULO

Modulo ngNotify

Servicio $notify

<button type="button" ng-click="click()">Notify</button>
angular.module('myapp',['ngNotify']).
controller('ctrlmain', function($scope, $notify){
	$scope.click = function(){
		$notify.success('title','message');
	}

	$notify.info('title','message');
	$notify.warning('title','message');
	$notify.error('title','message');
});

METODOS

  • setPosition
angular.module('myapp',['ngNotify']).
controller('ctrlmain', function($scope, $notify){
	$scope.click = function(){

		// bottom-left, bottom-center, bottom-right
		// top-left, top-center, bottom-right
		// bottom-full-width, top-full-width
		$notify.setPosition('bottom-left');

		$notify.success('title','message');
	}
});
  • setTime
angular.module('myapp',['ngNotify']).
controller('ctrlmain', function($scope, $notify){
	$scope.click = function(){
		$notify.setTime(5); // set time in seg
		$notify.success('title','message');
	}
});
  • setTimeExtend
angular.module('myapp',['ngNotify']).
controller('ctrlmain', function($scope, $notify){
	$scope.click = function(){
		$notify.setTimeExtend(5); // set time in seg
		$notify.success('title','message');
	}
});
  • showCloseButton
angular.module('myapp',['ngNotify']).
controller('ctrlmain', function($scope, $notify){
	$scope.click = function(){
		$notify.showCloseButton(true); // set boolean
		$notify.success('title','message');
	}
});
  • showProgressBar
angular.module('myapp',['ngNotify']).
controller('ctrlmain', function($scope, $notify){
	$scope.click = function(){
		$notify.showProgressBar(true); // set boolean
		$notify.success('title','message');
	}
});
  • onclick
angular.module('myapp',['ngNotify']).
controller('ctrlmain', function($scope, $notify){
	$scope.click = function(){
		$notify.onclick(function(){
			document.location.href = "https://google.com.ni";
		}); // set a function
		$notify.success('title','message');
	}
});

MULTI LLAMADA

$notify.setTime(10).setPosition('bottom-right').showCloseButton(true).showProgressBar(true);

About

Modulo de Angular para mostrar notificaciones

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages