Skip to content

BlockUI directive not working in Angular 18 #275

@ShoulderMonkey

Description

@ShoulderMonkey

I'm upgrading to angular 18 from angular 17 in one of my projects and i'm getting error where using

@BlockUI()blockUI!: NgBlockUI

gives error:

TypeError: Cannot read properties of undefined (reading 'start')

had to switch to using the BlockUIService instead and specifying name in selector like so:

`<block-ui [template]="foregroundSpinner" name="test" >

constructor(
private blockUI: BlockUIService
){

  }

this.blockUI.start('test')
`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions