{"action":"created","issue":{"url":"https://api.github.com/repos/angular/angular.js/issues/10831","labels_url":"https://api.github.com/repos/angular/angular.js/issues/10831/labels{/name}","comments_url":"https://api.github.com/repos/angular/angular.js/issues/10831/comments","events_url":"https://api.github.com/repos/angular/angular.js/issues/10831/events","html_url":"https://github.com/angular/angular.js/issues/10831","id":55133572,"number":10831,"title":"ng-switch-when with expressions","user":{"login":"mallowigi","id":5015756,"avatar_url":"https://avatars.githubusercontent.com/u/5015756?v=3","gravatar_id":"","url":"https://api.github.com/users/mallowigi","html_url":"https://github.com/mallowigi","followers_url":"https://api.github.com/users/mallowigi/followers","following_url":"https://api.github.com/users/mallowigi/following{/other_user}","gists_url":"https://api.github.com/users/mallowigi/gists{/gist_id}","starred_url":"https://api.github.com/users/mallowigi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mallowigi/subscriptions","organizations_url":"https://api.github.com/users/mallowigi/orgs","repos_url":"https://api.github.com/users/mallowigi/repos","events_url":"https://api.github.com/users/mallowigi/events{/privacy}","received_events_url":"https://api.github.com/users/mallowigi/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/angular/angular.js/labels/component%3A+misc+core","name":"component: misc core","color":"fef2c0"},{"url":"https://api.github.com/repos/angular/angular.js/labels/frequency%3A+low","name":"frequency: low","color":"bfe5bf"},{"url":"https://api.github.com/repos/angular/angular.js/labels/severity%3A+inconvenient","name":"severity: inconvenient","color":"006b75"},{"url":"https://api.github.com/repos/angular/angular.js/labels/type%3A+feature","name":"type: feature","color":"00a606"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/angular/angular.js/milestones/38","labels_url":"https://api.github.com/repos/angular/angular.js/milestones/38/labels","id":529901,"number":38,"title":"Ice Box","description":"Milestone for valid issues and bugs that we have no aspirations on fixing any time soon because they are not affecting primary use-cases and are not aligned with our goals.","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":94,"closed_issues":59,"state":"open","created_at":"2014-01-08T08:19:21Z","updated_at":"2015-01-22T12:18:38Z","due_on":null,"closed_at":null},"comments":8,"created_at":"2015-01-22T09:51:48Z","updated_at":"2015-01-22T12:21:13Z","closed_at":null,"body":"Hi,\r\n\r\nI've recently found out that ng-switch-when expects a primitive value as an attribute, I always thought it was an expression. So I've made a fix that allows to use expressions as well.\r\n\r\nI'm using it because I need to use constants in my code instead of magic values.\r\nEx:\r\n\r\n```html\r\n<div ng-switch on=\"myScope.type\">\r\n    <span ng-switch-when-expr=\"myScope.types.TYPE1\">Type 1</span>\r\n    <span ng-switch-when-expr=\"myScope.types.TYPE2\">Type 2</span>\r\n    <span ng-switch-when-expr=\"'STRING'\">String</span>\r\n    <span ng-switch-default>undefined</span>\r\n</div>\r\n```\r\n\r\nTell me what do you think before I make a PR"},"comment":{"url":"https://api.github.com/repos/angular/angular.js/issues/comments/71012636","html_url":"https://github.com/angular/angular.js/issues/10831#issuecomment-71012636","issue_url":"https://api.github.com/repos/angular/angular.js/issues/10831","id":71012636,"user":{"login":"mallowigi","id":5015756,"avatar_url":"https://avatars.githubusercontent.com/u/5015756?v=3","gravatar_id":"","url":"https://api.github.com/users/mallowigi","html_url":"https://github.com/mallowigi","followers_url":"https://api.github.com/users/mallowigi/followers","following_url":"https://api.github.com/users/mallowigi/following{/other_user}","gists_url":"https://api.github.com/users/mallowigi/gists{/gist_id}","starred_url":"https://api.github.com/users/mallowigi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mallowigi/subscriptions","organizations_url":"https://api.github.com/users/mallowigi/orgs","repos_url":"https://api.github.com/users/mallowigi/repos","events_url":"https://api.github.com/users/mallowigi/events{/privacy}","received_events_url":"https://api.github.com/users/mallowigi/received_events","type":"User","site_admin":false},"created_at":"2015-01-22T12:21:13Z","updated_at":"2015-01-22T12:21:13Z","body":"How would I use it with ng-messages?"}}