I have an old ASP.NET solution that I have introduced Aurelia to. In some aspx pages I am starting Aurelia, and my main.ts looks like this:

export function configure(aurelia) {
    aurelia.use
        .basicConfiguration()
        .developmentLogging();
  aurelia.start().then(() => aurelia.setRoot('/Controls/Warehouse/ProductPurchaseSuggestion/AureliaSource/app.js'));
}

In this manner, everytime we use Aurelia, we have to start it up like this.

I was just composing in my first template and had to write this:

<compose view-model="/Controls/Warehouse/ProductPurchaseSuggestion/AureliaSource/mergePopup" model.bind="{ demo: 'test' }"></compose>

To compose it in. I would have thought that setRoot would make it possible for me to write:

<compose view-model="mergePopup" model.bind="{ demo: 'test' }"></compose>

If I do it like in the last example here (how I want it to work), then I get the following error message in the console: Uncaught (in promise) Error: No view model found in module "mergePopup".

Is there any way of being able to do it in this manner?

Related posts

Recent Viewed