{"action":"created","issue":{"url":"https://api.github.com/repos/angular/angular/issues/22120","repository_url":"https://api.github.com/repos/angular/angular","labels_url":"https://api.github.com/repos/angular/angular/issues/22120/labels{/name}","comments_url":"https://api.github.com/repos/angular/angular/issues/22120/comments","events_url":"https://api.github.com/repos/angular/angular/issues/22120/events","html_url":"https://github.com/angular/angular/issues/22120","id":295874607,"number":22120,"title":"Tutorial example has a problem to enter new item into an empty list","user":{"login":"FumioNonaka","id":3897750,"avatar_url":"https://avatars1.githubusercontent.com/u/3897750?v=4","gravatar_id":"","url":"https://api.github.com/users/FumioNonaka","html_url":"https://github.com/FumioNonaka","followers_url":"https://api.github.com/users/FumioNonaka/followers","following_url":"https://api.github.com/users/FumioNonaka/following{/other_user}","gists_url":"https://api.github.com/users/FumioNonaka/gists{/gist_id}","starred_url":"https://api.github.com/users/FumioNonaka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FumioNonaka/subscriptions","organizations_url":"https://api.github.com/users/FumioNonaka/orgs","repos_url":"https://api.github.com/users/FumioNonaka/repos","events_url":"https://api.github.com/users/FumioNonaka/events{/privacy}","received_events_url":"https://api.github.com/users/FumioNonaka/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-02-09T13:41:11Z","updated_at":"2018-02-10T19:28:04Z","closed_at":null,"author_association":"NONE","body":"<!--\r\nPLEASE HELP US PROCESS GITHUB ISSUES FASTER BY PROVIDING THE FOLLOWING INFORMATION.\r\n\r\nISSUES MISSING IMPORTANT INFORMATION MAY BE CLOSED WITHOUT INVESTIGATION.\r\n-->\r\n\r\n## I'm submitting a...\r\n<!-- Check one of the following options with \"x\" -->\r\n<pre><code>\r\n[x] Documentation issue or request\r\n</code></pre>\r\n\r\n## Current behavior\r\n<!-- Describe how the issue manifests. -->\r\n\"[Angular Example - Tour of Heroes: Part 6](https://angular.io/generated/live-examples/toh-pt6/stackblitz.html)\" in the tutorial of Angular 5 has a problem to enter an item into the heroines.component.\r\n\r\n1. Delete all items from the list of the heroines.component.\r\n2. Enter new item in the text field and press the [add] button.\r\n\r\nThen listed item has neither id nor name.  Browser console indicates the error message like below:\r\n\r\n> `body: {error: \"Collection 'heroes' id type is non-numeric or unknown. Can only generate numeric ids.\"}`\r\n\r\n## Expected behavior\r\n<!-- Describe what the desired behavior would be. -->\r\nNew item can be entered even if the list is empty.  I recommend to revise the code as \"[Angular 5 Example - To be able to enter new item to empty list](https://qiita.com/FumioNonaka/items/3594a7d4a033f88522f7)\" shows.\r\n\r\n## Minimal reproduction of the problem with instructions\r\n<!--\r\nFor bug reports please provide the *STEPS TO REPRODUCE* and if possible a *MINIMAL DEMO* of the problem via\r\nhttps://plnkr.co or similar (you can use this template as a starting point: http://plnkr.co/edit/tpl:AvJOMERrnz94ekVua0u5).\r\n-->\r\nSee the \"Current behavior\" above.\r\n\r\n## What is the motivation / use case for changing the behavior?\r\n<!-- Describe the motivation or the concrete use case. -->\r\nConfused when learning the tutorial sample.\r\n\r\n## Environment\r\n\r\n<pre><code>\r\nAngular version: 5.2.4\r\n<!-- Check whether this is still an issue in the most recent Angular version -->\r\n\r\nBrowser:\r\n- [x] Chrome (desktop) version 64.0.3282.140\r\n- [x] Firefox version 58.0.1\r\n- [x] Safari (desktop) version 11.0.3\r\n \r\nFor Tooling issues:\r\n- Platform: macOS Sierra 10.12.6\r\n</code></pre>"},"comment":{"url":"https://api.github.com/repos/angular/angular/issues/comments/364682689","html_url":"https://github.com/angular/angular/issues/22120#issuecomment-364682689","issue_url":"https://api.github.com/repos/angular/angular/issues/22120","id":364682689,"user":{"login":"FumioNonaka","id":3897750,"avatar_url":"https://avatars1.githubusercontent.com/u/3897750?v=4","gravatar_id":"","url":"https://api.github.com/users/FumioNonaka","html_url":"https://github.com/FumioNonaka","followers_url":"https://api.github.com/users/FumioNonaka/followers","following_url":"https://api.github.com/users/FumioNonaka/following{/other_user}","gists_url":"https://api.github.com/users/FumioNonaka/gists{/gist_id}","starred_url":"https://api.github.com/users/FumioNonaka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FumioNonaka/subscriptions","organizations_url":"https://api.github.com/users/FumioNonaka/orgs","repos_url":"https://api.github.com/users/FumioNonaka/repos","events_url":"https://api.github.com/users/FumioNonaka/events{/privacy}","received_events_url":"https://api.github.com/users/FumioNonaka/received_events","type":"User","site_admin":false},"created_at":"2018-02-10T19:28:04Z","updated_at":"2018-02-10T19:28:04Z","author_association":"NONE","body":"Thank you for your suggestion.  I appended the solution to [my article](https://qiita.com/FumioNonaka/items/3594a7d4a033f88522f7#overriding-a-method-of-angular-in-memory-web-api-module)."}}
{"actor":{"display_login":"FumioNonaka"}}