Last active
August 5, 2019 23:56
-
-
Save phenomnomnominal/38b35f6d90b5332fc386245f5fa7593a to your computer and use it in GitHub Desktop.
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 { Component, Directive, Pipe } from '@angular/core'; | |
import { DatePipe as date, NgIf as ngIf } from '@angular/common'; | |
import { SomethingComponent as something } from './something.component'; | |
const template = function (templates: TemplateStringsArray, ...declarations: Array<Component | Directive | Pipe>) { | |
return function () { | |
// ivyMagicHere?! | |
}; | |
} | |
@Component({ | |
selector: 'my-component', | |
template: template` | |
<${something} | |
*${ngIf}="flip"> | |
{{ created | ${date} }} | |
</${something}> | |
` | |
}) | |
export class MyComponent { | |
public flip = Math.random () > 5; | |
public created = new Date(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment