/
githubmirror
/
angular
Обзор
Документация
Войти
/
githubmirror
/
angular
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
devtools/src/app/demo-app/heavy.component.ts
43 строки
813 B
Sheik Althaf
refactor(devtools): removed standalone: true (#58922)
27 ноя 2024, 20:09
27 ноя 2024, 20:09
96c90a5
Код
Авторство
О чём код?
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ import {Component, input} from '@angular/core'; const fib = (n: number): number => { if (n === 1 || n === 2) { return 1; } return fib(n - 1) + fib(n - 2); }; @Component({ selector: 'app-heavy', templateUrl: './heavy.component.html', styleUrls: ['./heavy.component.scss'], }) export class HeavyComponent { readonly foo = input(); state = { nested: { props: { foo: 1, bar: 2, }, [Symbol(3)](): number { return 1.618; }, get foo(): number { return 42; }, }, }; calculate(): number { return fib(15); } }