{"action":"created","issue":{"url":"https://api.github.com/repos/angular/angular.js/issues/13937","repository_url":"https://api.github.com/repos/angular/angular.js","labels_url":"https://api.github.com/repos/angular/angular.js/issues/13937/labels{/name}","comments_url":"https://api.github.com/repos/angular/angular.js/issues/13937/comments","events_url":"https://api.github.com/repos/angular/angular.js/issues/13937/events","html_url":"https://github.com/angular/angular.js/issues/13937","id":131000989,"number":13937,"title":"updating exposed scope property within directive's link function cause exception in v1.4.9","user":{"login":"avivr","id":7034094,"avatar_url":"https://avatars.githubusercontent.com/u/7034094?v=3","gravatar_id":"","url":"https://api.github.com/users/avivr","html_url":"https://github.com/avivr","followers_url":"https://api.github.com/users/avivr/followers","following_url":"https://api.github.com/users/avivr/following{/other_user}","gists_url":"https://api.github.com/users/avivr/gists{/gist_id}","starred_url":"https://api.github.com/users/avivr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/avivr/subscriptions","organizations_url":"https://api.github.com/users/avivr/orgs","repos_url":"https://api.github.com/users/avivr/repos","events_url":"https://api.github.com/users/avivr/events{/privacy}","received_events_url":"https://api.github.com/users/avivr/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/angular/angular.js/labels/component:%20$compile","name":"component: $compile","color":"e102d8"},{"url":"https://api.github.com/repos/angular/angular.js/labels/resolution:%20works%20as%20expected","name":"resolution: works as expected","color":"207de5"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2016-02-03T11:47:28Z","updated_at":"2016-03-08T04:24:02Z","closed_at":"2016-02-03T13:08:19Z","body":"Updating an exposed scope property within directive's link function cause exception in v1.4.9, with not in v1.4.8.\r\nI couldn't find the relevant change in the changelog.\r\n\r\nHere is a demo to show the problem:\r\nhttps://jsfiddle.net/kkop339m/\r\n\r\nChange the script tag to import v1.4.9 and run the code with console open.\r\nYou will see the following exception:\r\n\r\n> Error: [$compile:nonassign] Expression 'undefined' used with directive 'sampleDirective' is non-assignable!\r\n> http://errors.angularjs.org/1.4.9/$compile/nonassign?p0=undefined&p1=sampleDirective\r\n>     at angular.js:68\r\n>     at parentSet (angular.js:9092)\r\n>     at parentValueWatch (angular.js:9105)\r\n>     at Object.regularInterceptedExpression (angular.js:14646)\r\n>     at Scope.$digest (angular.js:16087)\r\n>     at Scope.$apply (angular.js:16359)\r\n>     at bootstrapApply (angular.js:1680)\r\n>     at Object.invoke (angular.js:4535)\r\n>     at doBootstrap (angular.js:1678)\r\n>     at bootstrap (angular.js:1698)\r\n\r\n\r\n\r\nSame code runs in v1.4.8 with no errors."},"comment":{"url":"https://api.github.com/repos/angular/angular.js/issues/comments/193599032","html_url":"https://github.com/angular/angular.js/issues/13937#issuecomment-193599032","issue_url":"https://api.github.com/repos/angular/angular.js/issues/13937","id":193599032,"user":{"login":"AckerApple","id":7964429,"avatar_url":"https://avatars.githubusercontent.com/u/7964429?v=3","gravatar_id":"","url":"https://api.github.com/users/AckerApple","html_url":"https://github.com/AckerApple","followers_url":"https://api.github.com/users/AckerApple/followers","following_url":"https://api.github.com/users/AckerApple/following{/other_user}","gists_url":"https://api.github.com/users/AckerApple/gists{/gist_id}","starred_url":"https://api.github.com/users/AckerApple/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AckerApple/subscriptions","organizations_url":"https://api.github.com/users/AckerApple/orgs","repos_url":"https://api.github.com/users/AckerApple/repos","events_url":"https://api.github.com/users/AckerApple/events{/privacy}","received_events_url":"https://api.github.com/users/AckerApple/received_events","type":"User","site_admin":false},"created_at":"2016-03-08T04:24:02Z","updated_at":"2016-03-08T04:24:02Z","body":"Thank you for the reply. I've never needed nor ever used the optional attribute specification even though it seems to have existed since the beginning of Angular. And so for me, I can't see why we need an optional specifier at all, especially when my 1.4.6 code works so great. Specifying something as optional, just doesn't feel like JavaScript at all. But mass adding a ? to all me two-way binds =? fixed my code across the board without checking if any scope attribute actually needs it. Thanks again"}}