Last active
March 5, 2017 20:43
-
-
Save marcuswoy/86fecfee168ec4c2187100946485038e to your computer and use it in GitHub Desktop.
Navigation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import DS from 'ember-data'; | |
export default DS.JSONAPIAdapter.extend({ | |
namespace: 'api' | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
width:0, | |
height:0, | |
names: ['Stefan', 'Miguel', 'Tomster', 'Pluto'], | |
actions: { | |
foo() { } | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
export default Ember.TextField.extend({ | |
attributeBindings:['style'], | |
focusIn() { | |
"use strict"; | |
this.$().select(); | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default { | |
test:"Hallo" | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Mirage from 'ember-cli-mirage'; | |
export default function() { | |
this.namespace = "api"; | |
this.get("/ads"); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Factory, faker } from 'ember-cli-mirage'; | |
export default Factory.extend({ | |
id(i) { return i;}, | |
name() {return faker.name.firstName();}, | |
width() {return faker.random.number({'min':500, 'max':1000});} , | |
isCustom: false | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Factory, faker } from 'ember-cli-mirage'; | |
export default Factory.extend({ | |
id(i) { return i;}, | |
name() {return faker.name.firstName();}, | |
width() {return faker.random.number({'min':500, 'max':1000});} , | |
isCustom: false | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Model } from 'ember-cli-mirage'; | |
export default Model.extend({ | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Model } from 'ember-cli-mirage'; | |
export default Model.extend({ | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default function(server) { | |
server.createList('ads', 3); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { JSONAPISerializer } from 'ember-cli-mirage'; | |
export default JSONAPISerializer.extend({ | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Model from "ember-data/model"; | |
import attr from "ember-data/attr"; | |
import { belongsTo, hasMany } from "ember-data/relationships"; | |
import DS from 'ember-data'; | |
export default Model.extend({ | |
name: DS.attr('string'), | |
width: DS.attr('string'), | |
isCustom:DS.attr('boolean') | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import DS from 'ember-data'; | |
export default Model.extend({ | |
name: DS.attr('string'), | |
width: DS.attr('string'), | |
isCustom:DS.attr('boolean') | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
export default Ember.Route.extend({ | |
model() { | |
return this.store.findAll("ad"); | |
} | |
}); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version": "0.11.1", | |
"EmberENV": { | |
"FEATURES": {} | |
}, | |
"ENV": { | |
"ember-cli-mirage": { | |
"enabled": true | |
}, | |
"namespace":"api", | |
"rootURL": "/", | |
"locationType":"auto" | |
}, | |
"options": { | |
"use_pods": true, | |
"enable-testing": false | |
}, | |
"dependencies": { | |
"bootstrapCss": "https://adwords.woytec.de/mdb/css/bootstrap.min.css", | |
"mdbCss": "https://adwords.woytec.de/mdb/css/mdb.min.css", | |
"jquery": "https://adwords.woytec.de/mdb/js/jquery-3.1.1.min.js", | |
"tether": "https://adwords.woytec.de/mdb/js/tether.min.js", | |
"bootstrapJs": "https://adwords.woytec.de/mdb/js/bootstrap.min.js", | |
"mdbJs": "https://adwords.woytec.de/mdb/js/mdb.min.js", | |
"ember": "2.10.2", | |
"ember-data": "2.11.0", | |
"ember-template-compiler": "2.10.2", | |
"ember-testing": "2.10.2" | |
}, | |
"addons": { | |
"ember-power-select": "*", | |
"ember-cli-mirage": "*" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment