ember-cli

How do I upgrade ember-data to a specific sha in ember-cli?

纵饮孤独 提交于 2019-12-11 11:18:34
问题 I want to lock down my ember-cli project's version of ember-data to this commit, which updates the map function signatures and lets ED work with Ember 1.8. I tried using the canary instructions as a template and doing this, and adding this to my bower.json : "ember-data": "components/ember-data#f97d5c9adbabd7f6b4935e614bc95e49b66bb7e0", and "resolutions": { "ember-data": "#f97d5c9adbabd7f6b4935e614bc95e49b66bb7e0" } but I'm getting the following error: Additional error details: fatal:

Pass params to a view then to helper in Ember.js

蹲街弑〆低调 提交于 2019-12-11 11:08:17
问题 I have 2 views that share a view and I am trying to pass variables between them to turn on|off various html segments. Is this possible? When I run console.log the view.showTitle variable = "view.showTitle" not 1 like it should be? Odd, right? view 1 calls view 2 and passes param: {{view "components/social" showTitle="1"}} view 2 tries to pass this param to a helper function: {{#variable-exists view.showTitle}} YES {{else}} NO {{/variable-exists}} the helper being called: export default

Ember session initializer causing page reload for every route

烂漫一生 提交于 2019-12-11 11:03:16
问题 I'm building a Twitter based app in Ember-CLI and have a session initializer to ensure users are authenticated on each route. Users login via Twitter using the passport-twitter module for Express.js. I've done this before in a previous app and it's fine, but in this app I've noticed that every route reloads the page. I've stripped everything out to just an h1 tag per route and it still reloads the page. As soon as I remove the initializer and beforeModel hook below however, everything works

How to add INSPINIA bootstrap to Ember application

落爺英雄遲暮 提交于 2019-12-11 10:58:34
问题 New user to 3rd party bootstrap templates for Ember and need help. I purchased the INSPINIA admin template from www.wrapbootstrap.com. The download comes with multiple pre-created projects with INSPINIA built in (e.g., Angular, Rails, etc.) but not for Ember. I reached out to the creator to see if they could include a project for Ember and they said no. So, I am curious, does anyone know how to add INSPINIA to an Ember web application? Is it as simple as ember install bootstrap and then copy

Violating Content Security Policy directive in environment Ember Cli

百般思念 提交于 2019-12-11 10:45:57
问题 I have a built a Music Player Component with ember consuming the SoundCloud Api Suddenly in Chrome i start getting this error notification in my console anytime i play a song in my application plus the songs does not play. See the error Report Only] Refused to connect to 'https://ec-media.sndcdn.com/YEqcIen0Pkq6.128.mp3?f10880d39085a94a0418a7ef69…fe493d321fb2a6a96186dcb97beab08f3cea5ad8b42d543c3edc7371f0eb5b2b00ba96395e' because it violates the following Content Security Policy directive:

Ember-cli - Bower not installing properly

寵の児 提交于 2019-12-11 10:18:41
问题 I've been trying to clone and get running an ember-cli project my team has been working on. I do npm install and then bower install and then ember server. This comes up: Path or pattern "bower_components/moment/moment.js" did not match any files [string exception] The folder that was supposed to be moment was named momentjs instead. Weird. I renamed it and tried again: Path or pattern "bower_components/ember-simple-auth/simple-auth.amd.js" did not match any files [string exception] Ember

ember-cli exclude a directory beneath “tests” from being watched by “ember serve”

ⅰ亾dé卋堺 提交于 2019-12-11 10:05:56
问题 Is there a way to exclude a subdirectory of "tests" from being watched by ember serve? ex. I have a dir under "tests" called "selenium". If 'ember serve' is running and I do "echo xyz > bam" in the selenium folder, the ember serve console will output "file changed selenium/bam" and rebuild the app. I would like to understand if there is a way to exclude the entire selenium dir without moving it out of the tests folder ( even though for now I am moving the dir) 回答1: either: You can use

How to import socket.io via brocfile for ember cli application?

独自空忆成欢 提交于 2019-12-11 09:54:21
问题 I want to use socket.io in my ember cli application, so I installed with: bower install socket.io --save And added the following line to my Brocfile.js : app.import('bower_components/socket.io/index.js'); This results in two errors in my browser console: Uncaught ReferenceError: module is not defined Uncaught Error: Could not find module ember-moment/helpers/moment Any ideas? 回答1: Ended up using socket.io-client which imports without errors. app.import('bower_components/socket.io-client

Emberjs - how to set another property from computed property when the latter is not on the template?

旧城冷巷雨未停 提交于 2019-12-11 09:41:59
问题 This is a follow-up from my previous question, thought it deserves a different post. I what to set a data subset to a different property and have it available (and update-able) on the template. So I thought I 'd create an empty property and simply set its value. The updated template: {{#each test12}} {{businessname}} {{/each}} The controller: test12: [], test11: function(){ var bms = this.get('businessmatches').filterBy('type', 'hardware'); this.set('test12', bms); return bms; }.property(

deleteRecord with multiple belongsTo relationships in ember-cli

依然范特西╮ 提交于 2019-12-11 08:43:43
问题 What is the ember-cli best practice to deleteRecord() on a model that belongsTo multiple models? Do I have to manually clean up relationships on the parents? Migrating from ember to ember-cli I am having new trouble with deleteRecord() for a model 'star' that belongsTo multiple models, 'post' and 'user'. Before moving to ember cli it was working with this solution. The previous solution's delete action fails in the current ember-cli with errors and never calls the api . TypeError: Cannot read