ruby - Possible to have multiple ember.js apps in one Rails app? -
i'm working on ember app need merged ember app rails back-end (using ember-rails gem). possible have 2 totally separate ember apps connected rails back-end? there shared resources (through rails) otherwise apps different , ideal able serve them both 1 rails app opposed making 2 separate rails apps each ember app...
thanks
definitely possible. there multiple ways this. advice make ember.js apps share 1 namespace , instance.
below code example (credit @brg)
mainrailsapp = ember.application.create(); railsengine = ember.namespace.create(); railsengine2 = ember.namespace.create();
based on this, acceptable approach below
app = ember.namespace.create({name: "app" }); main = app.mainapp = ember.application.extend(); main.create();
either valid , can decide based on application-specific needs , workflow.
Comments
Post a Comment