-
Notifications
You must be signed in to change notification settings - Fork 241
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Showing a custom form. #126
Comments
I'm struggling with the same question. Based on the code you linked above I almost got it working. I'm using the Vex plugin though, and my dialog shows up without any style (it's in the upper left corner, no backdrop, no border etc.). I'm clearly missing styles, but I'm not sure what should be set. All Vex examples are using the builder that takes care of this. Very nice mechanism for advanced dialogs btw!
What am I missing? |
First, unrelated to the issue: export class FlightControlDialogData extends BSModalContext {
constructor(public flightcontrol : any) {
super();
}
} You extend the BSModalContext which is from the Bootstrap plugin, no need for that its not the same data structure. As for the issue, the CSS theme files are not included in the plugin. It's a common practice in such cases. |
Thanks for the very quick reply! |
If you are using the open() method you need to supply a component that have the right html elements. Your directive is missing some container elements, for example the root element should be a form. Check the components inside the plugin source code |
Your html need to comply with vex html |
Thanks for the hints @shlomiassaf, I got it to render correctly. There's a few details to know that are not straight forward to guess from the existing examples and docs. An example would be a very useful addition I think. In the mean time for others looking for the same, this is the code I ended up with.
|
After upgrading to Angular 2 rc5 I'm running in an issue with Vex custom dialogs.
To upgrade I did the following:
Note that default dialogs do work correctly after the update. |
In beta11 you don't need to the set As for the error, in beta 11 its a lot easier to open custom modals. I'll use an example: // import ......
import { overlayConfigFactory } from "angular2-modal";
@Component({...})
class CutomModal{ }
this.modal.open(CustomModal, overlayConfigFactory({ num1: 2, num2: 3 }, BSModalContext));
In this sample I used it so it will load all of the default context properties used in the bootstrap plugin. If you don't supply it the default In your example, it should be:
Or, since there isn't any logic in
Note that |
Thanks for the reply!
|
You don't need The Try removing it, i'm not sure its the issue but let's see. |
Without the |
Are you using a systemJS based project (angular2-sees)? if so probably linked to #174 |
I'm using Webpack, but that's mentioned in #174 as well. |
So I continued testing now that beta12 seems to work. I've tried several ways (based on the examples) of creating the custom dialog, but always getting For example, this is one of the tries.
|
As probably figured out here, the error "Cannot read property 'inElement' of undefined" happens only when you try to load a modal without passing a context object. Line where the error comes from: https://github.com/shlomiassaf/angular2-modal/blob/8d0c9320233c7c746a2702346060a8806f2ba3a7/src/components/angular2-modal/overlay/overlay.service.ts#L87 For anyone else looking for the solution, check PR #194 |
@paulbakker "Cannot set property stack of [object Object]..." is an error already fixed on Angular exception handling, but it hides the original error. Place a breakpoint on the line it happens and check the stack for the original exception. |
Updated to beta13, and after some changes got everything to work. I didn't open this issue originally, but I think it can be closed. |
closing, reopen if needed. |
[ ] feature request
Is there a possibility to show custom form in the dialog?
The text was updated successfully, but these errors were encountered: