#API Reference
Exact signatures, attributes and options for every AngularLynx package and element. To learn a feature step by step, start with the Guide.
#Packages
| Package | Reference | What it covers |
|---|---|---|
@blotch/angular-lynx | Package overview | The runtime: bootstrap, routing, elements, animation and services |
@blotch/angular-lynx | Schematics | ng add, ng generate component and the other schematics |
@blotch/angular-lynx-build | Builders | The builders behind ng build, ng serve and ng test |
@blotch/angular-lynx-testing-library | Testing library | render(), events and queries for component tests |
@blotch/angular-lynx-testing-library | Event reference | Every fireEvent method and the template binding it runs |
#Runtime
#App setup and UI
| Page | What it covers |
|---|---|
| Bootstrap | bootstrapApplication, provideRenderer, loadLazyBundle |
| Routing | provideRouter, the stack and tab outlets, and the location classes |
| Elements | LYNX_ELEMENTS, every element directive, form value accessors |
| Element events | $event's types, pointer events and each element's own events |
| Animation | animate(), <lynx-transition>, <lynx-transition-group> |
| Accessibility | LynxAccessibility and the accessibility-* attributes |
| Fonts | LynxFont: load fonts at runtime |
| Portal | LynxPortal: open overlays from code |
| Exposure | LynxExposure, LynxGlobalExposure and the exposure-* attributes |
| Text measure | LynxTextMeasure: text width and line breaks |
#Device
| Page | What it covers |
|---|---|
| Theme | LynxTheme: light or dark appearance |
| Safe area | LynxSafeArea and the SAFE_AREA_INSET_* constants |
| Viewport | LynxViewport: the page's and the window's size, following a fold |
| Locale | LynxLocale, provideLocale, getLynxAppLocale |
| System info | LynxSystemInfo: platform and screen size |
| App state | LynxAppState: whether the app is in the foreground |
| Network | LynxNetwork: whether the phone is online |
| Clipboard | LynxClipboard: copy and paste text |
| Haptics | LynxHaptics: tap the phone, as native controls do |
#Hardware
| Page | What it covers |
|---|---|
| Bluetooth | LynxBluetooth: find Bluetooth LE devices and talk to them |
| NFC | LynxNfc: read and write NFC tags |
| Geolocation | LynxGeolocation: find where the phone is, once or as it moves |
| Motion | LynxMotion: read the motion sensors and compass, and hear a shake |
| Biometrics | LynxBiometrics: confirm the person with Face ID or a fingerprint |
| Barcode scanner | LynxBarcodeScanner: read a QR code or a barcode with the camera |
| Audio player | LynxAudioPlayer: play audio, on the lock screen and in the background |
| Audio recorder | LynxAudioRecorder: record audio from the microphone |
| Wi-Fi | LynxWifi: read the phone's Wi-Fi network and join another, to set up a device |
#Media
| Page | What it covers |
|---|---|
| Image picker | LynxImagePicker: let someone pick a photo |
| Photo library | LynxPhotoLibrary: save an image or a video to the photo library |
| File picker | LynxFilePicker: let someone pick a document, or save a file |
| Contacts | LynxContacts: pick a contact, a number or an address, or read the address book |
| Calendar | LynxCalendar: add an event to the person's calendar |
#Sharing and links
| Page | What it covers |
|---|---|
| Share | LynxShare: open the share sheet to send files and links, or save a photo |
| Share target | LynxShareTarget: receive what other apps share to the app |
| Linking | LynxLinking: open links in the browser, a browser sheet or another app |
| Shortcuts | LynxShortcuts: hear the shortcuts run from Siri or the app icon's menu |
#Accounts
| Page | What it covers |
|---|---|
| Web auth session | LynxWebAuthSession: sign in through a web page |
| Sign in with Apple | LynxAppleSignIn: sign in with Apple's own sheet on iOS |
| Store review | LynxStoreReview: ask for an App Store or Google Play rating in the app |
| Tracking | LynxTracking: ask whether the app may track, for ads and attribution |
#Host app
| Page | What it covers |
|---|---|
| Host data | LynxInitData, LynxGlobalData, registerDataProcessors |
| Native module | LynxNativeModule: call the host app's native code |
| Back button | LynxBackButton: hear Android's back button and back gesture |
| Splash screen | LynxSplashScreen: keep the splash screen up until the app is ready |
| reportFullyDrawn | reportFullyDrawn(): tell the phone the first screen is usable |
#Storage, network and debugging
| Page | What it covers |
|---|---|
| Persistent storage | LynxLocalStorage, LynxSecureStorage: data kept after the app closes |
| Session storage | LynxSessionStorage: state shared between pages |
| Resource prefetch | LynxResourcePrefetch: preload images and videos |
| Errors and logging | LynxErrorHandler, LynxLogger |
| DevTools | LynxDevTools, LynxPerformance |
#Gestures
| Page | What it covers |
|---|---|
| Gestures | The [lynxGesture] directive and composing gestures |
| Gesture types | Tap, pan, fling, long press, pinch and rotation: options and events |
| Gesture lifecycle | Gesture states, callbacks and GestureStateManager |
#Main-thread scripts
Code that runs on the main thread, right inside native events. Read Main-thread scripts first.
| Page | What it covers |
|---|---|
mainThreadFn | Define a function that runs on the main thread |
LynxMainThreadEvent | Bind main-thread functions to native events |
MainThreadRef | Keep a value between main-thread script calls |
LynxMainThread | Call a main-thread function from Angular code |
backgroundFn | Call background-thread code from the main thread |
#Elements
The native elements your templates use instead of HTML. See Elements and layout for how they compare with HTML.
| Element | Use it for |
|---|---|
<view> | Layout and grouping, like <div> |
<text> | All visible text |
<image> | Local and remote images |
<scroll-view> | A scrolling area |
<list> | Long lists that render only the visible rows |
<refresh> | Pull to refresh |
<scroll-coordinator> | Collapsing headers and sticky toolbars |
<viewpager> | Pages you swipe between |
<input> | Single-line text input |
<textarea> | Multi-line text input |
<overlay> | Content above the page, such as dialogs |
<frame> | Another Lynx bundle inside this page |
<block> | Grouping without a layout box, like <ng-container> |
<svg> | SVG graphics |
<canvas> | 2D drawing, and 3D with WebGL2 for three.js |
<blur-view> | Frosted, blurred backgrounds |
<video> | Video playback |
<webview> | Web pages inside your app |
<apple-sign-in-button> | The button that starts Sign in with Apple |
<title-bar-view> | The draggable area of a desktop window's title bar |
<cover-view> | Content that draws above a desktop <webview> |
