Hi!

There is really no need to use events for this, I agree that it would
get complex.
But creating a service to open a modal is really simple, check this
sketch of the solution:
https://github.com/btford/angular-modal

Fully functional impl here: http://angular-ui.github.io/bootstrap/#/modal

Cheers,
Pawel

On Sat, Jan 25, 2014 at 11:31 AM, Alex Tan <[email protected]> wrote:
> I am reading about using a service and it seems complicated.
> I have to emit event from the service to rootScope and setup watch on every
> controller that want to be able to open login modal to watch the rootScope
> variable
> Is it really so complicated? Before I would just call a global function
> openLogin()
> I understand that there are some gains but this really drives me nuts for
> the moment
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "AngularJS" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/angular.
> For more options, visit https://groups.google.com/groups/opt_out.



-- 
AngularJS book:
http://www.packtpub.com/angularjs-web-application-development/book
Looking for bootstrap-based widget library for AngularJS?
http://angular-ui.github.com/bootstrap/

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to