Last active
April 5, 2019 19:42
-
-
Save arturovt/27e1bb798ce494a0b16b82641a2bee0d 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
@Component({ | |
selector: 'app-some-component', | |
template: ` | |
<ng-template> | |
<p>{{ counter }}</p> | |
</ng-template> | |
` | |
}) | |
export class SomeComponent { | |
public counter = 0; | |
} | |
// Render2 | |
function View_AppComponent_1() { | |
return viewDef( | |
0, | |
[ | |
elementDef( | |
0, | |
0, | |
null, | |
null, | |
1, | |
'p', | |
[], | |
null, | |
null, | |
null, | |
null, | |
null | |
), | |
textDef(1, null, ['', '']) | |
], | |
null, | |
function(_ck: NodeCheckFn, _v: ViewData) { | |
const _co = _v.component; | |
const currVal_0 = _co.counter; | |
_ck(_v, 1, 0, currVal_0); | |
} | |
); | |
} | |
// Ivy | |
function SomeComponent_ng_template_0_Template(rf: RenderFlags, ctx: any) { | |
if (rf & RenderFlags.Create) { | |
elementStart(0, 'p'); | |
text(1); | |
elementEnd(); | |
} | |
if (rf & RenderFlags.Update) { | |
const instance = nextContext(); | |
textBinding(1, interpolation1('', instance.counter, '')); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment