ember-cli

How to run emberJS application in IIS?

☆樱花仙子☆ 提交于 2019-12-01 03:38:50
I have an EmberJS application that is built using Ember CLI. To deploy my application I used the ember build --release command with Ember CLI, and copied the output from the /dist folder into the folder that is mapped with IIS. Everything seems to work fine. The url is updated when you navigate inside the SPA, data is fetched from Web Service etc. BUT if I try to access localhost/someurl directly, I get a 404 Not Found error. I'm guessing this is because of the routing in IIS 7, but how can I make this work with Ember routing? Chris Rice I know this question is old but i found a very nice

Square brackets surrounding parameter in function definition

◇◆丶佛笑我妖孽 提交于 2019-11-30 19:34:42
I came across the following code in the Ember CLI website : export default Ember.Helper.helper(function([value]) { return value.toUpperCase(); }); What confuses me is the square brackets surrounding the value parameter. I can understand it in a function call, but why in function definition? This is all very surprising to me, but it appears to be valid javascript, according to the ECMAScript 2017 language specification, the formal parameter in a function declaration can any "binding element", including an array binding. https://tc39.github.io/ecma262/#prod-BindingElement The actual behavior of

Exclude folders from builds in Brocfile

半城伤御伤魂 提交于 2019-11-30 18:43:13
Is there a way to exclude a folder from a build in a Brocfile (or any other place). The use case is packaging, where I have an app made of sub-apps within pods. eg. /app/modules/components /app/modules/app1 /app/modules/app2 /app/modules/app3 I'd like to build them all when environment is set to 'development' or only eg. 'app1' when environment is 'app1'. Any suggestions? I have tried different combinations of broccoli-file-remover, broccoli-funnel and broccoli-merge-trees to no avail. var removeFile = require('broccoli-file-remover'); module.exports = removeFile(app.toTree(), { paths: ['app

ember-cli meta config/environment file

允我心安 提交于 2019-11-30 11:41:32
I'm using ember-cli to structure my app. It compiles all the files to the dist/ directory. However as I inspected the compiled index.html I noticed it was creating this meta tag. <meta name="user/config/environment" content="%7B%22modulePrefix%22%3A%22user%22%2C%22environment%22%3A%22development%22%2C%22baseURL%22%3A%22/%22%2C%22locationType%22%3A%22auto%22%2C%22contentSecurityPolicy%22%3A%7B%22default-src%22%3A%22%27none%27%20localhost%22%2C%22script-src%22%3A%22%27self%27%20%27unsafe-inline%27%20%27unsafe-eval%27%20use.typekit.net%20connect.facebook.net%20maps.googleapis.com%20maps.gstatic

How to use a custom Express server with Ember CLI?

雨燕双飞 提交于 2019-11-30 11:22:38
问题 I'm using Ember CLI 0.0.36. When I run ember server in my project folder, my understanding is that a server buried in some Brocoli process gets started. However I would like to program a custom Express server and have my app point to that Node.js code for its backend. How would I go about doing that within the Ember CLI framework? UPDATE: Following @user3155277's answer, I added an adapter file like so: app-name/app/adapters/application.js : import DS from 'ember-data'; export default DS

Overwrite DS.Store ember-cli

馋奶兔 提交于 2019-11-30 08:55:45
问题 I have some code that needs to run on store.init . I tried extending the default store in app/store.js , ember-cli seems to pick it up as a store, but the object in this.store is not a store My store definition: import DS from 'ember-data'; export default DS.Store.extend({ init:function(){ console.log('watatLoL') } }); 回答1: According to Peter Wagenet, this has changed in Ember Data beta 19. If you're using that version or later, the file is now app/stores/application.js (or app/application

ember-cli support for Handlebars @vars in each helper (i.e., @index, @key, @first, @last)

孤者浪人 提交于 2019-11-30 04:56:51
问题 I am getting a compilation error in ember-cli whenever I have a Handelbars template that uses @vars variables (i.e., @index, @key, @first, @last) inside of the each helper. (See http://handlebarsjs.com/#iteration for documentation on these @vars variables inside the each helper.) Below is a simple application built using ember-cli and containing only two files added to the program: routes/application.js and templates/application.hbs. At the bottom of this post is a screenshot of the

Running an angular 2 application built locally on Chrome using angular-cli without a node server

限于喜欢 提交于 2019-11-29 20:27:56
I will make my Angular 2 question very precise. 1. I am using: Angular 2, angular-cli: 1.0.0-beta.15, ( webpack building ) node: 6.4.0, os: linux x64 2. What I want to achieve: I want to build my project in a way that after the build ( ng build project-name ) I get static files of my Angular 2 application, which I can run directly from chrome without using ng serve or the node server. I just want to double click index.html and run the app locally. 3. Meanwhile, what I get in the chrome browser console output when I double click the generated index.html is: file:///inline.js Failed to load

live-reload not working with ember-cli

∥☆過路亽.° 提交于 2019-11-29 16:45:21
ember new foo-proj cd foo-proj ember s Now the server is running. But when I edit a file e.g foo-proj/app/index.html live-reload does not reload ! I'm running: node v0.10.31 npm 1.4.23 I've been asking around on the #ember-cli channel but no luck. I seem to be the only one with this problem. Timo Finally got live-reload working . I had to do some rigorous stuff though which does unfort not explain what the problem was. I resolved the issue by completely removing node and npm and then reinstalling it by running brew install node @wenincode pointed me to a link to uninstall node and a link to

Create a for loop that will iterate a certain number of times in Ember-CLI

天大地大妈咪最大 提交于 2019-11-29 10:20:07
I am in a situation in which I would like to be able to have a component or helper that would allow me to iterate a number of times and output the enclosed block each time. Something like this: {{#incremented-for 2}} block to output {{/incremented-for}} I tried to set this up as a component, but was not able to figure out a way to make it work. I also tried to set it up as a helper, and was able to find some code that seems like it should work: export function incrementedFor(n, block) { var accum = ''; for(var i = 0; i < n; ++i) accum += block.fn(i); return accum; } export default Ember