问题
No code changes done, upgraded to Angular 10, everything works except a feature. There were no build errors, but in browser console able to see below error. I guess this may be related to angular.core, rxjs, but unclear..appreciate your help.
core.js:4197 ERROR TypeError: templateRef.createEmbeddedView is not a function
at ViewContainerRef.createEmbeddedView (core.js:10092)
at NgTemplateOutlet.ngOnChanges (ng_template_outlet.ts:65)
at NgTemplateOutlet.rememberChangeHistoryAndInvokeOnChangesHook (core.js:2131)
at callHook (core.js:3042)
at callHooks (core.js:3008)
at executeInitAndCheckHooks (core.js:2960)
at selectIndexInternal (core.js:6179)
at Module.ɵɵadvance (core.js:6152)
回答1:
I found the cause, I had a name for div same as ng-template which was causing the issue, once i renamed "sResult" of the ngtemplate, issue got resolved.
`<div
class="tree results-container" #sResult >
<ng-template #sResult let-items>
<ul>`
来源:https://stackoverflow.com/questions/64902629/angular-10-typeerror-in-browser-console-but-no-error-in-build