title: How can i change the attribute of a field in Ember JS from a route
body: <p>In My application i have a template file with 2 fields(say name1 / name2).
  Based on one parameter("preference") in the route i want to display either Recipe1 or Recipe2 on the screen.
  For eg: if preference is veg, i should display Recipe1 else Recipe2.
  i tried this as below but it did not work.</p>
  
  <pre><code> export default Ember.Route.extend({
   beforeModel(){
   if (preference==='veg'){
       console.log("Inside Veg..");
       Ember.$("#Recipe2").attr("type","hidden");
   }
   else {
       console.log("Inside Non Veg..");
       Ember.$("#Recipe1").attr("type","hidden");
   }
  </code></pre>
  
  <p>What i see is that it goes inside the if/else loop but the ember.$ statements dont make any difference.Please help.</p>