0.1300.1 • Published 3 years ago

@mmuscat/angular-error-boundary v0.1300.1

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

Angular Error Boundary

Error Boundaries for Angular, with a bit of Suspense. Click here to Learn More

Quick Start

Install via NPM

npm install @mmuscat/angular-error-boundary

Install via Yarn

yarn add @mmuscat/angular-error-boundary

Add BoundaryModule to your NgModule imports to enable error boundaries.

my.module.ts

@NgModule({
    imports: [BoundaryModule],
    declarations: [MyComponent],
    ...
})
export class MyModule {}

Add error boundaries to your components.

my.component.html

<error-boundary>
   <ng-template>
      <my-widget></my-widget>
   </ng-template>
   <fallback>Something went wrong</fallback>
</error-boundary>