ngTemplateOutlet
在我的 Angular 代码中实现时出现以下错误
compiler.js:2420 Uncaught Error: Template parse errors:
Parser Error: Missing expected } at column 47 in [searchListing; context: {$implicit: entityList:genericJobList,
canCreateEntity:canCreateJob, nextBookmarkList:genericNextBmJobList,'disableScroll:disableJobScroll}]
in ng:///SharedSearchModule/SearchCompareComponent.html@707:7 ("
它说错误在第 707 行。我在第 707 行的代码是ngTemplateOutlet
自己的代码
<ng-container
*ngTemplateOutlet="searchListing; context: {$implicit: entityList:genericJobList,
canCreateEntity:canCreateJob, nextBookmarkList:genericNextBmJobList,
disableScroll:disableJobScroll}">
</ng-container>
部分ng-template如下:
<ng-template #searchListing let-canCreateEntity="canCreateEntity"
let-entityList="entityList" let-nextBookmarkList="nextBookmarkList"
let-disableScroll="disableScroll">
<!-- template code here -->
</ng-template>
}
根据遇到的错误,我没有看到丢失。我传递的道具是布尔类型(canCreateEntity,disableScroll),对象数组(entityList)和字符串(nextBookmarkList)。我无法提供一个工作示例,因为我无法在不修改它的情况下共享完整代码。谁能指出错误是什么