UNPKG

aurelia-view-manager

Version:

A view manager for aurelia plugins. Add support for overriding views, and multiple frameworks

15 lines (13 loc) 571 B
import {ResolvedViewStrategy} from './../resolved-view-strategy'; import {useViewStrategy} from 'aurelia-templating'; /** * Decorates a custom element class in a way that it loads it's view from * elsewhere * * @param {string} namespace used to separate different view configurations * @param {string} view used to find the value that belongs to the view * @returns {function} that takes the target and sets the view strategy on the element */ export function resolvedView(namespace, view) { return useViewStrategy(new ResolvedViewStrategy(namespace, view)); }