1 | "use strict";
|
2 | var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
3 | var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
4 | if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
5 | else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
6 | return c > 3 && r && Object.defineProperty(target, key, r), r;
|
7 | };
|
8 | var __metadata = (this && this.__metadata) || function (k, v) {
|
9 | if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
10 | };
|
11 | var core_1 = require('@angular/core');
|
12 | var TestComponent = (function () {
|
13 | function TestComponent() {
|
14 | this.hostprop = 'clicked it';
|
15 | }
|
16 | TestComponent.prototype.clicked = function () {
|
17 | console.log(this.hostprop);
|
18 | };
|
19 | TestComponent = __decorate([
|
20 | core_1.Component({
|
21 | selector: 'test',
|
22 | template: "<div>\n <p>test component</p>\n </div>"
|
23 | }),
|
24 | __metadata('design:paramtypes', [])
|
25 | ], TestComponent);
|
26 | return TestComponent;
|
27 | }());
|
28 | exports.TestComponent = TestComponent;
|
29 | var AppComponent = (function () {
|
30 | function AppComponent() {
|
31 | this.testComponent = TestComponent;
|
32 | this.template1 = "<p (click)=\"clicked()\">the new template</p>";
|
33 | this.template2 = "<p (click)=\"clicked()\">the newer template</p>";
|
34 | }
|
35 | AppComponent = __decorate([
|
36 | core_1.Component({
|
37 | selector: 'app',
|
38 | template: "<div>\n <templation [component]=\"testComponent\" [template]=\"template1\" ></templation>\n <templation [component]=\"testComponent\" [template]=\"template2\" ></templation>\n </div>"
|
39 | }),
|
40 | __metadata('design:paramtypes', [])
|
41 | ], AppComponent);
|
42 | return AppComponent;
|
43 | }());
|
44 | exports.AppComponent = AppComponent;
|
45 |
|
\ | No newline at end of file |