How collaborate two Views and Controllers on the same page?

Visto 36 veces
Saltar al primer mensaje no leído

angulajs-rocker

no leída,
23 abr 2014, 8:30:3423/4/14
a ang...@googlegroups.com
Hi All,

I have developed application with different views and controllers. For example:

when page loads:

1. One view 'A' is loaded with its specified controller in the app.js.
2. Navigate from view 'A' to second view 'B' with its specified view and controller.

We are using routing to navigate between the views.

Now the new requirement is we have to collabrate both the views in the single page.
They have remove routing concept and we have to collaborate the views in the single page.
All modules are opening up in pop-up now.

How I can use the existing code base without much changes in the code architecture?
Please help me. I am not perfect in the ANGULARJS. I stuck in it badly as they have changed the total design of the application.
Please help me. I will be very thankful to you.

Gabriel Aszalos

no leída,
23 abr 2014, 9:17:0023/4/14
a ang...@googlegroups.com
You could use:

a) a services (factory / service or provider)
b) directives for views, and have controllers expose an API (set up the require options so that they can communicate)
c) events, although this is not really recommended only for general app events

Google any of these things and you will find more details. Also, if they each run in pop-ups I don't think that 2 different browser windows can communicate with one another without having an intermediate layer (back-end)

sanket kumar singh

no leída,
24 abr 2014, 7:14:4924/4/14
a ang...@googlegroups.com
is this realy posible, if yes then please share. i am also interested on this.

Gabriel Aszalos

no leída,
24 abr 2014, 7:23:0424/4/14
a ang...@googlegroups.com
I think the only was to communicate between 2 browser windows is using cookies - or an extra back-end layer as previously mentioned


--
You received this message because you are subscribed to a topic in the Google Groups "AngularJS" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/angular/d7hrMeH9oss/unsubscribe.
To unsubscribe from this group and all its topics, send an email to angular+u...@googlegroups.com.
To post to this group, send email to ang...@googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Responder a todos
Responder al autor
Reenviar
0 mensajes nuevos