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 makeTagString from 'my-app/utils/make-tag-string'; | |
import { module, test } from 'qunit'; | |
module('Unit | Utility | make tag string'); | |
test('it works with single tag object', function(assert) { | |
let tag = { type: 'tag', name: 'root', value: "The Root" }; | |
let result = makeTagString(tag); | |
let expected = '<root>The Root</root>'; |
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
/* | |
my-redux-store-instance | |
A model to give us some redux store like behavior | |
Note that typically the state object comes from a reducer | |
The responsibility of this model is to give us something we can | |
store our state history when using the redux pattern | |
Also this model contains some helper functions to build stuff like redux actions | |
*/ |
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'; | |
import RSVP from 'rsvp'; | |
const { set, get } = Ember; | |
export default Ember.Route.extend({ | |
model(params) { | |
let store = get(this, 'store'); | |
let groupCollection = store.query('groupCollection', { |
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.Component.extend({ | |
tagName: 'button' | |
}); |
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
/Applications/Atom.app/Contents/MacOS/Atom -n $@ |
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({ | |
appName:'Ember Twiddle' | |
}); |
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({ | |
appName:'Ember Twiddle 2' | |
}); |
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 MyService from 'app-name/services/my-service'; | |
export default { | |
name: 'MyServiceInitializer', | |
initialize: function(container, application) { | |
container.register('my-service:service', MyServiceInitializer, { singleton: true }); | |
// inject onto routes, controllers, etc | |
} | |
}; |
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
// A service object for managing access to static data. | |
// How to inject this service | |
// staticData: Ember.inject.service('static-data'), | |
import Ember from 'ember'; | |
export default Ember.Service.extend({ | |
// Setup the service with some data the first time it loads |
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
// my-addon/addon/components/foo-base.js | |
import Ember from 'ember'; | |
import layout from '../templates/components/foo-base'; | |
export default Ember.Component.extend({ | |
layout: layout | |
}); | |
// my-addon/addon/templates/components/foo-base.hbs | |
<div class="well well-sm"> |
NewerOlder