Such arrays! Much deep! So mixed! ` }) .Class({ constructor: AppController }) ; AppController.parameters = [ new ng.core.Inject( "VALUE_COLLECTION" ) ]; return( AppController ); // I control the App component. function AppController( values ) { var vm = this; // Let's log-out the values that were collected from our mixed-depth // provider collection. console.log( "Provider Values:" ); console.log( values ); } } ); // --------------------------------------------------------------------------- // // --------------------------------------------------------------------------- // // Let's setup several Directives that all select for "P". This way, we can see // how many of them get instantiated in the App component with the mixed-depth // directive array. [ 0, 1, 2, 3, 4, 5 ].forEach( function iterator( depth ) { define( ( "PTag" + depth ), function registerPTag() { // Configure the PTag directive definition. // -- // CAUTION: Normally, I wouldn't return the value of this // method chain. However, I was running into a bug that I didn't // understand in which the wrong directives were being linked // if I returned the constructor reference. I'll investigate that // in a subsequent blog post (if I can figure it out). return ng.core .Directive({ selector: "p" }) .Class({ constructor: function() { console.log( "PTag" + depth + " constructed." ); } }) ; } ); } );