controllers should not know about eachother, so they can share
functionality via a service, or via events


On 5 May 2014 02:54, maxim couton <[email protected]> wrote:

> Hi Sander,
>     I wants somethig like this;
>
>    angular.module('mymodule').controller('C1' , function ($scope)){
>
>
>     $scope.operation1(params){
>
>      // do somthing
>
>     }
>
> });
>
>
>
> angular.module('mymodule').controller('C2' , function ($scope)){
>
>
>     $scope.call(params){
>
>      c1.operation1(params); // ??? is it possible and how to make C2 knows
> C1
>
>     }
>
> });
>
> Le lundi 5 mai 2014 11:38:22 UTC+2, Sander Elias a écrit :
>
>> Hi Maxim,
>>
>> This is a textbook example of the use of the "controller as" syntax.
>> If you would have provided an plunker, I would have shown you how to do
>> it.
>>
>> Regards
>> Sander
>>
>  --
> 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/d/optout.
>



-- 
Tony Polinelli

-- 
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/d/optout.

Reply via email to