#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
| Page | What it covers |
|---|---|
| Bootstrap | bootstrapApplication, provideRenderer, loadLazyBundle |
| Routing | provideRouter and the in-memory location classes |
| Elements | LYNX_ELEMENTS, every element directive, form value accessors |
| Animation | animate(), <lynx-transition>, <lynx-transition-group> |
| Accessibility | LynxAccessibility and the accessibility-* attributes |
| Theme | LynxTheme: light or dark appearance |
| Safe area | LynxSafeArea and the SAFE_AREA_INSET_* constants |
| Locale | LynxLocale, provideLocale, getLynxAppLocale |
| Fonts | LynxFont: load fonts at runtime |
| Portal | LynxPortal: open overlays from code |
| Exposure | LynxExposure, LynxGlobalExposure and the exposure-* attributes |
| Host data | LynxInitData, LynxGlobalData, registerDataProcessors |
| Session storage | LynxSessionStorage: state shared between pages |
| Text measure | LynxTextMeasure: text width and line breaks |
| System info | LynxSystemInfo: platform and screen size |
| Resource prefetch | LynxResourcePrefetch: preload images and videos |
| Native module | LynxNativeModule: call the host app's native code |
| 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 |
<blur-view> | Frosted, blurred backgrounds |
<video> | Video playback |
<webview> | Web pages inside your app |
<title-bar-view> | The draggable area of a desktop window's title bar |
<cover-view> | Content that draws above a desktop <webview> |
