Questions tagged [ember.js-view]

Ember.View is the class in Ember responsible for encapsulating templates of HTML content, combining templates with data to render as sections of a page's DOM, and registering and responding to user-initiated events.

Ember.View is the class in Ember responsible for encapsulating templates of HTML content, combining templates with data to render as sections of a page's DOM, and registering and responding to user-initiated events.

The manual page is here.

45 questions
25
votes
2 answers

Ember.Component (block form): more than one outlet {{yield}}

I see that ember has a very nice mechanism for wrapping content in a component using the {{yield}} mechanism documented here. So, to use the example in the documentation, I can have a blog-post component template defined like so:
Code Poet
  • 11,227
  • 19
  • 64
  • 97
10
votes
3 answers

Ember.js: how to get input element ID for use in label

I have a scenario where I can't wrap the label around an input element, so it has to look something like this: {{input value=name}} I'd like to set the label's for attribute to match the input element's ID so that the rendered…
Johnny Oshika
  • 54,741
  • 40
  • 181
  • 275
8
votes
1 answer

how to set two class name for Ember.js input helper

i'm trying to bind an input element like this: {{input value=email type="text" placeholder="Enter email" class=emailError:with-error}} it works just fine, as long as I try to assign it only 1 class name ".with-error". how can I assign 2 class…
Dima Feldman
  • 708
  • 1
  • 10
  • 17
3
votes
2 answers

How to optimize the rendering of components in Ember JS

There are around 3 hundred components rendered inside the wrapper component and its taking to much of time to render. But I need thousand of components to get rendered inside the wrapper container. How can I achieve this without any performance…
2
votes
1 answer

Handling a click and a tap but not a scroll

I have an Ember.View that handles both the click and touchEnd events, for both desktop and mobile interactions. Unfortunately, touchEnd also gets fired when scrolling, which is not intended. How do I handle the click and tap, but avoid the scroll…
Josh Smith
  • 14,674
  • 18
  • 72
  • 118
2
votes
1 answer

Ember render helper with dynamic controller/template

Does Ember allow rendering dynamic views or only static, where I need to know name of template/controller used? For example: {{render view.processStep.filterForm model}} and view.processStep.filterForm could be mapped to specific template and…
2
votes
0 answers

bound {{if}} statement in ember not reevaluated

The following bound {{if}} statement is not reevaluated when the object 'model' it is bound to changes. This is contrary to my expectation and what I thought was the purpose of binding an if statement to an object. Am I doing something wrong?…
2
votes
1 answer

Form submit event in a view

I have a form inside a View. How and where can I handle the form submit event? Also where can I write the code for handling events on elements present in this form. I tried handling it at: //Instantiating a view with a template name signup var…
Pranava Sheoran
  • 529
  • 4
  • 27
2
votes
1 answer

Code replication in creating reusable view/component in ember.js

I have to create a feed reader which can be used in multiple places in an ember app. I decided to use either a 'view' or a 'component' in this case. one concern is in both the cases i have to keep the data out side of 'view' or 'component'. i have…
Ashwin S
  • 140
  • 7
2
votes
1 answer

Ember: Specify a target action view for an action helper, other than the containing or parent view

In Ember, if you want an action to be handled by a view, it's easy to achieve this using
Parijat Kalia
  • 4,929
  • 10
  • 50
  • 77
1
vote
1 answer

Not able to add data using ember-data Model

Controller/new-customer actions: { addInfo: function() { var name = this.get('name'); var e_mail = this.get('e-address'); var emoney = this.get('e-money'); var newCustomer = this.store.createRecord('customers', { …
Flyn Sequeira
  • 718
  • 2
  • 9
  • 25
1
vote
1 answer

EmberJS: How to call a component function from a controller and calculate the component data

I created a route lets say logs (pods structure) and I created the controller.js, route.js and template.hbs In the template I initialized a grid component. Also I'm working on a custom pagination component. When I initialize the grid component I…
Panagiotis
  • 201
  • 3
  • 16
1
vote
1 answer

Ember JS: render same view twice ( with data from one controller )

I have an Ember JS drag & drop view which is used to connect items to a bigger piece. As the construct grows it overlaps the viewport vertically. What I want to do now is to have a small preview-view of the d&d view. I want the controller data from…
1
vote
1 answer

Ember.js - View fading in and out using jquery

Is it possible using the View lifecycle hooks such as: "willDestroyElement: This hook is called immediately before the element is removed from the DOM. This is your opportunity to tear down any external state associated with the DOM node. Like…
jumper rbk
  • 414
  • 4
  • 18
1
vote
1 answer

Accessing model data in router when using a view

I am looking for a way to access model data in a route when using a view to display model attributes. Example Template

New post

{{input type="text" value=title…
GGAlanSmithee
  • 345
  • 1
  • 5
  • 11
1
2 3