Comments (11)
@gfviegas have you tried using the ba-advise
directive mentioned in the docs? This directive provides notification support for various states of a component and can be used for more than just modals. This directive is arguable more powerful than promises as you can hookup callbacks in multiple places of your code and not just the one place you created the modal.
from angular-base-apps.
I do see though that ModalFactory
does not currently support adding the ba-advise
attribute to the dynamically created modal. Issues #80 has been created to track that.
from angular-base-apps.
@gfviegas try with v2.0.4 and let me know if you can achieve what you're looking to do
from angular-base-apps.
@soumak77 another GREAT feature is to use the Controller to link to modal. What the plugin does is basically adapt the ZFA modal to be a little bit like AngularUI Bootstrap Modal.. See https://angular-ui.github.io/bootstrap/
This way we can create stateful modals, and put the modal logic in its own file.
from angular-base-apps.
@gfviegas You should be able to accomplish what you need with the contentScope
config property of the ModalFactory
from angular-base-apps.
@soumak77 Can I link a controller name into the contentScope?
from angular-base-apps.
@gfviegas no that is not currently possible
from angular-base-apps.
@soumak77 that's what I was referring to. So for me it's missing 2 big functionalities that exists in the plugin I linked:
- Resolve the modal with a success data or dismissing it with a error data promise-like.
- Bind a modal to a Controller.
from angular-base-apps.
I wouldn't be opposed to having the ModalFactory
return promises for the following methods:
- activate
- deactivate
- toggle
Currently those methods don't return anything, so having them return a promise won't break backwards compatibility.
Support can also be added to the ModalFactory
to allow providing a controller
instead of a contentScope
.
Feel free to submit PRs for either of those features.
from angular-base-apps.
I dont really know how the source works, but I'll study and submit my PR. For now, I asked help for the plugin creator so we can have more resources to work on top of it.. Thanks bro @soumak77 !
from angular-base-apps.
@gfviegas I'm going to close this but feel free to add a PR for the desired support
from angular-base-apps.
Related Issues (20)
- Is this project active?
- ModalFactory does not support ba-advise attribute
- Position Action Sheet HOT 3
- SCSS fails to compile in existing project HOT 3
- Transforming panel not working HOT 2
- Add support for ui-router 1.0 HOT 1
- baCloseAll can cause modal dialogs to close immediately after opening HOT 1
- baSwipeClose breaks touch scrolling
- On 1.2.6, setting $notification-default-position does not work HOT 2
- Angular 2 layout engine HOT 4
- Creative usage of selector-replace() in 4-wandering-cubes.scss throws error on libsass 3.5.0.beta.2 HOT 3
- Update Angular to version 4, released March 2017 HOT 1
- Angular 2 (now 4) support? HOT 1
- Auto-close action sheet HOT 2
- Unable to show HTML content on the notification HOT 4
- How to update in angular-base-apps from foundation-apps HOT 1
- Sass compilation error with v2.0.11 HOT 2
- active-true not firing in IE Edge (15 & 16) HOT 2
- Build broken after updating to latest gulp-sass
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from angular-base-apps.