@pure-tools/mobilka
v0.3.1
Published
Pluggable responsive/device-detection and Capacitor native bridge for Angular apps
Maintainers
Readme
@pure-tools/mobilka
Device detection for Angular apps — signals, directives, pipe.
Detects: mobile · tablet · desktop
Install
npm install @pure-tools/mobilkaSetup
// app.config.ts
import { provideResponsive } from '@pure-tools/mobilka';
provideResponsive({
strategy: 'combination', // 'screen-size' | 'user-agent' | 'combination'
})Usage
mobile = inject(MobileService);
mobile.isMobile // Signal<boolean>
mobile.isTablet // Signal<boolean>
mobile.isDesktop // Signal<boolean><div *mobileOnly>mobile only</div>
<div *desktopOnly>desktop only</div>
{{ { mobile: 'small', desktop: 'large' } | responsive }}Notes
- Default breakpoints: mobile 768px, tablet 1024px
- Use
combinationstrategy for SSR apps
