title: Passing values from login form to dashboard
body: <p>What would be the best way to retrieve the Username entered on a login form in dart polymer to be read in the next page to which it is redirected?</p>
  
  <p>The login component is as below - </p>
  
  
  
  <pre class="lang-dart prettyprint-override"><code>@CustomTag('alfresco-login-form')
  class LoginFormComponent extends FormElement with Polymer, Observable {
    LoginFormComponent.created() : super.created();
  
    @observable String username = "";
    @observable String password = "";
  
    @observable Map loginData = toObservable({
      'username' : '',
      'password' : ''
    });
  
  
    @observable String serverResponse = '';
    HttpRequest request;
  
    void submitForm(Event e, var detail, Node target) {
      e.preventDefault(); // Don't do the default submit.
  
      request = new HttpRequest();
  
      request.onReadyStateChange.listen(onData); 
  
      // POST the data to the server.
      var url = 'http://127.0.0.1/alfresco/service/api/login';
  
      request.open("POST", url);
      request.send(_loginDataAsJsonData());
    }
  
    void onData(_) {
      if (request.readyState == HttpRequest.DONE &amp;&amp;
          request.status == 200) {
        // Data saved OK.
        serverResponse = 'Server Sez: ' + request.responseText;
  
        Map parsedMap = JSON.decode(request.responseText);
  
        var currentTicket = new Ticket(parsedMap["data"]["ticket"]);
  
        //keeps the back history button active
        //window.location.assign('dashboard.html');
  
        //doesn't keep the back history button active
        //doesn't put the originating page in the session history
        window.location.replace('dashboard.html');
      } else if (request.readyState == HttpRequest.DONE &amp;&amp;
          request.status == 0) {
        // Status is 0...most likely the server isn't running.
        serverResponse = 'No server';
      }
    }
    String _loginDataAsJsonData(){
      return JSON.encode(loginData);
    }
  }
  </code></pre>
  
  <p>I need to have access to that loginData['username'] &amp; parsedMap["data"]["ticket"] to be available in the page dashboard.html.</p>