ember-cli

Adding firebase & emberfire dependencies to an ember.js app (ember-cli)

江枫思渺然 提交于 2019-12-10 18:11:30
问题 I'm an emberjs begginer and I have been searching how to add the "firebase" and "emberfire" dependencies to my ember application that I created using ember-cli. I used bower to install these 2 dependencies but I get this error: Firebase is not defined ReferenceError: Firebase is not defined at eval (app/adapters/application.js:6:23) at requireModule (loader.js:54:29) at resolveOther (ember-resolver.js:158:20) at superWrapper (ember.js:1267:16) at Ember.DefaultResolver.extend.resolve (ember

Ember-cli Fixture loading

梦想的初衷 提交于 2019-12-10 17:49:53
问题 I'm certain its something small and stupid I'm missing but can't seem to get my fixtures to load. Here is I've got... app/models/todos.js import DS from 'ember-data'; var Todo = DS.Model.extend({ title: DS.attr('string'), isCompleted: DS.attr('boolean') }); Todo.reopenClass({ FIXTURES: [ { id: "1", title: 'install ember-cli', isCompleted: true }, { id: "2", title: 'install additional dependencies', isCompleted: true }, { id: "3", title: 'develop amazing things', isCompleted: false } ]});

Import custom library in ember-cli

房东的猫 提交于 2019-12-10 16:12:10
问题 I have web app and Ember app in iframe. I want to import custom library from web app to ember app like global variable. Library look like object with function: var helpers = { helper1: function() {}, helper2: function() {} }; Library working with sockets and will the same for both applications. I wrote: app.import("./../../../public/scripts/js-helpers.js"); //file located in web app I can't access variable helpers in project and ember-cli copy folder public into their working folder. Sorry if

Too slow ember-cli build on windows

吃可爱长大的小学妹 提交于 2019-12-10 14:44:38
问题 I have just started to play with Ember and ember-cli. I created a template project and added very few lines of js and some sass files from Web Starter Kit. And my project incremental build times are almost 15 to 25 seconds. I am running Windows 8.1, SSD , i5 with 12 GB RAM. C:\Users\MyUser\Projects\ember\webapp>ember --version version: 0.1.4 Could not find watchman, falling back to NodeWatcher for file system events node: 0.10.29 npm: 2.1.10 Project source: https://github.com/mmrath/ember

Ember Cli Inflector adjustments

泪湿孤枕 提交于 2019-12-10 14:32:57
问题 Where/how can i adjust the Ember.Inflector Class / create an instance of it that ember-cli picks up? Thanks! 回答1: I placed it in the model file and it worked fine: import DS from 'ember-data'; import Ember from 'ember'; var inflector = Ember.Inflector.inflector; inflector.irregular('nota', 'notas'); inflector.singular(/nota/, 'nota'); export default DS.Model.extend({ title: DS.attr('string'), description: DS.attr('string'), language: DS.attr('string'), body: DS.attr('string') }); 回答2: I

Getting element by ID in Ember

偶尔善良 提交于 2019-12-10 13:36:18
问题 I am running two ember applications. One has the following component: import Ember from 'ember'; export default Ember.Component.extend({ tagName: 'a', click: function() { Ember.$('#wrapper').toggleClass('toggled'); } }); and the other one, has this one: import Ember from 'ember'; export default Ember.Component.extend({ tagName: 'a', click: function() { this.$('#wrapper').toggleClass('toggled'); } }); What I can't understand here is why in one application I select an element by ID using Ember.

Ember-cli: Live reload not working

…衆ロ難τιáo~ 提交于 2019-12-10 13:21:13
问题 I started my first project with ember cli and I noticed that the live reload isn't working. When I start the development server, I get multiple error messages (see below). Changes to the code base are only available after a restart of the server. $ ember server version: 0.1.2 Livereload server on port 35729 Serving on http://0.0.0.0:4200/ 2014-12-03 17:51 ember[16491] (FSEvents.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-21) 2014-12-03 17:51

How do I execute a post build hook in an ember-cli Brocfile.js?

試著忘記壹切 提交于 2019-12-10 13:14:11
问题 I have a ember-cli project that builds to the dist/ directory. I've configured the app to handle assets in the dist/ directory and set the history to use a hash instead of pushState. This allows me to sym-link the index.html to the root. The reasoning is that pushing the project to gh-pages on GitHub requires a root index.html and ember apps require routing to be absolute not relative (AFAIK). GitHub however will not follow sym-links and require a copy of the output index.html . This works

Ember.js: How to integration test components that interact with ember-data models

混江龙づ霸主 提交于 2019-12-10 12:57:59
问题 I'm building a relatively straight-foward comment-list component. I want to pass in the commentable model (say a Post ) and have the component take care of creating, editing, deleting comments. Right now I pass around all the various actions and it's been extremely brittle. How do I create a true instance of an Ember Data model in a component integration test? My immediate thought was to import the model then .create({}) it but that errors with use this.store.createRecord() instead /* jshint

How to tell ember.js and ember-data version from ember-CLI?

徘徊边缘 提交于 2019-12-10 12:44:40
问题 Doing ember -v only shows ember cli version. How can you view ember.js version and ember data versions? 回答1: The version of ember.js and ember-data is determined by your app's dependencies. Bower dependencies are listed in bower.json file. npm dependencies are listed in your package.json file. In the command line, you can just use cat and grep to show you relevant lines. For example, in the app's directory (same place you use ember -v ): cat bower.json | grep ember-data That will return any