Modal Example

Size
2,438 Kb
Views
38,456

How do I make an modal example?

What is a modal example? How do you make a modal example? This script and codes were developed by Sean McCambridge on 08 September 2022, Thursday.

Modal Example Previews

Modal Example - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Modal Example</title> <link rel='stylesheet prefetch' href='https://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700'>
<link rel='stylesheet prefetch' href='https://boomtownroi.github.io/boomstrap/css/boomstrap.css'>
<link rel='stylesheet prefetch' href='https://boomtownroi.github.io/boomstrap/css/boomstrap-docs.css'> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div ng-app="PatternLibrary"> <div ng-controller="ModalDemoCtrl"> <p>Modals!</p> <p><button class="btn btn-default" ng-click="demo.openModal()">Click to play!</button></p> </div> <script type="text/ng-template" id="template/modal/modal-demo.html"> <div class="modal-header"> <button type="button" class="close" ng-click="$close()" aria-hidden="true">&times;</button> <h4 class="modal-title" id="myModalLabel">Modal title</h4> </div> <div class="modal-body"> <p>Modal content...</p> </div> <div class="modal-footer"> <button type="button" class="btn btn-default" ng-click="$close()">Close</button> <button type="button" class="btn btn-primary">Save changes</button> </div> </script>
</div> <script src='https://boomtownroi.github.io/boomstrap/js/boomstrap.min.js'></script>
<script src='https://boomtownroi.github.io/boomstrap/js/boomstrap-angular.min.js'></script> <script src="js/index.js"></script>
</body>
</html>

Modal Example - Script Codes CSS Codes

/* this CSS is only for proper display of the codepen. do not add this to the CRM */
body { padding: 36px 24px;
}

Modal Example - Script Codes JS Codes

angular.module('PatternLibrary', [ 'ui.bootstrap']);
(function(PatternLibrary) { 'use strict'; PatternLibrary.controller('ModalDemoCtrl', ['$scope', '$modal', function($scope, $modal) { $scope.demo = { isOpen: false, modal: null, openModal: function openModal() { if (!$scope.demo.isOpen) { $scope.demo.modal = $modal.open({ templateUrl: 'template/modal/modal-demo.html', scope: $scope, keyboard: true, // escape closes modal backdrop: true, // adds modal backdrop windowClass: 'demo-modal' }); $scope.demo.isOpen = true; // When the user closes the modal through ESC or clicking out, make sure we update isOpen // Handle Modal Close is passed for both success and failure for the result promise $scope.demo.modal.result.then($scope.demo.handleModalClose, $scope.demo.handleModalClose); } }, handleModalClose: function() { $scope.demo.isOpen = false; } } }]);
})(angular.module('PatternLibrary'));
Modal Example - Script Codes
Modal Example - Script Codes
Home Page Home
Developer Sean McCambridge
Username seanboom
Uploaded September 08, 2022
Rating 3
Size 2,438 Kb
Views 38,456
Do you need developer help for Modal Example?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

Sean McCambridge (seanboom) Script Codes
Create amazing SEO content with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!