UNPKG

empress-blog

Version:

Fully-functional, SEO friendly static site implementation of a blog system built on Ember.

24 lines (19 loc) 501 B
/* eslint-disable ember/no-classic-classes, prettier/prettier */ import Route from '@ember/routing/route'; import { inject as service } from '@ember/service'; export default Route.extend({ queryParams: { page: { refreshModel: true } }, classNames: ["index-template", "home-template"], store: service(), blog: service(), model(params) { if(this.blog.paginate) { return this.store.query('content', params); } return this.store.findAll('content'); } });