ember-cli

installing ember-cli on ubuntu. ember new app fails silently

可紊 提交于 2019-12-12 04:09:00
问题 I am planing to switch my ember development to ubuntu 12.04. I am new to it. It seems I have installed node and ember-cli properly, but ember new a does not do anything and fails silently. rigel@ rigel:/$ ember --version 0.2.8 rigel@rigel:/$ npm--version 1.4.23 rigel@ rigel:/$ node -v v0.10.31 rigel@rigel:/$ember new a rigel@ rigel:/$ The above mentioned information might be less than is needed to troubleshoot the problem, but I need some pointers to figure out what else I should be looking

Ember 2, model.save() from component my-modal.hbs

☆樱花仙子☆ 提交于 2019-12-12 04:02:31
问题 I have this posts.hbs : {{#each model as |post|}} <a href="#" {{action 'openWriteModal' post}}> <h3>{{post.title}}</h3> {{post.text}} {{post.author.name}} </a> {{/each}} Then I open my write-modal.hbs : {{input value=model.title size="40" escape-press='close'}} {{model.author.name}} {{input value=model.text size="70" escape-press='close'}} <button {{action 'close'}}>Close</button> <button {{action 'save' model}}>Save</button> Now, this is my components/write-modal.js : export default Ember

How to get a list of all ember-data Model classes?

佐手、 提交于 2019-12-12 03:21:26
问题 Individual models can be fetched with store.findRecord(modelTypeName, id); ; how can I get a list of all the possible modelTypeName s available in my app? I'm specifically trying to do this from within an app initializer. I'm using ember-cli version 1.13.8 with Ember 2.1.0 Edit : This question is somewhat of a duplicate, but it's not clear in what context he's working. It seems like introspection should be easier to achieve without hacks in an (instance) initializer where you're supposed to

Where in Ember to make initial session status XHR to server

此生再无相见时 提交于 2019-12-12 02:55:50
问题 When my ember application starts, I need to make a call to the server to check on the current session/user status. This needs to happen before any model hooks are run or any templates are rendered. Where should this happen? I can't find quite the right place -- it keeps running a bit too late, or not at all. Right now I have it in my application route init with this._super.apply(), which works ok but it runs after child route model hooks. I would think it should be an initializer, but the

Adding route to a modal/overlay in Ember.js

旧街凉风 提交于 2019-12-12 02:21:24
问题 I know Ember's mantra is URL first and the URL should be a serialization of the page contents, but I have a scenario where I want to create a route for a component/page that will live in a modal, and be accessible from various places throughout the site. I always want this URL to represent the actual route of the resource, not change if the resource happened to be nested in another route. A similar example is Pinterest. When you are looking at the feed of pins you are on the root route. You

Ember Cli Bootstrap Date Picker wrong format while using queryParam

。_饼干妹妹 提交于 2019-12-12 01:40:41
问题 I have been using Ember-CLI-Bootstrap-Datepicker for a while and I had no issue until now that when I am using queryParams to get Date Value for my search purpose the format in may params would be like : "date_due_gteq=Thu%20Sep%2001%202016%2000%3A00%3A00%20GMT%2B0800%20(MYT)" Which one is incorrect? I have searched and found that apparently my date object needs to be convert to ToString however, I have tried but still have the same problem. that would be great if you guys have a an

How to make staging environment for Ember-CLI?

旧街凉风 提交于 2019-12-12 01:14:44
问题 There are development, test and production environments in Ember CLI . I have test and production server. And I need to make build on test server like on production but with another environment configs. But test env in Ember CLI used for automatic tests. I tried to call ember build --environment development on test server with next options in ember-cli-build.js file: var app = new EmberApp(defaults, { // Add options here fingerprint: { prepend: 'https://s-test.mycdn.com/', enabled: true } });

How to dynamically apply classes to objects in ember-cli?

久未见 提交于 2019-12-11 21:09:51
问题 I'm creating an app that has a listing of items and a series of filter buttons at the top. As the user applies different filters, I want the buttons to change style using CSS classes to show them as enabled/disabled. I want to be able to write something like the code below, but it doesn't work. {{#each category in category_options}} <button {{action "filterCategory" category}} {{bind-attr class=":btn-small isFiltered(category):btn-active:btn-inactive"}}>{{category}}</button> {{/each}} In this

Updating Ember.js environment variables do not take effect using in-repo addon config() method on ember serve

二次信任 提交于 2019-12-11 17:29:45
问题 My goal here is to create an auto-increment build number that updates both on ember build and ember serve. In the end, if I can only use this on build, that's totally ok. I originally asked this question: In-repo addon writing public files on build causes endless build loop on serve In that I was attempting to solve this problem by writing out JSON files. The problem was mostly solved, but not using ember serve. Instead of doing that, I'm now trying to update the local environment. But this

How to open the dropdown of Ember Power Select from outside?

北慕城南 提交于 2019-12-11 17:08:45
问题 As the title says, we would like to open the dropdown of the Ember Power Select (http://www.ember-power-select.com/) from outside, i.e., from a parent component or the route's template. As far as we have checked, there is no way to trigger the action open of the component, which btw wouldn't be correct in the sense of "data down, actions up" principle. So, rather we need to "register" some data attribute that allows us to trigger to open the dropdown by altering the data attribute. But maybe