refactor(ProtoViewDto): switch to enum
This commit is contained in:
@ -161,8 +161,7 @@ export class Compiler {
|
||||
var protoView = protoViews[0];
|
||||
// TODO(tbosch): we should be caching host protoViews as well!
|
||||
// -> need a separate cache for this...
|
||||
if (renderPv.type === renderApi.ProtoViewDto.COMPONENT_VIEW_TYPE &&
|
||||
isPresent(componentBinding)) {
|
||||
if (renderPv.type === renderApi.ViewType.COMPONENT && isPresent(componentBinding)) {
|
||||
// Populate the cache before compiling the nested components,
|
||||
// so that components can reference themselves in their template.
|
||||
var component = componentBinding.key.token;
|
||||
|
@ -222,10 +222,10 @@ function _getChangeDetectorDefinitions(
|
||||
bindingRecordsCreator.getDirectiveRecords(elementBinders, allRenderDirectiveMetadata);
|
||||
var strategyName = DEFAULT;
|
||||
var typeString;
|
||||
if (pvWithIndex.renderProtoView.type === renderApi.ProtoViewDto.COMPONENT_VIEW_TYPE) {
|
||||
if (pvWithIndex.renderProtoView.type === renderApi.ViewType.COMPONENT) {
|
||||
strategyName = hostComponentMetadata.changeDetection;
|
||||
typeString = 'comp';
|
||||
} else if (pvWithIndex.renderProtoView.type === renderApi.ProtoViewDto.HOST_VIEW_TYPE) {
|
||||
} else if (pvWithIndex.renderProtoView.type === renderApi.ViewType.HOST) {
|
||||
typeString = 'host';
|
||||
} else {
|
||||
typeString = 'embedded';
|
||||
|
Reference in New Issue
Block a user