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