ember-tribe 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/blueprints/ember-tribe/files/app/models/types-json.js +4 -0
- package/blueprints/ember-tribe/files/app/routes/index.js +14 -0
- package/blueprints/ember-tribe/files/app/serializers/application.js +7 -1
- package/blueprints/ember-tribe/files/app/templates/index.hbs +13 -0
- package/package.json +1 -1
- package/blueprints/ember-tribe/files/app/components/footer.hbs +0 -0
- package/blueprints/ember-tribe/files/app/components/header.hbs +0 -0
- package/blueprints/ember-tribe/files/app/routes/application.js +0 -10
- package/blueprints/ember-tribe/files/app/templates/application.hbs +0 -7
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import Route from '@ember/routing/route';
|
|
2
|
+
import { service } from '@ember/service';
|
|
3
|
+
|
|
4
|
+
export default class IndexRoute extends Route {
|
|
5
|
+
@service store;
|
|
6
|
+
|
|
7
|
+
async model() {
|
|
8
|
+
//findRecord for type+slug pair and findAll all objects in a type
|
|
9
|
+
return await this.store.findRecord('types_json', 'webapp');
|
|
10
|
+
|
|
11
|
+
//this.store.findAll('film');
|
|
12
|
+
//this.store.query('film', {page: {limit: 2, offset: 0}});
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -1,8 +1,14 @@
|
|
|
1
|
-
import { underscore } from '@ember/string';
|
|
2
1
|
import JSONAPISerializer from '@ember-data/serializer/json-api';
|
|
2
|
+
import { underscore } from '@ember/string';
|
|
3
3
|
|
|
4
4
|
export default class ApplicationSerializer extends JSONAPISerializer {
|
|
5
|
+
|
|
5
6
|
keyForAttribute(attr) {
|
|
6
7
|
return underscore(attr);
|
|
7
8
|
}
|
|
9
|
+
|
|
10
|
+
payloadKeyFromModelName(key) {
|
|
11
|
+
return key;
|
|
12
|
+
}
|
|
13
|
+
|
|
8
14
|
}
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{{page-title "<%= classifiedPackageName %>"}}
|
|
2
|
-
|
|
3
|
-
<Header />
|
|
4
|
-
<main><h1 class="my-5 text-uppercase text-center"><%= classifiedPackageName %></h1><h1 class="my-5 text-uppercase text-center">{{@model.schema.webapp.headmeta_title}}</h1></main>
|
|
5
|
-
<Footer />
|
|
6
|
-
|
|
7
|
-
{{outlet}}
|