I hava two emberjs projects both use EAK as the basic project structure. There are some common code i want to share between these two projects: templates, views(and the related stylesheets) some utility classes etc. But there are some doubts i want to figure out:
Any push in the right direction will be a tremendous help! Thank you.
It's perfectly find to extend the resolved to add directories as fault backs. Here's a sample code:
var appPath = "apps/ordering/";
var resolver = Ember.DefaultResolver.extend({
resolveTemplate: function (parsedName) {
parsedName.fullNameWithoutType = appPath + parsedName.fullNameWithoutType;
# fallback to raw templates (used for compatibility with non-Ember/emblem templates)
return this._super(parsedName) ||
Ember.TEMPLATES[parsedName.fullNameWithoutType + ".raw"]
}
});
Essentially you could call this._super with different paths in the right order to have the faultbacks.
Hope this helps
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With