Quantcast
Channel: Ember.JS - Latest topics
Viewing all articles
Browse latest Browse all 4826

Where to define non-persistable Ember Objects?

$
0
0

@ozzyoli wrote:

Hi!

I want to create a plain old object to encapsulate a bunch of other objects and operations on those objects.

I'm wondering where I should be storing a class definitions for such an object in my project directory?

e.g. Where should I write this

App.Person = Ember.Object.extend({
  helloWorld: function() {
    alert("Hi, my name is " + this.get('name'));
  }
});

such that in my Controller I can say

var tom = App.Person.create({
  name: "Tom Dale"
});

Is it a helper and thus should go in the helper folder? I don't feel like it is a model since my model folder contains exclusively Ember Data model and App.Person is not something I want persisted.

Thanks!

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4826

Trending Articles