unageanu/container-js

View on GitHub
samples/lazy-loading/scripts/app/owner.js

Summary

Maintainability
A
0 mins
Test Coverage
define(["container"], function( ContainerJS ){
    
    "use strict";
    
    /**
     * @class
     */
    var Owner = function() {
        this.component = ContainerJS.Inject.lazily("app.Component");
        print("owner : created.");
    };
    
    /**
     * @public
     */
    Owner.prototype.initialize = function() {
        print( "owner : initialize." );
        this.component.then(function( component){
        }, function( error ) {
            alert( error.toString() ); 
        });
    };
    
    return Owner;
});