angular-ui / bootstrap

PLEASE READ THE PROJECT STATUS BELOW. Native AngularJS (Angular) directives for Bootstrap. Smaller footprint (20kB gzipped), no 3rd party JS dependencies (jQuery, bootstrap JS) required. Please read the README.md file before submitting an issue!
http://angular-ui.github.io/bootstrap/
MIT License
14.27k stars 6.73k forks source link

Change variable name for close result in component binding #6351

Open Vanwards opened 7 years ago

Vanwards commented 7 years ago

Hello,

Is it possible to add the ability to change the name of the variable for the modal result ($value) of "close" method in the case of using the component? If you are using EventEmitter of ng-metdata, the result is always returned in the form of a variable $event.

https://hotell.gitbooks.io/ng-metadata/content/docs/api/core/class.html#eventemitter

wesleycho commented 7 years ago

I am very confused by the question - can you elaborate?

Vanwards commented 7 years ago

I use ng-metadata for migration to angular 2. If you use a component in a modal window, you can not return the result of the fact that ng-metadata EventEmitter uses $event as a return value.

@Output() close = new EventEmitter<boolean>();
...
this.close.emit(true); //in template - $ctrl.close($event)