ઇમ્પોર્ટ

import-toast.ts
import { NuiToaster, NuiToasterRegion } from '@needless-ui/angular/toast';

NuiToaster

ટોસ્ટ બતાવતી સર્વિસ. તેને ગમે ત્યાં ઇન્જેક્ટ કરો.

સિલેક્ટર
inject(NuiToaster)
NuiToaster: પ્રોપર્ટીઝ
નામપ્રકારડિફૉલ્ટવર્ણન
toastsમેથડSignal<readonly NuiToast[]>સ્ક્રીન પરના બધા ટોસ્ટ, સૌથી નવો પહેલાં.
showમેથડ(options: NuiToastOptions | string) => NuiToastRefટોસ્ટ બતાવે છે. શીર્ષક આપો, અથવા વર્ણન, ટોન, અવધિ, ક્રિયા કે id સાથેના વિકલ્પો.
successમેથડ(title, options?) => NuiToastRefસફળતાનો ટોસ્ટ બતાવે છે.
warningમેથડ(title, options?) => NuiToastRefચેતવણીનો ટોસ્ટ બતાવે છે.
dangerમેથડ(title, options?) => NuiToastRefજોખમનો ટોસ્ટ બતાવે છે. તે 8 સેકન્ડ રહે છે અને પ્રાથમિકતાથી જાહેર થાય છે.
promiseમેથડ(promise, messages) => Promiseપ્રૉમિસ પૂરું થાય ત્યાં સુધી લોડિંગ ટોસ્ટ બતાવે છે, પછી તેનો સફળતા કે જોખમનો સંદેશ.
dismissમેથડ(id?: string) => voidએક ટોસ્ટને, અથવા બધાને દૂર કરે છે.

NuiToasterRegion

જ્યાં ટોસ્ટ દેખાય છે તે વિસ્તાર. તેને ઍપ શેલમાં એક વાર મૂકો.

સિલેક્ટર
nui-toaster
NuiToasterRegion: પ્રોપર્ટીઝ
નામપ્રકારડિફૉલ્ટવર્ણન
positionઇનપુટ'top-start' | 'top-center' | 'top-end' | 'bottom-start' | 'bottom-center' | 'bottom-end''bottom-end'વ્યૂપોર્ટનો ખૂણો કે કિનારી. શરૂઆત અને અંત લખાણની દિશાને અનુસરે છે.
expandedઇનપુટbooleanfalseસ્ટૅકને ફેલાયેલો રાખે છે.
labelઇનપુટstring'Notifications (Alt+T)'વિસ્તારનું ઍક્સેસિબલ નામ. ત્યાં કેવી રીતે પહોંચવું તે તેમાં જણાવો.
closeLabelઇનપુટstring'Dismiss'બંધ કરવાનાં બટનોનું ઍક્સેસિબલ નામ.
hotkeyઇનપુટstring'KeyT'એ કી, KeyboardEvent.code તરીકે, જે Alt સાથે દબાવતાં ફોકસને સૌથી નવા ટોસ્ટ પર લઈ જાય છે.