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

PackageReferenceWhat it covers
@blotch/angular-lynxPackage overviewThe runtime: bootstrap, routing, elements, animation and services
@blotch/angular-lynxSchematicsng add, ng generate component and the other schematics
@blotch/angular-lynx-buildBuildersThe builders behind ng build, ng serve and ng test
@blotch/angular-lynx-testing-libraryTesting libraryrender(), events and queries for component tests
@blotch/angular-lynx-testing-libraryEvent referenceEvery fireEvent method and the template binding it runs

Runtime

PageWhat it covers
BootstrapbootstrapApplication, provideRenderer, loadLazyBundle
RoutingprovideRouter and the in-memory location classes
ElementsLYNX_ELEMENTS, every element directive, form value accessors
Animationanimate(), <lynx-transition>, <lynx-transition-group>
AccessibilityLynxAccessibility and the accessibility-* attributes
ThemeLynxTheme: light or dark appearance
Safe areaLynxSafeArea and the SAFE_AREA_INSET_* constants
LocaleLynxLocale, provideLocale, getLynxAppLocale
FontsLynxFont: load fonts at runtime
PortalLynxPortal: open overlays from code
ExposureLynxExposure, LynxGlobalExposure and the exposure-* attributes
Host dataLynxInitData, LynxGlobalData, registerDataProcessors
Session storageLynxSessionStorage: state shared between pages
Text measureLynxTextMeasure: text width and line breaks
System infoLynxSystemInfo: platform and screen size
Resource prefetchLynxResourcePrefetch: preload images and videos
Native moduleLynxNativeModule: call the host app's native code
Errors and loggingLynxErrorHandler, LynxLogger
DevToolsLynxDevTools, LynxPerformance

Gestures

PageWhat it covers
GesturesThe [lynxGesture] directive and composing gestures
Gesture typesTap, pan, fling, long press, pinch and rotation: options and events
Gesture lifecycleGesture states, callbacks and GestureStateManager

Main-thread scripts

Code that runs on the main thread, right inside native events. Read Main-thread scripts first.

PageWhat it covers
mainThreadFnDefine a function that runs on the main thread
LynxMainThreadEventBind main-thread functions to native events
MainThreadRefKeep a value between main-thread script calls
LynxMainThreadCall a main-thread function from Angular code
backgroundFnCall 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.

ElementUse 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>