refactor(core): move NodeType and ProviderType into NodeFlags

Also removes `ng-reflect` attributes for element properties.
This commit is contained in:
Tobias Bosch
2017-02-27 09:14:18 -08:00
committed by Igor Minar
parent f356041f09
commit 14d37fe052
25 changed files with 326 additions and 340 deletions

View File

@ -9,7 +9,7 @@
import {isDevMode} from '../application_ref';
import {looseIdentical} from '../facade/lang';
import {BindingDef, BindingType, DebugContext, NodeData, NodeDef, NodeFlags, NodeType, RootData, Services, TextData, ViewData, ViewFlags, asElementData, asTextData} from './types';
import {BindingDef, BindingType, DebugContext, NodeData, NodeDef, NodeFlags, RootData, Services, TextData, ViewData, ViewFlags, asElementData, asTextData} from './types';
import {checkAndUpdateBinding, getParentRenderElement, sliceErrorStack} from './util';
export function textDef(ngContentIndex: number, constants: string[]): NodeDef {
@ -26,8 +26,8 @@ export function textDef(ngContentIndex: number, constants: string[]): NodeDef {
suffix: constants[i]
};
}
const flags = NodeFlags.TypeText;
return {
type: NodeType.Text,
// will bet set by the view definition
index: undefined,
reverseChildIndex: undefined,
@ -36,7 +36,7 @@ export function textDef(ngContentIndex: number, constants: string[]): NodeDef {
bindingIndex: undefined,
outputIndex: undefined,
// regular values
flags: 0,
flags,
childFlags: 0,
childMatchedQueries: 0,
matchedQueries: {},
@ -47,7 +47,6 @@ export function textDef(ngContentIndex: number, constants: string[]): NodeDef {
element: undefined,
provider: undefined,
text: {prefix: constants[0], source},
pureExpression: undefined,
query: undefined,
ngContent: undefined
};