{"action":"created","issue":{"url":"https://api.github.com/repos/teru00/crazy_todo/issues/3","repository_url":"https://api.github.com/repos/teru00/crazy_todo","labels_url":"https://api.github.com/repos/teru00/crazy_todo/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/teru00/crazy_todo/issues/3/comments","events_url":"https://api.github.com/repos/teru00/crazy_todo/issues/3/events","html_url":"https://github.com/teru00/crazy_todo/pull/3","id":182672605,"number":3,"title":"テキストボックスが空白のみの場合アイテムを登録しない処理を追加","user":{"login":"teru00","id":5705403,"avatar_url":"https://avatars.githubusercontent.com/u/5705403?v=3","gravatar_id":"","url":"https://api.github.com/users/teru00","html_url":"https://github.com/teru00","followers_url":"https://api.github.com/users/teru00/followers","following_url":"https://api.github.com/users/teru00/following{/other_user}","gists_url":"https://api.github.com/users/teru00/gists{/gist_id}","starred_url":"https://api.github.com/users/teru00/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/teru00/subscriptions","organizations_url":"https://api.github.com/users/teru00/orgs","repos_url":"https://api.github.com/users/teru00/repos","events_url":"https://api.github.com/users/teru00/events{/privacy}","received_events_url":"https://api.github.com/users/teru00/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-10-13T01:23:11Z","updated_at":"2016-10-13T02:49:11Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/teru00/crazy_todo/pulls/3","html_url":"https://github.com/teru00/crazy_todo/pull/3","diff_url":"https://github.com/teru00/crazy_todo/pull/3.diff","patch_url":"https://github.com/teru00/crazy_todo/pull/3.patch"},"body":"まずはじめに、\r\n`addTodo()`が呼び出された時に、if文で`todoDescription`が空白でないかを判断する\r\n\r\n```\r\nif ($scope.todoDescription != '')\r\n```\r\n結果を見てみると、スペースのみだとアイテム登録はできなくなっているが、何も入力していない状態、つまり’'だとアイテム登録ができてしまう。\r\n\r\n```\r\nconsole.log($scope.todoDescription)\r\n```\r\nを使って、フォームに`''`を入力したときの`todoDesctiption`の中身を確認する。`undedified`が代入されていた。\r\n\r\njavascriptにおいて`undedified != ''`である。\r\njavascriptにおいて`undefined`も`''`も値の評価は`false`なので、\r\n\r\n```\r\nif ($scope.todoDescription)\r\n```\r\nとするとうまくいく。"},"comment":{"url":"https://api.github.com/repos/teru00/crazy_todo/issues/comments/253399560","html_url":"https://github.com/teru00/crazy_todo/pull/3#issuecomment-253399560","issue_url":"https://api.github.com/repos/teru00/crazy_todo/issues/3","id":253399560,"user":{"login":"kazuyukikato","id":17155115,"avatar_url":"https://avatars.githubusercontent.com/u/17155115?v=3","gravatar_id":"","url":"https://api.github.com/users/kazuyukikato","html_url":"https://github.com/kazuyukikato","followers_url":"https://api.github.com/users/kazuyukikato/followers","following_url":"https://api.github.com/users/kazuyukikato/following{/other_user}","gists_url":"https://api.github.com/users/kazuyukikato/gists{/gist_id}","starred_url":"https://api.github.com/users/kazuyukikato/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kazuyukikato/subscriptions","organizations_url":"https://api.github.com/users/kazuyukikato/orgs","repos_url":"https://api.github.com/users/kazuyukikato/repos","events_url":"https://api.github.com/users/kazuyukikato/events{/privacy}","received_events_url":"https://api.github.com/users/kazuyukikato/received_events","type":"User","site_admin":false},"created_at":"2016-10-13T02:49:11Z","updated_at":"2016-10-13T02:49:11Z","body":"required Validator と pattern validator を両方使う戦略を考えてみましょう。 "}}
{"actor":{"display_login":"kazuyukikato"}}