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({ | |
title: 'Ember Twiddle' | |
}); |
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({ | |
title: 'Ember Twiddle', | |
}); |
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'; | |
const get = Ember.get; | |
const { guidFor } = Ember; | |
function updateTitle(tokens) { | |
document.title = tokens.toString(); | |
} | |
export default Ember.Helper.extend({ |
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"; | |
const AUTO_EMAIL_RE = /([\w.!#\$%+-]+@[\w-]+(?:\.[\w-]+)+)/; | |
const AUTO_LINK_CRE = [/<[^>]+$/, /^[^>]*>/]; | |
const AUTO_LINK_RE = /(?:((?:ed2k|ftp|http|https|irc|mailto|news|gopher|nntp|telnet|webcal|xmpp|callto|feed|svn|urn|aim|rsync|tag|ssh|sftp|rtsp|afs|file):)\/\/|(www\.))([^\s<]+)/; | |
var autoLink = function (text, context) { | |
var buffer = []; | |
if (context.autoLink) { |
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"; | |
const get = Ember.get; | |
const Stream = Ember.stream.Stream; | |
export default function featureFlags(params) { | |
let features = this.container.lookup('app:features'); | |
let lazyVal = new Stream(function () { | |
return params.every(function (featureFlag) { | |
return get(features, featureFlag); |
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({ | |
isVirtual: true, | |
tagName: '', | |
render: function (buffer) { | |
let titleTag = document.getElementsByTagName('title')[0]; | |
this._morph = buffer.dom.appendMorph(titleTag); | |
this._super.apply(this, arguments); | |
} |
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 DS from "ember-data"; | |
var hasMany = DS.hasMany; | |
var Documentable = DS.Model.extend({ | |
documents: hasMany('document', { async: true }) | |
}); | |
export default Documentable; |
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"; | |
var get = Ember.get; | |
var copy = Ember.copy; | |
var removeObserver = Ember.removeObserver; | |
var addObserver = Ember.addObserver; | |
var DocumentTitleMixin = Ember.Mixin.create({ | |
titleTokensDidChange: 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
App.ApplicationRoute = Ember.Route.extend({ | |
actions: { | |
documentUploaded: function (json) { | |
// I want this to update relationship | |
// on the documentable with the document | |
// added to the list of items | |
this.store.pushPayload('document', json); | |
} | |
} | |
}); |