|
var _createDecoratedClass = (function () { |
|
function defineProperties(target, descriptors, initializers) { |
|
for (var i = 0; i < descriptors.length; i++) { |
|
var descriptor = descriptors[i]; |
|
var decorators = descriptor.decorators; |
|
var key = descriptor.key; |
|
delete descriptor.key; |
|
delete descriptor.decorators; |
|
descriptor.enumerable = descriptor.enumerable || false; |
|
descriptor.configurable = true; |
|
if ('value' in descriptor || descriptor.initializer) descriptor.writable = true; |
|
if (decorators) { |
|
for (var f = 0; f < decorators.length; f++) { |
|
var decorator = decorators[f]; |
|
if (typeof decorator === 'function') { |
|
descriptor = decorator(target, key, descriptor) || descriptor; |
|
} else { |
|
throw new TypeError('The decorator for method ' + descriptor.key + ' is of the invalid type ' + typeof decorator); |
|
} |
|
} |
|
if (descriptor.initializer !== undefined) { |
|
initializers[key] = descriptor; |
|
continue; |
|
} |
|
} |
|
Object.defineProperty(target, key, descriptor); |
|
} |
|
} |
|
return function (Constructor, protoProps, staticProps, protoInitializers, staticInitializers) { |
|
if (protoProps) defineProperties(Constructor.prototype, protoProps, protoInitializers); |
|
if (staticProps) defineProperties(Constructor, staticProps, staticInitializers); |
|
return Constructor; |
|
}; |
|
})(); |
|
|
|
function _defineDecoratedPropertyDescriptor(target, key, descriptors) { |
|
var _descriptor = descriptors[key]; |
|
if (!_descriptor) return; |
|
var descriptor = {}; |
|
for (var _key in _descriptor) descriptor[_key] = _descriptor[_key]; |
|
descriptor.value = descriptor.initializer ? descriptor.initializer.call(target) : undefined; |
|
Object.defineProperty(target, key, descriptor); |
|
} |
|
|
|
var Linker = (function () { |
|
var _instanceInitializers = {}; |
|
|
|
_createDecoratedClass(Linker, [{ |
|
key: 'name', |
|
decorators: [(0, _angular2Angular2.Input)()], |
|
initializer: null, |
|
enumerable: true |
|
}, { |
|
key: 'url', |
|
decorators: [(0, _angular2Angular2.Input)()], |
|
initializer: null, |
|
enumerable: true |
|
}], null, _instanceInitializers); |
|
|
|
function Linker() { |
|
_classCallCheck(this, _Linker); |
|
|
|
_defineDecoratedPropertyDescriptor(this, 'name', _instanceInitializers); |
|
|
|
_defineDecoratedPropertyDescriptor(this, 'url', _instanceInitializers); |
|
} |
|
|
|
var _Linker = Linker; |
|
Linker = (0, _angular2Angular2.View)({ |
|
template: '<p><a [href]="url" [title]="name">{{ name }}</a></p>' |
|
})(Linker) || Linker; |
|
Linker = (0, _angular2Angular2.Component)({ |
|
selector: 'linker' |
|
// inputs: ['name', 'url'] |
|
})(Linker) || Linker; |
|
return Linker; |
|
})(); |