Note that there are some explanatory texts on larger screens.

plurals
  1. POController need not met
    primarykey
    data
    text
    <p>I have the following routes setup:</p> <pre><code>this.resource('password_reset', { path: '/password_reset' }, function() { this.route("request"); // request a password reset this.route("sent"); // instruct user that email has been sent this.route("claim"); // receive nonce link from email to claim the reset }); </code></pre> <p>And when a user requests a reset they are asked to put in their username or email address to identify themselves:</p> <p><img src="https://i.stack.imgur.com/p4cK2.png" alt="request"></p> <p>When the user pressed the "request reset" button we are transitioned to the "password_reset.sent" route where the user is instructed about the email that has been sent.</p> <p><img src="https://i.stack.imgur.com/7cEST.png" alt="enter image description here"></p> <p>As a convenience function they are given a button which can resend the email. In order for this to happen I need the <code>username</code> property from the controller for the <code>password_reset.request</code> route. I figured I'd use the 'need' property to get this working:</p> <pre><code>App.PasswordResetSentController = Ember.ObjectController.extend({ needs:'password_reset.request', usernameBinding: "controllers.password_reset.request.username", username: null, </code></pre> <p>Now I don't get any errors from this but it doesn't seem to work either. The debugger shows the state of the PasswordResetSentController to be:</p> <p><img src="https://i.stack.imgur.com/Xvtv5.png" alt="debug info"></p> <p>There's a lot I don't understand here. Nearest and dearest to my heart is of course the <code>username</code> which remains in it's initialised state of <em>null</em>. Beyond that, why are all the properties in the two <code>App.PasswordResetSentController</code> grouping boxes crossed out? Also why are there two of these boxes both for <code>App.PasswordResetSentController</code>? </p> <p>I looked at the "controllers" and "usernameBinding" properties with the hope that I'd find my way around in there but they didn't help me shed any light on it. For those who's ember flame burns a little brighter, here's the binding object:</p> <p><img src="https://i.stack.imgur.com/A4XgT.png" alt="enter image description here"></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload