Hi!

On Sat, Jan 25, 2014 at 2:21 PM, Alex Tan <[email protected]> wrote:
> What I need is to call login modal from different controllers, so the only
> solution I see is that modal controller watches an event on rootScope. Then
> whoever wants to call login modal, need to call a service to emit that event

Hmm, you really don't need events. You can simply inject a service
into each controller from where you need to open a modal.
No need to mess with $rootScope / events.

> As I said some things in AngularJS surprise me, what would take me a couple
> of lines of code with jQuery needs couple of hundreds... I hope it gets
> better after some learning

It is not surprising that things surprise you :-) AngularJS has
completely different philosophy.
And yes, it gets better (much, much better) with time.

Cheers,
Pawel




-- 
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