'block-ui' is not a known element:

2.2k Views Asked by At

Currently, I'm working in a project of angular6, I configured ng-block-ui properly( i already used ng-block-ui in one of the projects in angular5), but I am facing an issue with ng-block-ui as below while binding in component template

block-ui' is not a known element:
1. If 'block-ui' is an Angular component, then verify that it is part of this module.
2. If 'block-ui' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message. ("
[ERROR ->]<block-ui>
 <!-- Your app markup here -->
</block-ui>
"): ng:///HtmlLayoutModule/AdminComponent.html@0:0
Error: Template parse errors:

this is the versions I am using

"ng-block-ui": "^1.0.4",
"primeng": "^6.0.0-alpha.1",
"rxjs": "^6.2.0",
"rxjs-compat": "^6.2.0",
2

There are 2 best solutions below

0
Gourab27 On

As of now ng-block-ui is not compatible with RxJS 6. You can try using rxjs-compact to ensure backwards compatibility. For more information you can visit this link: https://github.com/kuuurt13/ng-block-ui/issues/61

2
vijai On
import { BlockUIModule } from 'ng-block-ui';

@NgModule({
    BlockUIModule.forRoot()
  ]
})

import blockui in module.ts