This file contains hidden or 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({ | |
appName: 'Ember Twiddle', | |
valueList: [1, 2, 3, 4], | |
updateVal(index, newValue) { | |
this.set('valueList', this.valueList.map((oldValue, i) => index === i ? newValue : oldValue)); | |
} | |
}); |
This file contains hidden or 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 { liveQuery } from '@cardstack/live-models'; | |
import Component from '@ember/component'; | |
export default Component.extend({ | |
// liveQuery is implemented as a computed property. It doesn't do | |
// anything until somebody tries to get `comments`. | |
// | |
// When it does run, it does a store.query(...), while also | |
// subscribing to a socket-based change feed that will casue it to | |
// keep the models up-to-date as they change or as the set itself |
This file contains hidden or 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
0x1E65F71b024937b988fdba09814d60049e0Fc59d |
This file contains hidden or 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
{ | |
"id": "5ba0f46c-3604-4c4b-39b5-1e4e2272a0a2", | |
"name": "Cardstack Development", | |
"values": [ | |
{ | |
"enabled": true, | |
"key": "hub", | |
"value": "http://localhost:4200/cardstack", | |
"type": "text" | |
}, |
This file contains hidden or 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.Component.extend({ | |
items: Ember.computed('value', function() { | |
return [this.get('value')]; | |
}) | |
}); |
This file contains hidden or 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'; | |
import config from './config/environment'; | |
const Router = Ember.Router.extend({ | |
location: 'none', | |
rootURL: config.rootURL | |
}); | |
Router.map(function() { | |
this.route('outside', { path: '/' }, function() { |
This file contains hidden or 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
deploy: | |
- provider: script | |
skip_cleanup: true | |
script: node_modules/.bin/ember deploy development --activate --verbose | |
on: | |
branch: master | |
- provider: script | |
skip_cleanup: true | |
script: node_modules/.bin/ember deploy staging --activate --verbose | |
on: |
This file contains hidden or 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({ | |
appName: 'Ember Twiddle', | |
state: 'one', | |
actions: { | |
changeState: function(val){ | |
this.set('state', val); |
This file contains hidden or 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
/*jshint node:true*/ | |
/* global require, module */ | |
var EmberApp = require('ember-cli/lib/broccoli/ember-app'); | |
var MergeTrees = require('broccoli-merge-trees'); | |
var Funnel = require('broccoli-funnel'); | |
module.exports = function(defaults) { | |
var app = new EmberApp(defaults, { | |
}); | |
var appTree = app.toTree(); |
This file contains hidden or 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({ | |
foo: 'bar', | |
actions: { | |
toggleIsOpen() { | |
this.toggleProperty('isOpen'); | |
} |