ember.js

Short delay when trying to run redirect with ember route with firebase authentication

老子叫甜甜 提交于 2019-12-13 04:43:24
问题 Alright, this is my first question on SO so I'll try to make it a good one sorry ahead of time. I've been using ember-cli to work on a product. I am using Firebase simple login for authentication and have created an initializer that adds an auth object to all my controllers and routes. This works, but... There seems to be a delay for the redirect checking. example I go to /secret and this should redirect me back to the /login route and it does but there is a slight delay where I can see the

Observes other childcontroller?

我怕爱的太早我们不能终老 提交于 2019-12-13 04:41:37
问题 I am trying to observe another childcontroller. I have the following router: this.resource('generics', {path: '/gens'}, function() { this.resource('generic', {path: '/:generic_id'}, function() { this.route('prepare'); // Objectcontroller this.route('sent'); // Objectcontroller }); }); I have an observer in the sent controller, however it does not work. I have currently: 'controllers.sent.id' to get the id prepared in the prepare controller. If I do a needs property with generic.prepare . It

Registering models from another namespace with the Ember Data store

余生颓废 提交于 2019-12-13 04:40:38
问题 I'm working on a shared library that has internal Ember Data Models that are used by the calling application. However, those DS.Model objects from the library don't find their way into the store for the calling application. library.js DS.SharedLibrary.User = DS.Model.extend({}); DS.SharedLibrary.BaseModel = DS.Model.extend({ createdBy: DS.belongsTo('DS.SharedLibrary.User') }); app.js App.MyModel = DS.SharedLibrary.BaseModel.extend({ customField: DS.attr() }); However, when the adapter goes to

Nothing handled the action Emberjs 2

纵然是瞬间 提交于 2019-12-13 04:38:08
问题 I have a application when do a search an return some datas to show for my user. When I click to do a search I receive this error and the model object inside the actions, don't show the model with informations filled. Follow error and code. Uncaught Error: Nothing handled the action 'doSearchBooking'. If you did handle the action, this error can be caused by returning true from an action handler in a controller, causing the action to bubble. Component export default Ember.Component.extend({

How do I do Automating Ember testing with Dalek (setup/teardown of specific Ember components)

自作多情 提交于 2019-12-13 04:34:34
问题 My TLDR; version of my question is "Is there a way I can integrate with qunit such that Dalek can get the correct context when it needs it, or conversely, can I get Dalek to run setup/teardown asset-pipeline-compiled Ember javascript to build a context for it to run tests on?" Firstup Dalek look awesome ! All my tests are currently written in qunit. I'm having some problems automating tests around a component I'm building in Ember. The component is a kind of WYSIWYG textarea. (BTW, my qunit

Set and access view bindings in handlebars

…衆ロ難τιáo~ 提交于 2019-12-13 04:31:17
问题 Is there a way to set a binding in handlebars for a view and then use that in the template? {{view App.SKillView skillBinding="Skill1"}} and then in the template use that binding such as: <script type="text/x-handlebars" data-template-name="skill"> <h5>{{skill}}</h5> <div {{action spendPoints skill 1}}></div> </script> The view class is really simple: App.SkillView = Ember.View.extend({ templateName:'skill', classNames: ['skill'] }); These seems really simple, but for the life of me I can't

How do I specify using a view with a compiled handlebar in ember.js RC1

随声附和 提交于 2019-12-13 04:28:43
问题 I am trying to port a pre2 application to 1.0.0 rc. They way my application is setup is as follow: all my templates are compiled into their own view. So my code looked like this: App.NewUserController = Em.Controller.extend({}); App.NewUserView = Em.View.extend({ template: Em.Handlebars.compile(NewUserHtml) }); NewUserHtml is a html/handlebars file loaded through require.js. Since the file is directly compiled into the template it doesn't include a <script type="text/x-handlebars"…> tag. I

Does ember only respect single sectioned controller names with the 'needs' property

℡╲_俬逩灬. 提交于 2019-12-13 04:27:47
问题 I have a problem with a Controller not inheriting context from another via needs property. The problem only presents itself when the naming convention of the Routes/Controllers consists of more than a single word. For example if I have a Resource: banks and a Controller: BanksController then I can successfully inject its context into another Controller via controllers.banks.content with needs: ['banks'] However If I have a Resource: bank-accounts and a Controller BankAccountsController ; The

Ember route not found

给你一囗甜甜゛ 提交于 2019-12-13 04:24:25
问题 i try to build an webapp with emberjs. this is the app router: App.Router.map(function() { this.route("page"); this.route("menu"); this.resource('posts', function(){ this.resource('post', { path: '/:post_id' }); }); this.route("index", { path: "/" }); this.route("cat"); this.route("foto"); }); and this is the Postroute: // GET POST JSON App.PostRoute = Ember.Route.extend({ model: function(params) { return Ember.$.getJSON('http://www.wilhelminaschool.eu/?json=get_post&post_id='+params.post_id)

How do I create a polymorphic 1:1 relationships wtih Ember Data fixtures?

a 夏天 提交于 2019-12-13 04:19:40
问题 Page has a polymorphic 1:1 relationship with a model called PageContent. PageContent has two subtypes (TextOnly and Video). I want to be able to able to do a findAll for "page" and get all of the content back. What am I doing wrong? JSBin 回答1: This seems to work: http://jsbin.com/names/1/edit Only wrong thing I could see is the App.Page.FIXTURES. It should be: App.Page.FIXTURES = [ { id: 1, title: "Introduction", pageContent: 1, pageContentType: "textOnly" },{ id: 2, title: "Summary",