Ahhh okay that makes sense. Yeah connecting to a rest api probably
shouldn't be handled in a directive lol.

On Sat Jan 10 2015 at 10:06:34 PM Cornelius Kölbel <
[email protected]> wrote:

>  You might also create a service.
> I needed access to a rest api in all my controllers, so creating a service
> was the right choise.
> Your service can also provide a simple object.
> A service is always a singleton, so you will have one unique object
> throughout your whole app.
>
> Kind regards
>
> Cornelius
>
>
> On Wednesday, January 7, 2015 at 1:47:15 AM UTC-8, biswarup dasgupta
> wrote:
>>
>> Hi,
>>
>>  Is there any way to bind the same javascript object to different html
>> pages apart from having the object in rootScope ? Any pointers are welcome.
>>
>>  Thanks.
>>
>  --
>
>  --
> 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/2UGRztAin2U/unsubscribe.
> To unsubscribe from this group and all its topics, 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.
>

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