
var NGComponentType = require('./NGComponentType');
module.exports = NGComponent;

/**
 * Container for angular module object
 *
 * @param {String} module
 * @param {NGComponentType} type
 * @param {String} name -  Name of the type generated by the constructor
 * @param {String[]} dependencies - List of all dependencies for the given type
 * @constructor
 */
function NGComponent(module, type, name, dependencies) {
	this.module = module;
	if (!NGComponentType[type]) {
		throw 'Invalid component type: ' + type;
	}
	this.type = type;
	this.name = name;
	this.dependencies = dependencies;
}


var NGComponentType = require('./NGComponentType');
module.exports = NGComponent;

/**
 * Container for angular module object
 *
 * @param {String} module
 * @param {NGComponentType} type
 * @param {String} name -  Name of the type generated by the constructor
 * @param {String[]} dependencies - List of all dependencies for the given type
 * @constructor
 */
function NGComponent(module, type, name, dependencies) {
	this.module = module;
	if (!NGComponentType[type.toUpperCase()]) {
		throw 'Invalid component type: ' + type;
	}
	this.type = type;
	this.name = name;
	this.dependencies = dependencies;
}

Fix bug with valid component detection
Fix bug with valid component detection
