Skip to content
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

Dialog id should be available in dialog's scope. #274

Closed
MiguelMike opened this issue Jul 8, 2015 · 1 comment
Closed

Dialog id should be available in dialog's scope. #274

MiguelMike opened this issue Jul 8, 2015 · 1 comment
Assignees

Comments

@MiguelMike
Copy link

With a bit of a hack it's possible to pass the dialog's id to the scope:

config{
    // dialog config
}

var dialog = ngDialog.open(config);
config.data.id = dialog.id;

The last line makes the id available in the ngDialogData.

It's not possible to do that using openConfirm() as it returns promise. Therefore, this dialog's scope has no way of knowing what the id of a dialog is.

@MiguelMike MiguelMike changed the title Dialog id should be available in its scope. Dialog id should be available in dialog's scope. Jul 8, 2015
@egor-smirnov egor-smirnov self-assigned this Jul 10, 2015
@egor-smirnov
Copy link
Member

Should be available as $scope.ngDialogId. For example refer to examples/ folder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants