lukaszwatroba / v-modal Goto Github PK
View Code? Open in Web Editor NEWSimple, flexible and beautiful modal dialogs in AngularJS.
Home Page: http://lukaszwatroba.github.io/v-modal/
License: MIT License
Simple, flexible and beautiful modal dialogs in AngularJS.
Home Page: http://lukaszwatroba.github.io/v-modal/
License: MIT License
Hi
https://github.com/LukaszWatroba/v-modal/blob/v1.3.6/dist/v-modal.js is different to the version 1.3.6 pulled down with npm install v-modal
?
Specifically the npm version is missing vModalDirective.$inject = ['$document', 'modalConfig'];
Am I just missing something?
Thanks,
Ross
While user could require ng-annotate, a library should really work as is with strictDi: true
@FIRST - thanks for your work! Is it possible to have also a 'fullscreen' size property? 100% width and height would be really nice! Thanks
I can comment out 'ngAnimate' and it works fine.
how can I close the modal in the controller
I've done this locally, i'll do a pull request in a few days.
If I try to require('v-modal') with webpack, it cannot find it because it is not wrapped in a module.exports
How would I send a message back to the parent controller that calls the vModal?
.factory('xyzModal', ['vModal', function (vModal) {
return vModal({
controller: 'XYXCtrl',
controllerAs: 'xyz',
templateUrl: 'scriptTemplateId'
});
}])
This works: {{ somePassedParam }}
This does not work: {{ xyx.somePassedParam }}
I have 'wizard' content to use this for, if put all my content in the dialog the scroll bar disappears. I note that the scrollbar does work fine if I just add more content to the demo one, so I believe it may be related to having so much with tabs.
The dialog uses flexbox css which does not work with IE9 and many older mobile browsers.
Hello!
First of all thanks for this awesome modal.. definitely amazing UI help :)
I ran into trouble with my code getting the following error (im using Angular 1.3.5):
Uncaught TypeError: q is not a function(anonymous function) @ angular-animate.js:936 on page load and modal not showing on onClick. vModal is the only module using ngAnimate.
the relevant code:
var marketPlaceApp = angular.module('marketPlace', ['user', 'productService', 'ngAnimate', 'vModal']);
marketPlaceApp.config(function ($compileProvider) {
$compileProvider.debugInfoEnabled(false);
});
marketPlaceApp.factory('addToCartModal', function (vModal) {
return vModal({
controller: 'addToCartController',
controllerAs: 'addToCartModal',
templateUrl: 'cart-modal-template.html'
});
});
marketPlaceApp.factory('ocpModal', function (vModal) {
return vModal({
controller: 'ocpController',
controllerAs: 'ocpModal',
templateUrl: 'ocp-modal-template.html'
});
});
marketPlaceApp.controller('addToCartController', function ($scope, addToCartModal) {
var ctrl = this;
ctrl.close = addToCartModal.deactivate;
});
marketPlaceApp.controller('ocpController', function ($scope, ocpModal) {
var ctrl = this;
ctrl.close = ocpModal.deactivate;
});
call in main controller function:
vm.addToCart = function addToCart (product){
$log.log('activating cart modal');
vm.openAddToCartModal = addToCartModal.activate
};
Any idea how to fix this?
cheers
Version 1.3.6 is breaking sass compilation. There are a few undefined variables, such as
$v-modal-use-flexbox
$v-modal-fade-animation-duration
$v-dialog-enter-animation-duration
What we did currently is to define those vars as false in our configuration file that imports all v-modal stuff after.
Hope this helps.
Hi, I want to use some data in the template from the controller where I call activate
method. How I see the activate
method https://github.com/LukaszWatroba/v-modal/blob/master/dist/v-modal.js#L170 can receive some locals, but I can't figure out how can I access them in the template.
ps. thanks, for your work.
What about Angular Material support? With $uibModal there are some problem with z-index, what about this lib?
If the modal is open, and user click back or forward button, the page is changed. but the modal is still open.
In this condition, maybe some methods or functions pointed to the page controller is not available no longer.
Should we listen to $stateChangeStart
or $routeChangeStart
to close modal automatically?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.