Hi. I'm seeking some help please on how best to construct an app for
multiple customers.
My app is up and running but I am using a url for one customer as a
constant (e.g FBURL + '/' + customer).
I have a crud service which initialises with a reference to the url. This
works well.. e.g.

app.factory('Item', function ($firebase, $firebaseArray, $firebaseObject, Ref, Auth) {

   var items = $firebaseArray(Ref.child('items'));

   var Item = {
     all: function () {
       return items;
     },
     create: function (item) {
       return items.$add(item).then(function(ref) {
         return ref;
       });
     },
     getRec: function(itemId){
       return items.$getRecord(itemId);
     },
     getObj: function(itemId){
       return $firebaseObject(Ref.child('items').child(itemId));
     },
     update: function (item) {
       return item.$save().then(function(ref) {
         return ref;
       });
     },
     delete: function (item) {
       return items.$remove(item);
     },
   };

   return Item;

});

  The problem is how to adapt this for multiple customers. Ideally, this <https://groups.google.com/forum/#!topic/firebase-talk/vGa0oX7NLZk> is the structure i favour, but how to set the url to the customer node as they startup.

I was also thinking about a separate firebase for each customer, but how to deploy single code base to multiple firebase (in automated fashion).


If any one can help please (with code examples)


Thank you. Sola





--
You received this message because you are subscribed to the Google Groups "Firebase + AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-angular+unsubscribe@googlegroups.com.
To post to this group, send email to firebase-angular@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-angular/b48c7746-45ea-4a55-9b00-4de870a82d21%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

Discussion Posts

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 3 | next ›
Discussion Overview
groupfirebase-angular @
postedNov 6, '15 at 1:04a
activeNov 9, '15 at 8:32p
posts3
users2

2 users in discussion

Sotudeko: 2 posts Doug Thompson: 1 post

People

Translate

site design / logo © 2021 Grokbase