title: How to open to a specific state when receiving a notification from Ionic push?
body: <p>I successfully set up a push notification with Ionic and ios. But I want people to click the notification and go to a dynamically pass in state. And I can not figure out how to do it...
  I am using a node server. First, my state step up is below: </p>
  
  <pre><code>.state('app.task', {
  url: "/task/:taskId",
  cache: false,
  views: {
    'menuContent': {
      templateUrl: "js/tasks/task-detail.html",
      controller: "browseCtrl",
    }
  },
  }
  })
  </code></pre>
  
  <p>And in my node server, I pass in the payload as describe here: <a href="http://docs.ionic.io/docs/push-faq" rel="nofollow">Ionic.io Push FAQ</a></p>
  
  <pre><code>var payload = {"$state":"app.task", "$stateParams": "{\"taskId\": \""+ message.relatedTask +"\"}"};
  request({
      url: "https://push.ionic.io/api/v1/push",
      method: "POST",
      json: true,
      body: {
        "tokens": [token],
        "notification": {
          "alert": message.message,
          "ios": {
            "badge":1,
            "payload": payload
          },
          "android": {
            "payload": payload
          }
        }
      },
      headers: {
        'Authorization': 'Basic ' + btoa(IONIC_PRIVATE_API_KEY + ":"),
        'X-Ionic-Application-Id': IONIC_APP_ID
      }
    }, function (error, response, body) {
      console.log(body);
    })
  </code></pre>
  
  <p>And when it click the notification, it won't go to the state (just bring me back to the app). The <code>message.relatedTask</code> is logged as the current taskId. As I can see from XCode console, it logs this:</p>
  
  <blockquote>
  <pre><code>2015-09-30 18:12:16.488 VideoHappy[1236:403171] Msg: {"$state":"app.task","$stateParams":"{\"taskId\": \"-JzvWR67jIqyfc9JhDMb\"}","$state":"app.task","$stateParams":"{\"taskId\": \"-JzvWR67jIqyfc9JhDMb\"}","badge":"1","body":"Test Title",foreground:"0"}
  </code></pre>
    
    <p>2015-09-30 18:12:16.600 VideoHappy[1236:403171] $ionicPush:RECEIVED {"$state":"app.task","$stateParams":"{\"taskId\": \"-JzvWR67jIqyfc9JhDMb\"}","badge":"1","body":"Test Title","foreground":"0"}</p>
  </blockquote>
  
  <p>What did I do wrong?</p>