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.

updating exposed scope property within directive's link function cause exception in v1.4.9 #13937

Closed
@avivr

Description

@avivr

Updating an exposed scope property within directive's link function cause exception in v1.4.9, with not in v1.4.8.
I couldn't find the relevant change in the changelog.

Here is a demo to show the problem:
https://jsfiddle.net/kkop339m/

Change the script tag to import v1.4.9 and run the code with console open.
You will see the following exception:

Error: [$compile:nonassign] Expression 'undefined' used with directive 'sampleDirective' is non-assignable!
http://errors.angularjs.org/1.4.9/$compile/nonassign?p0=undefined&p1=sampleDirective
at angular.js:68
at parentSet (angular.js:9092)
at parentValueWatch (angular.js:9105)
at Object.regularInterceptedExpression (angular.js:14646)
at Scope.$digest (angular.js:16087)
at Scope.$apply (angular.js:16359)
at bootstrapApply (angular.js:1680)
at Object.invoke (angular.js:4535)
at doBootstrap (angular.js:1678)
at bootstrap (angular.js:1698)

Same code runs in v1.4.8 with no errors.

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