{"action":"created","issue":{"url":"https://api.github.com/repos/angular/angular.js/issues/12060","labels_url":"https://api.github.com/repos/angular/angular.js/issues/12060/labels{/name}","comments_url":"https://api.github.com/repos/angular/angular.js/issues/12060/comments","events_url":"https://api.github.com/repos/angular/angular.js/issues/12060/events","html_url":"https://github.com/angular/angular.js/issues/12060","id":86564681,"number":12060,"title":"in 1.3.16 ng-repeat filter changed from not filtering the absent fields to filtering them","user":{"login":"ali-bugdayci","id":1422344,"avatar_url":"https://avatars.githubusercontent.com/u/1422344?v=3","gravatar_id":"","url":"https://api.github.com/users/ali-bugdayci","html_url":"https://github.com/ali-bugdayci","followers_url":"https://api.github.com/users/ali-bugdayci/followers","following_url":"https://api.github.com/users/ali-bugdayci/following{/other_user}","gists_url":"https://api.github.com/users/ali-bugdayci/gists{/gist_id}","starred_url":"https://api.github.com/users/ali-bugdayci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ali-bugdayci/subscriptions","organizations_url":"https://api.github.com/users/ali-bugdayci/orgs","repos_url":"https://api.github.com/users/ali-bugdayci/repos","events_url":"https://api.github.com/users/ali-bugdayci/events{/privacy}","received_events_url":"https://api.github.com/users/ali-bugdayci/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/angular/angular.js/labels/component:%20misc%20core","name":"component: misc core","color":"fef2c0"},{"url":"https://api.github.com/repos/angular/angular.js/labels/needs:%20more%20info","name":"needs: more info","color":"d7eb9f"}],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/angular/angular.js/milestones/35","html_url":"https://github.com/angular/angular.js/milestones/Purgatory","labels_url":"https://api.github.com/repos/angular/angular.js/milestones/35/labels","id":526241,"number":35,"title":"Purgatory","description":"This milestone is for issues and PRs that weren't accepted yet and we are waiting for more info from the submitter.\r\n\r\nFor issues this typically means that we weren't able to reproduce the issue or we haven't decided yet if a feature request is a good idea at all.\r\n\r\nFor PRs this means that the PR still needs a lot of work and we might not even be interested in merging it because it looks like a non-core feature. We are still waiting for more discussion within the team or more info from the contributor before making the final decision.","creator":{"login":"IgorMinar","id":216296,"avatar_url":"https://avatars.githubusercontent.com/u/216296?v=3","gravatar_id":"","url":"https://api.github.com/users/IgorMinar","html_url":"https://github.com/IgorMinar","followers_url":"https://api.github.com/users/IgorMinar/followers","following_url":"https://api.github.com/users/IgorMinar/following{/other_user}","gists_url":"https://api.github.com/users/IgorMinar/gists{/gist_id}","starred_url":"https://api.github.com/users/IgorMinar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IgorMinar/subscriptions","organizations_url":"https://api.github.com/users/IgorMinar/orgs","repos_url":"https://api.github.com/users/IgorMinar/repos","events_url":"https://api.github.com/users/IgorMinar/events{/privacy}","received_events_url":"https://api.github.com/users/IgorMinar/received_events","type":"User","site_admin":false},"open_issues":121,"closed_issues":385,"state":"open","created_at":"2014-01-04T01:20:50Z","updated_at":"2015-06-16T11:09:00Z","due_on":null,"closed_at":null},"comments":12,"created_at":"2015-06-09T11:32:38Z","updated_at":"2015-06-16T13:36:02Z","closed_at":"2015-06-10T10:05:23Z","body":"in 1.3.15 we have working code like this:\r\n\r\n```\r\n<div data-ng-controller=\"UserController as vm\"\r\n        <div ng-include=\"'modules/users/views/usersTable.template.client.view.html'\">\r\n```\r\nwhere the ng-view included can see and use the vm object.\r\n\r\nUpdate to 1.3.16 breaks this and ng-view creates a new scope object. Hence the vm used inside the included code is not same object.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/angular/angular.js/issues/comments/112432308","html_url":"https://github.com/angular/angular.js/issues/12060#issuecomment-112432308","issue_url":"https://api.github.com/repos/angular/angular.js/issues/12060","id":112432308,"user":{"login":"petebacondarwin","id":15655,"avatar_url":"https://avatars.githubusercontent.com/u/15655?v=3","gravatar_id":"","url":"https://api.github.com/users/petebacondarwin","html_url":"https://github.com/petebacondarwin","followers_url":"https://api.github.com/users/petebacondarwin/followers","following_url":"https://api.github.com/users/petebacondarwin/following{/other_user}","gists_url":"https://api.github.com/users/petebacondarwin/gists{/gist_id}","starred_url":"https://api.github.com/users/petebacondarwin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petebacondarwin/subscriptions","organizations_url":"https://api.github.com/users/petebacondarwin/orgs","repos_url":"https://api.github.com/users/petebacondarwin/repos","events_url":"https://api.github.com/users/petebacondarwin/events{/privacy}","received_events_url":"https://api.github.com/users/petebacondarwin/received_events","type":"User","site_admin":false},"created_at":"2015-06-16T13:36:02Z","updated_at":"2015-06-16T13:36:02Z","body":"There is no configuration phase (unlike standard services) for filters and for this use case it would be an unrealistic change to the core. Also changing how a filter behaves across the board and behind the scenes is a recipe for disaster. If you are using a third party component that expects `filterFilter` to behave as specified by Angular this may break things. Also future maintainers may not realise that the filter behaviour has been changed just from looking at the template, without searching through the code for potential configuration changes.\r\n\r\nAs @gkalpak points out there are a number of extension points in Angular to allow you to achieve the effect you wish. Here are a couple of examples:\r\n\r\n* Parse the ngModel, converting empty strings to undefined: http://plnkr.co/edit/dLb2oI2LEmm1ZdI6Ijse?p=preview\r\n* Provide a custom comparator: http://plnkr.co/edit/d8y2u7xJKFSzkXIfOqgI?p=preview\r\n\r\nThe second option is perhaps the recommended approach as it doesn't mess with the model value. By attaching the comparator to the `$rootScope` it is available throughout your application, it doesn't add much to the complexity of the template, It also has the added advantage that it does not change the behaviour of `filterFilter` for third party components, which you might be using and makes it explicitly clear to the person reading the template that this filter is not going to behave in the default manner."}}