UNPKG

438 BPlain TextView Raw
1import { Component, OnInit } from '@angular/core';
2
3@Component({
4 selector: 'dcs-foo',
5 styleUrls: ['./foo.component.css'],
6 templateUrl: './foo.component.html'
7})
8export class FooComponent implements OnInit {
9 private bar: number = 42;
10
11 ngOnInit() {
12 console.log(this.argh);
13 }
14
15 get argh(): number {
16 return this.bar + 5;
17 }
18}
19
20export const ARGH: string = '41';
21
22export function fail() {
23 throw new Error('PANIC!!!');
24}