ember.js

How to hide a section in .hbs and .js while taking an ember production build

吃可爱长大的小学妹 提交于 2021-02-11 15:21:01
问题 Our Ember application is developed in 2.8 version and we follow POD structure. We are generating two different builds as below 1) For our dev server : No change in code,just do build 2) For our test server: Delete a section in HBS and also remove a route from router.js then do build And we take build using " npm run-scripts build " which is configured in our package.json as below "scripts": { "build": "ember build", "start": "ember server", "test" : "ember test" }, I would like to know in

How to hide a section in .hbs and .js while taking an ember production build

▼魔方 西西 提交于 2021-02-11 15:16:21
问题 Our Ember application is developed in 2.8 version and we follow POD structure. We are generating two different builds as below 1) For our dev server : No change in code,just do build 2) For our test server: Delete a section in HBS and also remove a route from router.js then do build And we take build using " npm run-scripts build " which is configured in our package.json as below "scripts": { "build": "ember build", "start": "ember server", "test" : "ember test" }, I would like to know in

EmberJS, polling, update route's model, re-render component

懵懂的女人 提交于 2021-02-05 17:50:46
问题 I've been looking for mechanism to update the model of a Route, and has the Component (called from within the template associated with that route) reacts to that event, and re-render itself. So I have the index template like this (I pass in the model of the IndexController, which to my understanding is just a proxy to IndexRoute -- I don't have IndexController defined, by the way): <script type="text/x-handlebars" id="index"> Below is the bar-chart component <br/> {{bar-chart model=model}} <

EmberJS, polling, update route's model, re-render component

梦想与她 提交于 2021-02-05 17:46:45
问题 I've been looking for mechanism to update the model of a Route, and has the Component (called from within the template associated with that route) reacts to that event, and re-render itself. So I have the index template like this (I pass in the model of the IndexController, which to my understanding is just a proxy to IndexRoute -- I don't have IndexController defined, by the way): <script type="text/x-handlebars" id="index"> Below is the bar-chart component <br/> {{bar-chart model=model}} <

EmberJS, polling, update route's model, re-render component

試著忘記壹切 提交于 2021-02-05 17:45:59
问题 I've been looking for mechanism to update the model of a Route, and has the Component (called from within the template associated with that route) reacts to that event, and re-render itself. So I have the index template like this (I pass in the model of the IndexController, which to my understanding is just a proxy to IndexRoute -- I don't have IndexController defined, by the way): <script type="text/x-handlebars" id="index"> Below is the bar-chart component <br/> {{bar-chart model=model}} <

EmberJS, polling, update route's model, re-render component

こ雲淡風輕ζ 提交于 2021-02-05 17:42:35
问题 I've been looking for mechanism to update the model of a Route, and has the Component (called from within the template associated with that route) reacts to that event, and re-render itself. So I have the index template like this (I pass in the model of the IndexController, which to my understanding is just a proxy to IndexRoute -- I don't have IndexController defined, by the way): <script type="text/x-handlebars" id="index"> Below is the bar-chart component <br/> {{bar-chart model=model}} <

EmberJS, polling, update route's model, re-render component

孤街醉人 提交于 2021-02-05 17:41:57
问题 I've been looking for mechanism to update the model of a Route, and has the Component (called from within the template associated with that route) reacts to that event, and re-render itself. So I have the index template like this (I pass in the model of the IndexController, which to my understanding is just a proxy to IndexRoute -- I don't have IndexController defined, by the way): <script type="text/x-handlebars" id="index"> Below is the bar-chart component <br/> {{bar-chart model=model}} <

Spring boot backend receiving empty Files array from EmberJs component EmberUploader When upload multiple files

邮差的信 提交于 2021-02-05 11:48:37
问题 I have an ember component responsible of uploading multiple File, this is my component: export default EmberUploader.FileField.extend({ multiple: true, method: 'POST', success: Ember.K, failure: Ember.K, updateLabel: Ember.K, start: false, change(event) { this.set('_files',event.target.files); var j = Array.from(this.get('_files')); this.get('files').pushObject(j); } startUpload: Ember.observer('_files.[]', 'start', function() { if (!Ember.isEmpty(this.get('_files')) && this.get('start')) {

Ember: Best practices with Selenium to make integration tests in browser

岁酱吖の 提交于 2021-02-05 08:36:21
问题 Have you any experiences/examples to make Selenium tests with ember.js? I cannot "grab" views (I use router), because they have not-deterministic ids. Any ideas? 回答1: You can set your own id's for view elements explicitly. Directly from handlebars like: {{#view Ember.TextField elementId="my_id"}} Or from your view object: MyApp.MyView = Ember.View.Extend({ elemntId: "my_id" }); 回答2: EmberJS generates/assigns dynamic values for id attributes, example, ember32 , ember33 , ember34 , etc. In

Automate Ember.js application using Selenium when object properties are changed at run-time

本秂侑毒 提交于 2021-02-05 07:57:06
问题 I am trying to automate an Ember.js application using Selenium+TestNg. The drop-down in the application has only one object property id. However every time i refresh the Page id gets change and there is not pattern. Eg: First time i open a page id=ember1398 and when i refresh the page same object id changes to ember1097. I would be greatful if some one can guide me in overcoming this challenge. I am open to change tool/framework if necessary. 回答1: This is a known issue with Ember. We work