if (angularElement instanceof AngularHasTemplateElement) {
AngularHasTemplateElement hasTemplate = (AngularHasTemplateElement) angularElement;
Source templateSource = hasTemplate.getTemplateSource();
if (templateSource != null) {
HtmlEntry htmlEntry = getReadableHtmlEntry(templateSource);
HtmlEntryImpl htmlCopy = htmlEntry.getWritableCopy();
htmlCopy.setValue(HtmlEntry.ANGULAR_APPLICATION, null);
htmlCopy.setValue(HtmlEntry.ANGULAR_COMPONENT, null);
htmlCopy.setState(HtmlEntry.ANGULAR_ERRORS, CacheState.INVALID);
cache.put(templateSource, htmlCopy);
workManager.add(templateSource, SourcePriority.HTML);
}
}
}