-
Notifications
You must be signed in to change notification settings - Fork 481
/
Copy path31001.efee0df487dbdbaa.js
1 lines (1 loc) · 1.59 KB
/
31001.efee0df487dbdbaa.js
1
(self.webpackChunkdemo=self.webpackChunkdemo||[]).push([[31001],{31001:n=>{n.exports="import {NgForOf} from '@angular/common';\nimport {Component, inject} from '@angular/core';\nimport {changeDetection} from '@demo/emulate/change-detection';\nimport {encapsulation} from '@demo/emulate/encapsulation';\nimport {TuiTabBar} from '@taiga-ui/addon-mobile';\nimport {TuiAlertService, TuiButton} from '@taiga-ui/core';\n\ninterface Item {\n badge?: number;\n icon: string;\n text: string;\n}\n\n@Component({\n standalone: true,\n exportAs: \"Example1\",\n selector: 'tui-tab-bar-example',\n imports: [NgForOf, TuiButton, TuiTabBar],\n templateUrl: './index.html',\n styleUrls: ['./index.less'],\n encapsulation,\n changeDetection,\n})\nexport default class Example {\n private readonly alerts = inject(TuiAlertService);\n\n protected activeItemIndex = 1;\n\n protected readonly items = [\n {\n text: 'Favorites',\n icon: '@tui.heart',\n badge: 3,\n },\n {\n text: 'Calls',\n icon: '@tui.phone',\n badge: 1234,\n },\n {\n text: 'Profile',\n icon: '@tui.user',\n },\n {\n text: 'Settings and configuration',\n icon: '@tui.settings',\n badge: 100,\n },\n {\n text: 'More',\n icon: '@tui.ellipsis',\n },\n ];\n\n protected onClick(item: Item): void {\n item.badge = 0;\n this.alerts.open(this.activeItemIndex, {label: item.text}).subscribe();\n }\n}\n"}}]);