aurelia / template-lint

Sanity check of Aurelia-flavor template HTML
Apache License 2.0
56 stars 17 forks source link

Support non-convention VM resolution #151

Open MeirionHughes opened 7 years ago

MeirionHughes commented 7 years ago

when bar.ts is:

useView("foo.html")
export class Bar{}

and ray.ts is

export class Ray{
  getViewStrategy() {
    return 'foo.html';
  }
}

then foo.html should resolve to view-models ["bar.ts", "ray.ts"] and perform type-checking against both.

petronellius commented 7 years ago

Please, support also scenario when global custom view location convention is used by overriding ViewLocator.prototype.convertOriginToViewUrl method. In our project views and viewmodels differ with names (e.g. title.html and titleVM.ts).