m-e-conroy / angular-dialog-service

A complete AngularJS service with controllers and templates for generating application modals and dialogs for use with Angular-UI-Bootstrap and Twitter Bootstrap
MIT License
618 stars 228 forks source link

Added controller as syntax #158

Closed venil7 closed 8 years ago

venil7 commented 8 years ago

added as a 5'th optional parameter to .create method, so to not break backwards compatibility defaults to ctrl see readme for details

dougmoscrop commented 8 years ago

I'm not a big fan of a large number of parameters, like I much prefer an options-argument that gives things names, I realize this already has four parameters but I'm not sure we want to keep that up. I'm interested in what other people think - but I'd prefer to make this part of 'opts'.

venil7 commented 8 years ago

@dougmoscrop I agree with that, in fact extending opts was my first attempt, before I realized it was solely todo with object<IDialogOptions> - options for dialog

dougmoscrop commented 8 years ago

yeah, you're right. maybe we can explore, unrelated to this, moving to a single-param options block (some kind of backwards compatible check like arguments.length === 1 && typeof arguments[0] === 'object') to support a new syntax but I'm :+1: on this

niemyjski commented 8 years ago

Should we create a new issue for this as I would also like an options object as long as we don't break compat or bump the major? I think accepting this is fine. Everyone agree?

dougmoscrop commented 8 years ago

https://github.com/m-e-conroy/angular-dialog-service/issues/159