ember-cli

Overwrite DS.Store ember-cli

老子叫甜甜 提交于 2019-11-29 09:23:18
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') } }); 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/store.js if you're using pods). Overwriting the store is the same, only the file name/location has changed. If

Ember.js: HtmlBars and the Handlebars.compile command

主宰稳场 提交于 2019-11-29 04:22:21
I get the following error when running my app: Uncaught Error: Cannot call `compile` without the template compiler loaded. Please load `ember-template-compiler.js` prior to calling `compile`. It is related to this piece of code: var CarouselView = Ember.View.extend({ template: Ember.Handlebars.compile('{{view view.itemsView}}'), elementId: 'carousel', contentBinding: 'content', ... There is already an issue related about this problem on ember.js github: https://github.com/emberjs/ember.js/issues/10265 However I added ember-template-compiler to my package.json and got the same error again. I

How do I deploy Ember.js app developed with ember-cli on github pages?

廉价感情. 提交于 2019-11-29 03:57:29
I have successfully created a small application using ember-cli. I tried pushing it to gh-pages branch of my github repo but it shows error in browser console Uncaught ReferenceError: require is not defined loading of vendor.js and vendor.js files from dist/assets is also failing. I'm not able to run standalone ember app from dist folder in local machine as well, same errors. has anyone tried it. if yes how to do it correctly? Since December 2014 there is also an ember-cli addon for this . First make sure to have set modulePrefix in config/environment.js to your repo's name on github. E.g.,

Add node module to ember CLI app

旧时模样 提交于 2019-11-29 03:42:41
I would like to use this Node.js module https://www.npmjs.com/package/remarkable-regexp in my Ember-CLI application. How do I make it available to the Ember application? I tried it by adding this to the Brocfile.js app.import('node_modules/remarkable-regexp/index.js'); but it fails like this: Path or pattern "node_modules/remarkable-regexp/index.js" did not match any files Marcio Junior Since remarkable-regexp is a npm module, I believe the best way to integrate it with ember-cli is by using ember-browserify . Within your ember-cli app you can install the addon by running npm install --save

{{content-for 'head'}} Ember-cli

橙三吉。 提交于 2019-11-28 19:10:26
I've been using Yeoman ember generator for the past 1 month and now, I'd like to give ember-cli a try. I run the generator and launch the app, everything works fine. ember new my-new-app ember server but I'd like to know how does {{content-for 'head'}} in app/index.html works? When looking at other examples from http://www.ember-cli.com/#tutorials , none of them are using this particular helper? Is it because they are using older version of ember-cli? Why weren't they using this content-for helper? I'm pretty sure that ember.js doesn't have this content-for helper in default, so I'm guessing

How to pass API keys in environment variables to Ember CLI using process.env?

匆匆过客 提交于 2019-11-28 18:18:26
How do I pass environment variables from bashrc to Ember CLI. I imagine a situation where you need stripe api keys or pusher api-keys and you have them in your environment variables in bashrc. How do you pass the api-keys to Ember CLI. I tried using Node.js process.env in both the brocfile.js and environment.js , but when I try to access it in the Ember JS controller, the property is null. In my environment.js file I added, APP: { apiKey: process.env.KEY } In My Ember JS controller I tried accessing it with: import config from '../config/environment'; And setting the controller property lkey

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

谁说我不能喝 提交于 2019-11-28 16:30:46
问题 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

Violating Content Security Policy directive after ember-cli 0.0.47 upgrade

孤人 提交于 2019-11-28 16:10:23
I upgraded my ember-cli app to 0.0.47 and am now getting a bunch of errors in my browser console related to the content security policy. How do I fix this issue? Refused to load the script 'http://use.typekit.net/abcdef.js' because it violates the following Content Security Policy directive: "script-src 'self' 'unsafe-eval' localhost:35729". login:1 Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'self' 'unsafe-eval' localhost:35729". Either the 'unsafe-inline' keyword, a hash ('sha256-...'), or a nonce ('nonce-...') is required

live-reload not working with ember-cli

僤鯓⒐⒋嵵緔 提交于 2019-11-28 10:34:38
问题 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. 回答1: 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

Multiple “apps” with ember-cli

落花浮王杯 提交于 2019-11-28 06:21:59
I'm trying to migrate to ember-cli from some old homegrown build tools. Our app is quite large and is actually split into several ember.js single page apps (e.g. index, admin, reports, etc) that share a common set of utils and components. I'm trying to figure out if that's even possible with ember-cli and if so, how do I do it? I saw some people talking about pods, others talking about addons and yet another set of people talking about private bower repos. I tried finding out information on each of these, but it seems it's all in a bit of flux. I'm not picky about the directory structure or