@angular-mobile/core
v0.1.2
Published
Núcleo do Angular Mobile Kit: configuração declarativa e providers.
Readme
@angular-mobile/core
Núcleo do Angular Mobile Kit. Fornece configuração declarativa e os providers para bootstrap.
Uso
import { bootstrapApplication } from '@angular/platform-browser';
import { defineMobileConfig, provideMobile } from '@angular-mobile/core';
import { AppComponent } from './app.component';
const mobileConfig = defineMobileConfig({
appName: 'Minha Lista',
offline: true,
sync: { strategy: 'background' },
native: { push: true, biometrics: true }
});
bootstrapApplication(AppComponent, {
providers: [provideMobile(mobileConfig)]
});API
defineMobileConfig(config)— apenas devolve o objeto tipado (satisfies-like helper).provideMobile(config)—EnvironmentProviderspara obootstrapApplication.MOBILE_CONFIG—InjectionToken<MobileConfig>para consumo via DI.MobilePlatform— service injetável; expõekind(signal) e helpersisNative/isWeb.
