To be notified as soon as a property is set, use the .once() method. The
callback will be called immediately if the property is already set.

a.once('userInfo',function(userInfo){

alert('Welcome, '+ userInfo.name+'!');

});

Many atom methods can work with more than one property at a time.

a.once(['userInfo','appInfo'],function(user, app){

alert('Welcome to '+ app.name+', '+ user.name+'!');

});

When you just want to know about the next change, even if the property is
already set, use .next().

a.next('click',function(click){

alert('Are you done clicking on '+ click.button +' yet?');

});

To watch for any future changes to a property, use the .on() (alias .bind())
method.

functionmyErrorHandler(error){

console.log('There was a grevious calamity of code in '+ a.get('module'));

console.log(error);

}

a.on('error', myErrorHandler);

Note that setting a property with a primitive (string/number/boolean) value will
only trigger listeners if the value is different. On the other hand, setting
an array or object value will always trigger listeners.

You can unregister any listener using .off() (alias .unbind()).

a.off(myErrorHandler);

If you only want to remove the listener associated with a particular key or
keys, you can specify those too:

Providers only get invoked if there is a need, and if the property is not
already set. Use the .need() method to declare a need for a particular
property. If a corresponding provider is registered, it will be invoked.
Otherwise, .need() behaves just like .once().