{"action":"created","issue":{"url":"https://api.github.com/repos/angular/material/issues/3299","labels_url":"https://api.github.com/repos/angular/material/issues/3299/labels{/name}","comments_url":"https://api.github.com/repos/angular/material/issues/3299/comments","events_url":"https://api.github.com/repos/angular/material/issues/3299/events","html_url":"https://github.com/angular/material/issues/3299","id":88848259,"number":3299,"title":"md-tabs: just switching tabs causes over 60 digests (was infinite in earlier versions)","user":{"login":"gpothier","id":629806,"avatar_url":"https://avatars.githubusercontent.com/u/629806?v=3","gravatar_id":"","url":"https://api.github.com/users/gpothier","html_url":"https://github.com/gpothier","followers_url":"https://api.github.com/users/gpothier/followers","following_url":"https://api.github.com/users/gpothier/following{/other_user}","gists_url":"https://api.github.com/users/gpothier/gists{/gist_id}","starred_url":"https://api.github.com/users/gpothier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gpothier/subscriptions","organizations_url":"https://api.github.com/users/gpothier/orgs","repos_url":"https://api.github.com/users/gpothier/repos","events_url":"https://api.github.com/users/gpothier/events{/privacy}","received_events_url":"https://api.github.com/users/gpothier/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"robertmesserle","id":571363,"avatar_url":"https://avatars.githubusercontent.com/u/571363?v=3","gravatar_id":"","url":"https://api.github.com/users/robertmesserle","html_url":"https://github.com/robertmesserle","followers_url":"https://api.github.com/users/robertmesserle/followers","following_url":"https://api.github.com/users/robertmesserle/following{/other_user}","gists_url":"https://api.github.com/users/robertmesserle/gists{/gist_id}","starred_url":"https://api.github.com/users/robertmesserle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robertmesserle/subscriptions","organizations_url":"https://api.github.com/users/robertmesserle/orgs","repos_url":"https://api.github.com/users/robertmesserle/repos","events_url":"https://api.github.com/users/robertmesserle/events{/privacy}","received_events_url":"https://api.github.com/users/robertmesserle/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/angular/material/milestones/17","html_url":"https://github.com/angular/material/milestones/0.11.0","labels_url":"https://api.github.com/repos/angular/material/milestones/17/labels","id":1166984,"number":17,"title":"0.11.0","description":"- DateTimepicker\r\n- SpeedDial (cont)\r\n- Menu (menubar, cascaded menus, hotkeys)\r\n- Chips (cont.)\r\n- textfields\r\n  *  `<md-text-search>`\r\n- bi-directional support (cont.)\r\n- Slider range\r\n\r\n\r\nPerformance improvements with ripples and ink\r\n","creator":{"login":"robertmesserle","id":571363,"avatar_url":"https://avatars.githubusercontent.com/u/571363?v=3","gravatar_id":"","url":"https://api.github.com/users/robertmesserle","html_url":"https://github.com/robertmesserle","followers_url":"https://api.github.com/users/robertmesserle/followers","following_url":"https://api.github.com/users/robertmesserle/following{/other_user}","gists_url":"https://api.github.com/users/robertmesserle/gists{/gist_id}","starred_url":"https://api.github.com/users/robertmesserle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robertmesserle/subscriptions","organizations_url":"https://api.github.com/users/robertmesserle/orgs","repos_url":"https://api.github.com/users/robertmesserle/repos","events_url":"https://api.github.com/users/robertmesserle/events{/privacy}","received_events_url":"https://api.github.com/users/robertmesserle/received_events","type":"User","site_admin":false},"open_issues":278,"closed_issues":1,"state":"open","created_at":"2015-06-16T15:48:24Z","updated_at":"2015-06-16T22:18:30Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2015-06-16T21:47:23Z","updated_at":"2015-06-16T22:21:06Z","closed_at":null,"body":"When switching tabs in an md-tabs container, the digest process seems to be called many more times than necessary. I have an example where it is called around 60 times in Firefox (15 times in Chrome), although no data changes in the scope.\r\n\r\nThe html is like this:\r\n\r\n\t<md-tabs flex md-border-bottom md-selected=\"selectedTab\" >\r\n\t\t<md-tab label=\"A\">\r\n\t\t\t<md-content class=\"md-padding\">\r\n\t\t\t\t<div ng-if=\"isTeamAdmin(null)\">stuff</div>\r\n\t\t\t</md-content>\r\n\t\t</md-tab>\r\n\t\r\n\t\t<md-tab label=\"B\">\r\n\t\t</md-tab>\r\n\t</md-tabs>\r\n\r\nAnd the controller is like this:\r\n\r\n\tangular.module(\"docflow\").controller(\"BooksListCtrl\", \r\n\t[\"$scope\", \"$rootScope\", \r\n\tfunction($scope, $rootScope){\r\n\t\t$scope.isTeamAdmin = function() {\r\n\t\t\tconsole.log(\"isTeamAdmin\");\r\n\t\t\treturn false;\r\n\t\t};\t\t\r\n\t}]);\r\n\r\nThe isTeamAdmin function is called 60+ times when switching tabs.\r\n\r\nHere is a Meteor app that reproduces the problem:\r\n\r\nhttps://github.com/gpothier/mdTabIssues\r\n\r\nNote: with previous versions of Angular and Material, the isTeamAdmin function was being called again and again forever, so it seems a kind of failsafe now kicks in, but still the method should be called only once.\r\n"},"comment":{"url":"https://api.github.com/repos/angular/material/issues/comments/112586823","html_url":"https://github.com/angular/material/issues/3299#issuecomment-112586823","issue_url":"https://api.github.com/repos/angular/material/issues/3299","id":112586823,"user":{"login":"gpothier","id":629806,"avatar_url":"https://avatars.githubusercontent.com/u/629806?v=3","gravatar_id":"","url":"https://api.github.com/users/gpothier","html_url":"https://github.com/gpothier","followers_url":"https://api.github.com/users/gpothier/followers","following_url":"https://api.github.com/users/gpothier/following{/other_user}","gists_url":"https://api.github.com/users/gpothier/gists{/gist_id}","starred_url":"https://api.github.com/users/gpothier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gpothier/subscriptions","organizations_url":"https://api.github.com/users/gpothier/orgs","repos_url":"https://api.github.com/users/gpothier/repos","events_url":"https://api.github.com/users/gpothier/events{/privacy}","received_events_url":"https://api.github.com/users/gpothier/received_events","type":"User","site_admin":false},"created_at":"2015-06-16T22:21:06Z","updated_at":"2015-06-16T22:21:06Z","body":"Just confirming that the version that caused infinite digests is 0.9.8. In 0.9.10 it is \"only\" 60."}}