Want to use multiple models, controllers and views in same page in EmberJS? Use the below example to use multiple models, controllers and views.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | <script type="text/x-handlebars" data-template-name="application"> {{partial 'navbar'}} {{outlet}} {{partial 'footer'}} </script> <script type="text/x-handlebars" data-template-name="_navbar"> <div class="navbar navbar-inverse"> <div class="navbar-inner"> {{#linkTo "app" class="brand"}}{{unbound App.app_title}}{{/linkTo}} <ul class="nav"> <li class="divider-vertical"> {{#linkTo "app"}}Home{{/linkTo}} </li> <li class="divider-vertical"> {{#linkTo "products"}}Products{{/linkTo}} </li> </ul> </div> </div> </script> <script type="text/x-handlebars" data-template-name="_footer"> <div class="row"> <div class="span12"> © 2013:1.0-pre4 - {{unbound App.contact}} </div> </div> </script> <script type="text/x-handlebars" data-template-name="app"> <h2>Home</h2> <p>Bacon ipsum dolor sit amet tenderloin short ribs short loin meatball sausage chicken pastrami. Hamburger sausage tri-tip, bacon spare ribs bresaola short ribs chuck frankfurter shoulder. Fatback pork belly turducken, ham drumstick salami hamburger pork sausage. Jowl corned beef andouille shank boudin. Shankle salami corned beef, pastrami leberkas turducken venison shoulder fatback jowl ball tip ground round biltong andouille boudin.</p> <p>Biltong boudin turkey rump shankle ball tip, strip steak drumstick spare ribs. Cow short ribs leberkas swine sirloin shank drumstick rump hamburger frankfurter ham hock. Bresaola turkey bacon prosciutto salami jowl pancetta meatloaf ground round ball tip filet mignon kielbasa tongue chuck strip steak. T-bone leberkas beef ribs kielbasa shankle pork chop spare ribs chuck strip steak shoulder frankfurter turducken. Pork loin ham cow chicken boudin venison. Filet mignon cow jowl pig ball tip, meatball boudin leberkas ham short loin drumstick tenderloin venison chicken. Chuck beef filet mignon capicola shankle, fatback flank ham hock corned beef meatloaf short ribs bacon.</p> </script> |
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.