Skip to content

Instantly share code, notes, and snippets.

@inooid
Created December 5, 2014 23:12
Show Gist options
  • Save inooid/2d9a9155d04f1621fe51 to your computer and use it in GitHub Desktop.
Save inooid/2d9a9155d04f1621fe51 to your computer and use it in GitHub Desktop.
"Error while processing route: portfolio_item params is not defined ReferenceError: params is not defined" ~~ Eventhough my URL is: http://localhost:3000/#/portfolio/1
App.Router.map ->
@resource 'portfolio_items', { path: '/' }
@resource 'portfolio_item', { path: '/portfolio/:portfolio_item_id' }
# PortfolioItems#index
App.PortfolioItemsRoute = Ember.Route.extend( model: ->
portfolioItems
)
App.PortfolioItemRoute = Ember.Route.extend( model: ->
portfolioItems.findBy "id", params.portfolio_item_id
)
portfolioItems = [
{
id: '1',
name: 'JustDrawCats',
desc: 'YouTuber & Twitch streamer',
thumb: 'assets/portfolio_items/justdrawcats_thumb.png'
},
{
id: '2',
name: 'NAM',
desc: 'Nederlandse Aardolie Maatschappij iPad-app',
thumb: 'assets/portfolio_items/nam_thumb.png'
},
{
id: '3',
name: 'Blossom',
desc: 'iPad- & Webapp for health care',
thumb: 'assets/portfolio_items/blossom_thumb.png'
},
{
id: '4',
name: 'WatVoorChips',
desc: 'HTML5 app for picking the right flavoured crisps',
thumb: 'assets/portfolio_items/watvoorchips_thumb.png'
},
{
id: '5',
name: 'Sinterklaas Lootjes',
desc: 'An easier system to share Dutch Sinterklaas lootjes',
thumb: 'assets/portfolio_items/sinterklaaslootjes_thumb.png'
},
{
id: '6',
name: 'Kerstmis Weken',
desc: 'An website to track the progress of JustDrawCats\' charity event',
thumb: 'assets/portfolio_items/kerstmisweken_thumb.png'
}
]
@inooid
Copy link
Author

inooid commented Dec 5, 2014

Fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment