Using third party framework, I want set selected value.
Is there is any hook after view inserted into DOM in ember.js new router?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Agreed with Karl above. However, maybe you’ve just asked the question in a bad way. In the new router, you have the
setupController, which is invoked when Ember moves into that route. So for example, if you move into/#/dashboard, thenDashboardController,DashboardView,DashboardRoutewill all be initialised.Aside from the fact that you could use the
didInsertElementon theDashboardViewat this point, you have thesetupControllermethod which you can overwrite in theDashboardRoute. In here you can set-up the controller, and perhaps do whatever it is you’re trying to do:(The
setupControllerwill only be invoked when you enter the route, but the view won’t have rendered by the time you’re moving into it. For that you’ll needdidInsertElementand that’s that.setupControlleris for setting up the controller, which can be thought of as an ever-persistent singleton.)