Open MeirionHughes opened 7 years ago
I supposed BindingBehavior
s can globalized the same way
Would this also cover something like this? I'm using ViewEngineHooks to give me access to features
in the view which are just a series of feature flags.
import {
View,
ViewEngineHooks
} from 'aurelia-framework';
import features from '../config/features';
export interface ICustomView extends View {
overrideContext: {
features: any
};
}
export class ConstantsViewEngineHooks implements ViewEngineHooks {
public beforeBind(view: ICustomView) {
view.overrideContext.features = features;
}
}