Skip to content

Instantly share code, notes, and snippets.

View velrest's full-sized avatar
:shipit:
.

Jonas Cosandey velrest

:shipit:
.
View GitHub Profile
@velrest
velrest / router.js
Last active February 20, 2018 14:58
New Twiddle
import Ember from 'ember';
import config from './config/environment';
const Router = Ember.Router.extend({
location: 'none',
rootURL: config.rootURL
});
Router.map(function() {
this.route('home', {path: '/'}, function(){
@velrest
velrest / controllers.application.js
Created March 1, 2018 14:50 — forked from samselikoff/mirage.config.js
Mirage dev boilerplate
import Ember from 'ember';
export default Ember.Controller.extend({
});
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
init() {
this._super(...arguments)
this.set('headers', [{
type: 'test',
title: 'blublibla',
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
import Ember from 'ember';
export default Ember.Component.extend({
actions: {
open(){
//do stuff
let image = 'yay image'
this.select(image)
}
}
import Ember from 'ember';
export default Ember.Component.extend({
actions: {
open(){
//do stuff
let image = 'yay image'
this.get('childManager').select(image)
}
}
import Ember from 'ember';
export default Ember.Component.extend({
a : 'test',
didRender(){
let set = this.set
new Promise(function(resolve, reject) {
setTimeout(set, 1000, 'a', 'foo');
});
},
@velrest
velrest / controllers.application.js
Last active September 19, 2018 13:50
New Twiddle
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
import Ember from 'ember';
import (inject as service) from '@ember/service'
export default Ember.Controller.extend({
router: service(),
appName: 'Ember Twiddle',
init(){
this._super(...arguments)
console.log(ENV)
}