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
test('multi select in a ember integration test', function(assert) { | |
//setup your model and other component state ... | |
this.render(hbs`{{my-multi-select model=model options=options}}`); | |
this.$('.some-multi-select > option[value="' + MY_NEW_ID + '"]').prop('selected',true).trigger('change'); | |
assert.equal(model.get('related_things').get('length'), new_count_with_added_item); | |
}); |
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
function buildRecord(type, data, store) { | |
var containerKey = 'model:' + type; | |
var factory = store.container.lookupFactory(containerKey); | |
var record = factory.create({ | |
id: data.id, | |
$data: data | |
}); |
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
App = Ember.Application.create(); | |
App.Router.map(function() { | |
this.resource("people", { path: "/" }); | |
}); | |
App.PeopleRoute = Ember.Route.extend({ | |
model: function() { | |
return App.Person.find(); | |
} |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>example app</title> | |
</head> | |
<body> | |
<script src='js/vendor/jquery/jquery.min.js'></script> | |
<script src='js/vendor/handlebars/handlebars.js'></script> | |
<script src='js/vendor/ember/ember.min.js'></script> |
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
{ | |
"dependencies": { | |
"bower": "*", | |
"grunt": "*", | |
"grunt-cli": "*", | |
"grunt-contrib-concat": "*" | |
}, | |
"scripts": { | |
"postinstall": "bower install" | |
} |
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.loadNpmTasks('grunt-contrib-concat'); | |
grunt.initConfig({ | |
concat: { | |
dist: { | |
src: [ | |
'js/vendor/jquery/jquery.min.js', | |
'js/vendor/handlebars/handlebars.js', | |
'js/vendor/ember/ember.min.js', |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>example app</title> | |
</head> | |
<body> | |
<script src='js/dist/deps.min.js'></script> | |
<script type="text/x-handlebars" data-template-name="application"> | |
{{outlet}} |
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.loadNpmTasks('grunt-ember-template-compiler'); | |
grunt.initConfig({ | |
emberhandlebars: { | |
compile: { | |
options: { | |
templateName: function(sourceFile) { | |
var newSource = sourceFile.replace('js/templates/', ''); | |
return newSource.replace('.handlebars', ''); |
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
{ | |
"dependencies": { | |
"bower": "*", | |
"grunt": "*", | |
"grunt-cli": "*", | |
"grunt-contrib-concat": "*", | |
"grunt-ember-template-compiler": "1.5.0" | |
}, | |
"scripts": { | |
"postinstall": "bower install" |
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.loadNpmTasks('grunt-es6-module-transpiler'); | |
grunt.initConfig({ | |
transpile: { | |
app: { | |
type: 'amd', | |
moduleName: function(path) { | |
return 'example/' + path; | |
}, |
OlderNewer