Comments (4)
I think it's fine to have the dialog api know nothing about promises or factories. So, if lazy loading is needed, the developer would use import('some/path').then(m => this.dialogService.open({viewModel: m.MyDialogVM}))
. I think router is a bit different in that it does need to have registrations up front, but evaluation later. Modals are usually invoked directly and at the exact time they are needed.
from dialog.
The router needs it lazy since it stores the VM factories for later optional/uncertain usage.
For this, I think we can also say they are both for later optional / uncertain usage. Typically the code responsible for opening dialog will be inside a class method, which makes it
from dialog.
@bigopon what you are saying is that the execution of the code(user code) that is using those APIs is uncertain and for that was my example import().then(m => this.dialogService.open({viewModel: m.MyDialogVM}))
. This does not change the fact that when you call the dialog API the class
will be used.
from dialog.
Keeping the current API.
Change already merged.
from dialog.
Related Issues (20)
- Dialog VM hooks for keyboard (Enter/Escape) HOT 7
- Plugin setting configurations not working HOT 1
- Error when building HOT 1
- AttachFocus is not the default export
- Bug: Lazy loading components causes unnecessary webpack chunks HOT 14
- Dialog does not open when webpack bundle is built in production mode HOT 7
- Remove .rollupcache folder from npm package
- Cannot find name 'AddEventListenerOptions'. HOT 7
- Global callbacks / events every time a dialog opens / closes HOT 8
- Focus management on open / close HOT 5
- Typings fail to install HOT 1
- typings.json does not define dependency versions HOT 2
- DialogCloseError is not exposed in typings HOT 2
- Add whenConfirmed alongside whenClosed HOT 1
- Doesn't load template page in IE11 HOT 12
- null reference error on closing dialog
- Support typing the model with a generic type argument on the open method HOT 2
- dialog forces mulptiple chunks in webpack prod build HOT 1
- 404 on typings install for Aurelia metadata HOT 3
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 dialog.