Skip to content

Adapter is not assigned to $rootScope when compileProvider.debugInfoEnabled is set to false #132

@adybionka

Description

@adybionka

I have spent a lot of time to find out, why adapter is not assigned properly to controller scope but instead of it to rootScope.

In my html code I use uiScrollViewport directive, but still adapter was assigned to rootScope.

I analyzed ui-scroll code, and I found that scope is create from directive element:

var candidateScope = candidate.scope();

but my app has set compileProvider.debugInfoEnabled(false) so candidate.scope() returns undefined. This is why adapter has been assigned to rootScope instead to my controller scope.

In my opinion this is bug. ui-scroll should not be dependent of debugInfoEnabled flag. Especially you don't mention about it in the documentation and it is very hard to figure out what is wrong.

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