btford / angular-modal

Simple AngularJS service for creating modals
234 stars 58 forks source link

Requires template elements #2

Closed doublemarked closed 10 years ago

doublemarked commented 10 years ago

The modal currently fails if the template contains no elements (just text).

btford commented 10 years ago

not sure if it should throw or automagically wrap the elt. thoughts?

doublemarked commented 10 years ago

I would opt for automatic wrapping.

stryju commented 10 years ago

does it make sense?

modal should be a self contained element, like a window etc - so making it wrap the content makes no sense IMO how would you even style it? :-)

doublemarked commented 10 years ago

My head isn't in this problem any more, but @stryju you may be right. Perhaps the proper solution is to throw an exception if there's no element. That is probably a more disciplined approach.

btford commented 10 years ago

Landed in v0.2.2.

btford commented 10 years ago

My resolution, by the way, was to throw if there are just text nodes.

stryju commented 10 years ago

:beers: