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'; | |
var get = Ember.get; | |
var keys = Ember.keys; | |
var isNone = Ember.isNone; | |
/** | |
* Computed Property Macro returns computed property that evaluates to result of validation. | |
* | |
* It accepts rules hash which property name as keys and validation functions as values. |
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
module.exports = function(grunt){ | |
grunt.initConfig({ | |
pkg: grunt.file.readJSON('package.json'), | |
broccoli: { | |
lib: { | |
config: function(){ | |
var compileES6 = require('broccoli-es6-concatenator'); | |
var lib = compileES6('lib', { | |
ignoredModules: ['ember'], |
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
var Promise = Em.RSVP.Promise; | |
export default DS.Store.extend({ | |
/** | |
* Make a request to an endpoint and pass the parameters. | |
* | |
* There are 2 ways to use this method: | |
* 1. this.store.endpoint(type, id, method, params) | |
* 2. this.store.endpoint(null, url, method, params) | |
* |
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
export default Ember.Mixin.create({ | |
actions: { | |
willTransition: function(transition) { | |
var routeName = this.get('routeName'); | |
if (this.router.isActiveIntent(transition.targetName)) { | |
this.controllerFor(routeName).set('isLoading', true); | |
} | |
return true; | |
} | |
}, |
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 TableComponent from './drg-ember-table'; | |
import Row from '../rows/collapsible'; | |
var get = Ember.get; | |
var set = Ember.set; | |
export default TableComponent.extend({ | |
classNames: ['collapsible-groups-table'], | |
numFixedColumns: 0, |
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
var app = require('app'); // Module to control application life. | |
var BrowserWindow = require('browser-window'); // Module to create native browser window. | |
var express = require('express'); | |
var emberApp = express(); | |
// assuming built files are in dist | |
emberApp.use(express.static('dist')); | |
var emberAppServer = emberApp.listen(3000, function () { | |
var host = server.address().address; |
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'; | |
const { | |
on | |
} = Ember; | |
export default Ember.Controller.extend({ | |
appName:'Services Example', | |
webSocket: Ember.inject.service(), | |
bindWebSocket: on('init', function(){ |