-
Notifications
You must be signed in to change notification settings - Fork 169
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to specify config if I am using templates inside a mountable engine (namespace isolated) #140
Comments
You can try specifying configs in yours engine's config file. Frankly I have never tried this, so if you get it working please let everyone know here. |
The simplest way I got it to pick up the templates in my mounted engine was to add my engine's template path to the array of the inside_paths config in my main application's (config/application.rb) file. in my case my engine is mounted in vendor/engines directory as per rails guides documentation. config.angular_templates.inside_paths = ['app/assets', 'vendor/engines/sukumafin/assets/'] I guess the catch here is to be cautious when naming your templates so there is no clashes between the app's templates and your engine template names. ...??? My observation here is that engines are simply another railtie added to main application and somehow uses one asset pipeline for js/css. So take due diligence when using angular with engines inside applications that uses angular and angular rails templates. Maybe slightly off the topic but I could not make ui.router work in the setup I have now and had to use "angular-routes" and I also had to ensure that there should are no routes clashing as well. |
What worked for me was putting the
And everything basically works as expected. Be sure to call your template files with the proper name-spacing (engine_name) in front. |
How would I go about specifying my config paths if I am using templates inside a rails mountable engine.
The text was updated successfully, but these errors were encountered: