refactor(core): view engine - misc

- fix bug when detaching view from `ApplicationRef`
- fix integration of adding `ng-reflect` attributes
  in debug mode.
This commit is contained in:
Tobias Bosch
2017-02-22 10:05:56 -08:00
committed by Igor Minar
parent 5049a50bf6
commit ab3527c99b
18 changed files with 307 additions and 223 deletions

View File

@ -255,7 +255,7 @@ export class Identifiers {
static pureArrayDef:
IdentifierSpec = {name: 'ɵpureArrayDef', moduleUrl: CORE, runtime: ɵpureArrayDef};
static pureObjectDef:
IdentifierSpec = {name: 'ɵpureObjectRef', moduleUrl: CORE, runtime: ɵpureObjectDef};
IdentifierSpec = {name: 'ɵpureObjectDef', moduleUrl: CORE, runtime: ɵpureObjectDef};
static purePipeDef:
IdentifierSpec = {name: 'ɵpurePipeDef', moduleUrl: CORE, runtime: ɵpurePipeDef};
static pipeDef: IdentifierSpec = {name: 'ɵpipeDef', moduleUrl: CORE, runtime: ɵpipeDef};

View File

@ -447,7 +447,9 @@ class ViewBuilder implements TemplateAstVisitor, LocalResolver, BuiltinConverter
dirAst.directive.queries.forEach((query, queryIndex) => {
let flags = NodeFlags.HasContentQuery;
const queryId = dirAst.contentQueryStartId + queryIndex;
if (queryIds.staticQueryIds.has(queryId)) {
// Note: We only make queries static that query for a single item.
// This is because of backwards compatibility with the old view compiler...
if (queryIds.staticQueryIds.has(queryId) && query.first) {
flags |= NodeFlags.HasStaticQuery;
} else {
flags |= NodeFlags.HasDynamicQuery;