Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

One Way scope binding ('@') is behaving differently since 1.4.1 #12395

Closed
@phouri

Description

@phouri

We recently upgraded to angular 1.4.3 from 1.3.15, (however this bug is when jumping from 1.4.0 to 1.4.1).

I have a scope defined in a directive:

 scope: {
                ngModel: '=',
                mode: '@',
                overallStart: '='
            }

and inside the link function:

 if (!$scope.mode) {
                    $scope.mode = 'daterange';
   }

And in the HTML:
ng-if="mode === 'daterange'"

Everything used to work well, but when changing from 1.4.0 to 1.4.1 I am getting that $scope.mode is undefined, when debugging I see that $scope.mode = 'daterange' is executed, but if I setup a watch on $scope.mode, it's always undefined.

I tried going through the breaking changes, but didn't see anything that reminded of that.

Working: http://plnkr.co/edit/nBXcEzRxpw0lKQvUEc3Q?p=preview
Not working: http://plnkr.co/edit/akSRZw5stA8OdzsLQv8V?p=preview

Did I miss anything in the release notes?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions