Created
April 8, 2019 18:11
-
-
Save arturovt/c3f3fabb2256e1f0093b76e9dafd4fb8 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>Hello world!</p> | |
</ng-template> | |
` | |
}) | |
export class SomeComponent {} | |
// Compiled template inside `ng-template` | |
export function View_SomeComponent_1() { | |
return viewDef( | |
ViewFlags.None, | |
[ | |
elementDef( | |
// node index | |
0, | |
NodeFlags.None, | |
null, | |
null, | |
// child count | |
1, | |
'p', | |
[], | |
null, | |
null, | |
null, | |
null, | |
null | |
), | |
textDef( | |
// `checkIndex` - индекс шаблонного выражения в массиве, обычно всегда | |
// значение равняется `-1`, if we had text like this: | |
// `Hello {{ name }}!` | |
// then `checkIndex` would equal to `1`, то есть по `0` индексу слово `Hello `, | |
// по `1` индексу переменная `name`, а по `2` индексу восклицательный знак | |
-1, | |
null, | |
['Hello world!'] | |
) | |
], | |
null, | |
null | |
); | |
} | |
// Compiled template of the `SomeComponent` | |
export function View_SomeComponent_0() { | |
return viewDef( | |
ViewFlags.None, | |
[ | |
anchorDef(NodeFlags.None, null, null, 0, null, View_SomeComponent_1) | |
], | |
null, | |
null | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment