Alertify.js is a small library which provides light-weight, high performance browser dialogs. Since it uses only 1 HTTP request and a payload of less than 3kB, it's a great option for adding basic style to alert, dialog, prompt and log messages even on low bandwidth connections.
demo.php
<!DOCTYPE html>
<html ng-app="app">
<head>
<title>AngularJs</title>
<script type="text/javascript" src="angular-1.5.5/angular.js"></script>
<script type="text/javascript" src="angular-1.5.5/angular-route.js"></script>
<link rel="stylesheet" type="text/css" href="alertify/dist/css/alertify.css"/>
<script type="text/javascript" src="alertify/dist/js/alertify.js"></script>
<script type="text/javascript" src="alertify/dist/js/ngAlertify.js"></script>
<script type="text/javascript" src="base.js"></script>
<style type="text/css">*{font-size: 14px; font-family: arial;}.orange{background-color: red;color:white;}</style>
</head>
<body>
<div ng-controller="Main">
<button ng-click="myAlert()">Show Alertify</button>
</div>
</body>
</html>
------------------------------------------------
base.js
var app=angular.module("app", ["ngAlertify"]);
app.controller("Main", function($scope, alertify) {
$scope.myAlert = function(){
alertify.alert("Welcome AngularJs Alertify");
}
});
------------------------------------------
Output:
Output:
Source: https://alertifyjs.org/
0 comments:
Post a Comment