-
-
Save bigopon/66e738715f3d7750f150f213db58bb5f to your computer and use it in GitHub Desktop.
aurelia2-issue-1299
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": "latest" | |
} | |
} |
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 from 'aurelia'; | |
import { MyApp } from './my-app'; | |
Aurelia.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
<div> | |
<template repeat.for="component of components"> | |
<au-compose containerless component.bind="component"></au-compose> | |
</template> | |
<div style="margin:20px"> | |
<button type="button" click.trigger="render()">Renderuj</button> | |
<button type="button" click.trigger="rimuv()">Remove</button> | |
</div> | |
</div> |
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 {SomeDemo2} from "./some-demo2"; | |
export class MyApp{ | |
public components : [any] = []; | |
render = () => { | |
console.log('???'); | |
this.components.push(SomeDemo2); | |
} | |
rimuv = () => { | |
this.components.pop(); | |
} | |
} |
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
<template style="display:block"> | |
<div class="some-demo"> | |
This is some demo2 a kazemo iz pogleda | |
</div> | |
</template> |
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 { resolve, INode } from 'aurelia'; | |
export class SomeDemo2{ | |
constructor(private host = resolve(INode) { | |
} | |
attaching = () => { | |
const animation = this.host.animate( | |
[{ opacity: 0 }, { opacity: 1 }], | |
{ duration: 15000 }, | |
); | |
return animation.finished; | |
} | |
detaching = () => { | |
const animation = this.host.animate( | |
[{ opacity: 1 }, { opacity: 0 }], | |
{ duration: 15000 }, | |
); | |
return animation.finished; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment