{"id":1405,"date":"2022-08-30T15:16:15","date_gmt":"2022-08-30T15:16:15","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2013\/11\/15\/bootstrap-carousel-in-an-ember-app-collection-of-common-programming-errors\/"},"modified":"2022-08-30T15:16:15","modified_gmt":"2022-08-30T15:16:15","slug":"bootstrap-carousel-in-an-ember-app-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2022\/08\/30\/bootstrap-carousel-in-an-ember-app-collection-of-common-programming-errors\/","title":{"rendered":"Bootstrap carousel in an Ember app-Collection of common programming errors"},"content":{"rendered":"<p>I&#8217;m a bit new to ember. I have my app basically setup the way I want it, but now I need to add a carousel to the page. I add the following sample (taken from bootstrap&#8217;s example) to my template:<\/p>\n<pre><code>\n    <\/code><\/pre>\n<ol class=\"carousel-indicators\"><\/ol>\n<pre>\n    \n    \n        A\n        B\n        C\n    \n    \n    \u2039\n    \u203a\n\n\n<\/pre>\n<p><code>When I then click on the next or previous buttons, I get the following Error in my log:<\/code><\/p>\n<pre><code><code>Uncaught Error: No route matched the URL 'myCarousel' ember-1.0.0-rc.2.js:22641\nRouter.handleURL ember-1.0.0-rc.2.js:22641\nEmber.Router.Ember.Object.extend.handleURL ember-1.0.0-rc.2.js:23409\n(anonymous function) ember-1.0.0-rc.2.js:23385\n(anonymous function) ember-1.0.0-rc.2.js:25142\n(anonymous function) ember-1.0.0-rc.2.js:4360\nEmber.handleErrors ember-1.0.0-rc.2.js:411\ninvoke ember-1.0.0-rc.2.js:4358\ntryable ember-1.0.0-rc.2.js:4547\nEmber.tryFinally ember-1.0.0-rc.2.js:1102\nEmber.run ember-1.0.0-rc.2.js:4551\n(anonymous function) ember-1.0.0-rc.2.js:25136\njQuery.event.dispatch jquery-1.9.1.js:3074\nelemData.handle\n<\/code><\/code><\/pre>\n<p>Is there something special I need to do to tell ember to make this work?<\/p>\n<ol>\n<li>\n<p>it looks like a missing route to your &#8216;myCarousel&#8217; &#8211; template.<\/p>\n<p><strong>Update<\/strong><\/p>\n<p><em>TEMPLATES<\/em><\/p>\n<pre><code>\n    {{outlet}}\n\n\n    myCarousel\n    \n    <\/code><\/pre>\n<ol class=\"carousel-indicators\"><\/ol>\n<pre>\n    \n    \n        A\n        B\n        C\n    \n    \n    \u2039\n    \u203a\n\n\n\n<\/pre>\n<p><code><em>JS<\/em><\/code><\/p>\n<pre><code><code>App = Ember.Application.create({});\n\nApp.IndexRoute = Ember.Route.extend({\n    redirect: function(){\n        this.transitionTo('myCarousel')\n    }\n});\n\nApp.Router.map( function() {\n    this.resource('myCarousel');\n});\n<\/code><\/code><\/pre>\n<p>JSFiddle: http:\/\/jsfiddle.net\/theremin\/C3U5R\/<\/p>\n<\/li>\n<\/ol>\n<p id=\"rop\"><small>Originally posted 2013-11-15 09:09:39. <\/small><\/p>","protected":false},"excerpt":{"rendered":"<p>I&#8217;m a bit new to ember. I have my app basically setup the way I want it, but now I need to add a carousel to the page. I add the following sample (taken from bootstrap&#8217;s example) to my template: A B C \u2039 \u203a When I then click on the next or previous buttons, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1405","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/1405","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=1405"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/1405\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=1405"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=1405"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=1405"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}