template-lint icon indicating copy to clipboard operation
template-lint copied to clipboard

Support Global Resources

Open MeirionHughes opened this issue 7 years ago • 2 comments

  • [x] Custom Elements
  • [x] Custom Attributes
  • [x] Value Converters
  • [x] Binding Behaviors
  • [x] Calls to config.globalResources
    • [ ] ensure paths exist
  • [ ] Calls to config.Feature
  • [ ] Fluent style (chaining)

requires analyzing the configure(config) methods in user code - not trivial.

MeirionHughes avatar Oct 08 '16 11:10 MeirionHughes

I supposed BindingBehaviors can globalized the same way

atsu85 avatar Oct 08 '16 12:10 atsu85

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;
  }
}

mttmccb avatar Sep 29 '17 13:09 mttmccb