In my app.module.ts
import { BlockUIModule } from 'ng-block-ui';
imports: [
BrowserModule,
BlockUIModule.forRoot(),
]
In my dashboard component
import { BlockUI, NgBlockUI } from 'ng-block-ui';
export class DashboardComponent implements OnInit {
@BlockUI() blockUI : NgBlockUI;
ngOnInit() {
this.blockUI.start()
}
}
If ng-block-ui directive (*blockUI = "'your-variable'") isn't working in ANGULAR 7, 8 OR 9
Then here is the solution.
First of all, if you followed this mentioned docs of ng-block-ui. And even it isn't working,
Then you need to install :
npm install ng-block-ui@next
this dependency in your angular project.
And if you are getting this error :
ng-block-ui: TypeError: Cannot read property 'localName' of null
at ng-block-ui.js:878
Then you need to install :
npm install ng-block-ui@next
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.