Closed lexon0011 closed 7 years ago
Yes, you need to use a custom component.
The library provides a small set of common scenarios like alert, prompt and confirm and that's it, anything else should be done via a custom component.
You want multiple input, then someone else wants 3 inputs 1 checkbox and 2 radio buttons... its endless...
I try the custom component with the angular2-modal@3.0.2. I use for trying this demo. I insert the component in the html template (<modal-content></modal-content>
) and register the component in the module declaration.
But now I get the following error: Error: No provider for DialogRef!
My SystemJS configuration for angular2-modal:
"paths": {
'angular2-modal': 'node_modules/angular2-modal/bundle/angular2-modal.rollup.umd.js',
'angular2-modal/plugins/bootstrap': 'node_modules/angular2-modal/plugins/bootstrap/bundle/angular2-modal-bootstrap.rollup.umd.js',
}
Is there something else to do or is there a mistake?
Thanks!
See this demo, v 3.0.3
I extend your demo with a custom dialog. Now I get the following error:
Unhandled Promise rejection: No provider for t!
I thing it is the same error, but because of uglifying the output is "t" instead of "DialogRef"
You find the updated sample here: http://plnkr.co/edit/IIs2E1jgV0nILeLzkMAV
Could you reproduce the error?
Is there already a solution? Is it reproducable? I would be very grateful for your help!
I use angular2-modal@3.0.2. Is there a way to use multiple input fields in a dialog? I need it for some user inputs. Like this:
I found only a way to use one input field.
Thanks!