Skip to content

Allows you to create a modal dialog that notifies every state of the modal by providing the callback as you need it. No bootstrap

Notifications You must be signed in to change notification settings

einer20/ngModalService

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ngModalService

Allows you to create a modal dialog that notifies every state of the modal by providing the callback as you need it.

Simple usage:

var app = angular.module("app",["ngModalServiceModule"])

app.controller("HomeController",function($scope, ngModalService){

   ngModalService({
    title:"Welcome!",
      template:"

Hello! My name is {{contact.name}}. You can write me at {{contact.twitter}}

", controller:ContactController, getView:function(view){ $(view.find("button").get(1)).text("Thanks but not :'(") $(view.find("button").get(2)).text("Write me!"); } }); }) function ContactController($scope){ $scope.contact = {name:"Einer Santana", twitter: "@einersantanar"}; $scope.modal.acceptPressed = function(){ alert("Alright! Lets continue!"); $scope.modal.destroy(); }; $scope.modal.cancelPressed = function(){ alert("So sad you're leaving :(... See you soon!"); $scope.modal.destroy(); }; }

made with love by @einersantanar

About

Allows you to create a modal dialog that notifies every state of the modal by providing the callback as you need it. No bootstrap

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors