{"action":"created","issue":{"url":"https://api.github.com/repos/angular/material2/issues/12791","repository_url":"https://api.github.com/repos/angular/material2","labels_url":"https://api.github.com/repos/angular/material2/issues/12791/labels{/name}","comments_url":"https://api.github.com/repos/angular/material2/issues/12791/comments","events_url":"https://api.github.com/repos/angular/material2/issues/12791/events","html_url":"https://github.com/angular/material2/issues/12791","id":353071996,"node_id":"MDU6SXNzdWUzNTMwNzE5OTY=","number":12791,"title":"Chips are not getting color set when used with a FormControl for chip autocomplete","user":{"login":"bryjohns","id":3867820,"node_id":"MDQ6VXNlcjM4Njc4MjA=","avatar_url":"https://avatars1.githubusercontent.com/u/3867820?v=4","gravatar_id":"","url":"https://api.github.com/users/bryjohns","html_url":"https://github.com/bryjohns","followers_url":"https://api.github.com/users/bryjohns/followers","following_url":"https://api.github.com/users/bryjohns/following{/other_user}","gists_url":"https://api.github.com/users/bryjohns/gists{/gist_id}","starred_url":"https://api.github.com/users/bryjohns/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bryjohns/subscriptions","organizations_url":"https://api.github.com/users/bryjohns/orgs","repos_url":"https://api.github.com/users/bryjohns/repos","events_url":"https://api.github.com/users/bryjohns/events{/privacy}","received_events_url":"https://api.github.com/users/bryjohns/received_events","type":"User","site_admin":false},"labels":[{"id":618683764,"node_id":"MDU6TGFiZWw2MTg2ODM3NjQ=","url":"https://api.github.com/repos/angular/material2/labels/P4","name":"P4","color":"fef2c0","default":false}],"state":"open","locked":false,"assignee":{"login":"jelbourn","id":838736,"node_id":"MDQ6VXNlcjgzODczNg==","avatar_url":"https://avatars3.githubusercontent.com/u/838736?v=4","gravatar_id":"","url":"https://api.github.com/users/jelbourn","html_url":"https://github.com/jelbourn","followers_url":"https://api.github.com/users/jelbourn/followers","following_url":"https://api.github.com/users/jelbourn/following{/other_user}","gists_url":"https://api.github.com/users/jelbourn/gists{/gist_id}","starred_url":"https://api.github.com/users/jelbourn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jelbourn/subscriptions","organizations_url":"https://api.github.com/users/jelbourn/orgs","repos_url":"https://api.github.com/users/jelbourn/repos","events_url":"https://api.github.com/users/jelbourn/events{/privacy}","received_events_url":"https://api.github.com/users/jelbourn/received_events","type":"User","site_admin":false},"assignees":[{"login":"jelbourn","id":838736,"node_id":"MDQ6VXNlcjgzODczNg==","avatar_url":"https://avatars3.githubusercontent.com/u/838736?v=4","gravatar_id":"","url":"https://api.github.com/users/jelbourn","html_url":"https://github.com/jelbourn","followers_url":"https://api.github.com/users/jelbourn/followers","following_url":"https://api.github.com/users/jelbourn/following{/other_user}","gists_url":"https://api.github.com/users/jelbourn/gists{/gist_id}","starred_url":"https://api.github.com/users/jelbourn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jelbourn/subscriptions","organizations_url":"https://api.github.com/users/jelbourn/orgs","repos_url":"https://api.github.com/users/jelbourn/repos","events_url":"https://api.github.com/users/jelbourn/events{/privacy}","received_events_url":"https://api.github.com/users/jelbourn/received_events","type":"User","site_admin":false}],"milestone":null,"comments":0,"created_at":"2018-08-22T18:31:00Z","updated_at":"2018-09-11T20:53:46Z","closed_at":null,"author_association":"NONE","body":"#### Bug, feature request, or proposal:\r\nBug\r\n\r\n#### What is the expected behavior?\r\nmat-chip should be the color (\"primary\", \"accent\", \"warn\")  set in the color directive\r\n\r\n#### What is the current behavior?\r\nmat-chip is the default color\r\n\r\n#### What are the steps to reproduce?\r\nProviding a StackBlitz reproduction is the *best* way to share your issue. <br/>\r\nEDIT: provided better steps to reproduce issue\r\n\r\n1. Start with the Autocomplete example from https://material.angular.io/components/chips/overview\r\nhttps://stackblitz.com/angular/rxlqaakgbdr?file=app%2Fchips-autocomplete-example.ts\r\n2. Open file app/chips-autocomplete-example.html\r\n3. Change line 4 from `[selectable]=\"selectable\"` to `selectable=\"true\"`\r\n4. Insert above line 4 `color=\"primary\"`\r\n5. Insert below line 4 `selected=\"true\"`\r\n\r\nStackBlitz of steps taken: https://stackblitz.com/edit/angular-sqfif2?file=app/chips-autocomplete-example.html\r\nThis demonstrates that the chip is not getting color applied.\r\n\r\nStackBiltz of formControl removed from `fruitInput`: https://angular-sqfif2-vmbpsj.stackblitz.io\r\nHere the chip is getting color applied. This demonstrates the issue is somehow related to the formControl.\r\n\r\n#### What is the use-case or motivation for changing an existing behavior?\r\nI would like to have chips that fall under certain criteria to have the \"warn\" color.\r\n\r\n#### Which versions of Angular, Material, OS, TypeScript, browsers are affected?\r\nChrome 67, Angular 6.1, Material 6.4.6, TypeScript 2.9.2, MacOs High Sierra\r\n\r\n#### Is there anything else we should know?\r\nIt looks like the issue is with the selected attribute. The chip isn't getting class mat-chip-selected"},"comment":{"url":"https://api.github.com/repos/angular/material2/issues/comments/420421831","html_url":"https://github.com/angular/material2/issues/12791#issuecomment-420421831","issue_url":"https://api.github.com/repos/angular/material2/issues/12791","id":420421831,"node_id":"MDEyOklzc3VlQ29tbWVudDQyMDQyMTgzMQ==","user":{"login":"jelbourn","id":838736,"node_id":"MDQ6VXNlcjgzODczNg==","avatar_url":"https://avatars3.githubusercontent.com/u/838736?v=4","gravatar_id":"","url":"https://api.github.com/users/jelbourn","html_url":"https://github.com/jelbourn","followers_url":"https://api.github.com/users/jelbourn/followers","following_url":"https://api.github.com/users/jelbourn/following{/other_user}","gists_url":"https://api.github.com/users/jelbourn/gists{/gist_id}","starred_url":"https://api.github.com/users/jelbourn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jelbourn/subscriptions","organizations_url":"https://api.github.com/users/jelbourn/orgs","repos_url":"https://api.github.com/users/jelbourn/repos","events_url":"https://api.github.com/users/jelbourn/events{/privacy}","received_events_url":"https://api.github.com/users/jelbourn/received_events","type":"User","site_admin":false},"created_at":"2018-09-11T20:53:46Z","updated_at":"2018-09-11T20:53:46Z","author_association":"MEMBER","body":"Currently the chips are only colored when they're marked as `selected`."}}
{"actor":{"display_login":"jelbourn"}}