Skip to content

Cannot read property 'elevation' of null #23

@cerealexx

Description

@cerealexx

The documentation says you can pass null or an empty string to the shadow directive to remove the shadow. I'm dynamically passing a number value or null depending on the platform with this method:

public iosShadow(level: string): number {
    if (this.platform === 'ios') {
        return Number(level);
     }
    return null;
}

And view:

<StackLayout [shadow]="iosShadow(2)">
    ...
</StackLayout>

Though I always get this error when passing null: Cannot read property 'elevation' of null

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions