Skip to content

Instantly share code, notes, and snippets.

View miguelcobain's full-sized avatar

Miguel Andrade miguelcobain

View GitHub Profile
import Ember from 'ember';
export default Ember.Component.extend({
positionalParams: 'params'
});
import Ember from 'ember';
export default Ember.Controller.extend({
appName:'Ember Twiddle'
});
@miguelcobain
miguelcobain / alert-box-button.component.js
Last active December 18, 2015 16:27 — forked from avaz/alert-box-button.template.hbs
ContextualComponentsTriggerAction
import Ember from 'ember';
export default Ember.Component.extend({
click() {
this.get('close-button')();
}
});
@miguelcobain
miguelcobain / application.controller.js
Created January 19, 2016 17:31 — forked from barneycarroll/application.controller.js
Computed property lifecycle
import Ember from 'ember';
export default Ember.Controller.extend({
appName:'Ember Twiddle'
});
import Ember from 'ember';
var categories = [
{
id: 1,
title: 'category 1'
}, {
id: 2,
title: 'category 2'
}, {
import Ember from 'ember';
let Animal = Ember.Object.extend({
bark() {
alert('super bark!');
return 'aurf!';
}
});
export default Ember.Controller.extend({
import Ember from 'ember';
const { Controller, run } = Ember;
export default Controller.extend({
appName: 'Ember Twiddle',
tempValue: '',
actions: {
changeValue(event) {
// prevent default behavior
event.preventDefault();
import Ember from 'ember';
const { Component } = Ember;
export default Component.extend({
tagName: 'input',
didRender() {
if (this.get('value')) {
this.element.value = this.get('value');
}
},
import Ember from 'ember';
export default Ember.Component.extend({
tagName: ''
});
import Ember from 'ember';
const { Controller } = Ember;
export default Controller.extend({
lat: 45.528178,
lng: -122.670059,
zoom: 14,
restaurants: Ember.A([
{