Ember define objects with ember-cli

Sry for noobish question.

Im trying to understand ember core concepts. Can anyone explain why this code dosnt work? app/app.js

import Ember from 'ember';
import Resolver from 'ember/resolver';
import loadInitializers from 'ember/load-initializers';
import config from './config/environment';

var App;
App = Ember.Application.extend({
  modulePrefix: config.modulePrefix,
  podModulePrefix: config.podModulePrefix,
  Resolver: Resolver

loadInitializers(App, config.modulePrefix);

var wife = Ember.Object.create({
  age: 21

export default App;


  = outlet
  = wife.age

Have you read about Routing in Ember.js? if not, go ahead to find answers in there.

Can you using hbs instead of emblem? Emblem is not design for novice

Your template does not have access to the wife variable.

Declare it in the Application Controller, and it will be available to your template.

Ideally, it will be set up as the model of your Route, but as I didn’t want to clobber too much your example, the following Twiddle respects your original code as much as possible in order to just make it work.

You’ll also need another add-on to compile .emblem

ember install ember-cli-emblem

i realy dont have any problems with emblem it works great


import Ember from 'ember';

export default Ember.Component.extend({
  emberobject1: "foe"
  actions: {
    doit: function(){this.set("emberobject1","bar")}


button{action "doit"} example1

i dont know how to get access to ember object from another component or on DOM event.

i tried:


import Ember from 'ember';
import component-1 from '../components/component-1'
export default Ember.Component.extend({


button{action "doit" component-1} example2

Is there anyone who can answer mby?