-
-
Save fkleuver/e63198991ebe59dfbea8e7d726f94a64 to your computer and use it in GitHub Desktop.
Multiple viewports with separate navigation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>Dumber Gist</title> | |
| <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0, user-scalable=no"> | |
| <base href="/"> | |
| </head> | |
| <!-- | |
| Dumber Gist uses dumber bundler, the default bundle file | |
| is /dist/entry-bundle.js. | |
| The starting module is pointed to "main" (data-main attribute on script) | |
| which is your src/main.ts. | |
| --> | |
| <body> | |
| <my-app></my-app> | |
| <script src="/dist/entry-bundle.js" data-main="main"></script> | |
| </body> | |
| </html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "dependencies": { | |
| "aurelia": "dev" | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <import from="./detail.html"></import> | |
| <import from="./edit.html"></import> | |
| This is feature 1's child 1 | |
| <au-viewport default="detail" used-by="detail,edit"></au-viewport> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Feature 1 child1 Detail<br> | |
| <a goto="../edit">Edit</a> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Feature 1 child1 Edit<br> | |
| <a goto="../detail">Back</a> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <import from="./detail.html"></import> | |
| <import from="./edit.html"></import> | |
| This is feature 1's child 2 | |
| <au-viewport default="detail" used-by="detail,edit"></au-viewport> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Feature 1 child2 Edit<br> | |
| <a goto="../detail">Back</a> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Feature 1 child2 Detail<br> | |
| <a goto="../edit">Edit</a> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <import from="./child1/child1.html"></import> | |
| <import from="./child2/child2.html"></import> | |
| This is feature 1 | |
| <au-viewport default="child1" used-by="child1" class="feature"></au-viewport> | |
| <au-viewport default="child2" used-by="child2" class="feature"></au-viewport> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Feature 2 Detail<br> | |
| <a goto="../edit">Edit</a> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Feature 2 Edit<br> | |
| <a goto="../detail">Back</a> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <import from="./detail.html"></import> | |
| <import from="./edit.html"></import> | |
| This is feature 2 | |
| <au-viewport default="detail" used-by="detail,edit"></au-viewport> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Aurelia, { RouterConfiguration } from 'aurelia'; | |
| import { MyApp } from './my-app'; | |
| Aurelia | |
| .register(RouterConfiguration) | |
| .app(MyApp) | |
| .start(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| au-viewport { | |
| display: block; | |
| padding: 5px; | |
| } | |
| au-viewport.feature { | |
| border: 1px solid black; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <import from="./feature1/feature1.html"></import> | |
| <import from="./feature2/feature2.html"></import> | |
| <h1>${message}</h1> | |
| <au-viewport name="feature1" default="feature1" used-by="feature1" class="feature"></au-viewport> | |
| <au-viewport name="feature2" default="feature2" used-by="feature2" class="feature"></au-viewport> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export class MyApp { | |
| public message: string = 'Hello, Aurelia 2'; | |
| } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment