Multiple Aurelia Applications on One Page

Since there is little information about Aurelia objects, I am stuck on these two issues.

  • Is it possible to create multiple Aurelia applications on one page and
    How can this be achieved?
  • Alternatively, is there a way to call individual application templates in two different places outside the main application container?
    • For example, I want to use Aurelia SPA in a CMS system and call it in different elements, such as the header, the main container, and the container aside.
+3
source share
1 answer

Yes, just add two elements to the page with the aurelia-app attribute.

Here is an example: https://gist.run?id=2d310abbbea337fb5f6d110ec807f7d2

 <!doctype html> <html> <head> <title>Aurelia</title> </head> <body> <div aurelia-app="main1"> <h1>Loading...</h1> </div> <div aurelia-app="main2"> <h1>Loading...</h1> </div> ... </body> </html> 
+5
source

All Articles