ng-lazy-load-component
Advanced tools
Comparing version 15.0.4 to 15.0.5
@@ -13,2 +13,3 @@ import { Injector, Type, ComponentRef, EventEmitter, OnDestroy, OnChanges, SimpleChanges, ChangeDetectorRef } from '@angular/core'; | ||
}; | ||
export declare type NgLazyLoadComponentInput<T = Record<string, any>, P extends keyof T = keyof T> = T[P]; | ||
export declare class NgLazyLoadComponentComponent implements OnDestroy, OnChanges { | ||
@@ -15,0 +16,0 @@ private injector; |
{ | ||
"name": "ng-lazy-load-component", | ||
"version": "15.0.4", | ||
"version": "15.0.5", | ||
"description": "Lazy load Angular component into HTML template without routing.", | ||
@@ -5,0 +5,0 @@ "repository": { |
@@ -92,3 +92,3 @@ # NgLazyLoadComponent [![Build Status](https://app.travis-ci.com/nigrosimone/ng-lazy-load-component.svg?branch=main)](https://app.travis-ci.com/nigrosimone/ng-lazy-load-component) [![Coverage Status](https://coveralls.io/repos/github/nigrosimone/ng-lazy-load-component/badge.svg?branch=main)](https://coveralls.io/github/nigrosimone/ng-lazy-load-component?branch=main) [![NPM version](https://img.shields.io/npm/v/ng-lazy-load-component.svg)](https://www.npmjs.com/package/ng-lazy-load-component) | ||
import { Component } from '@angular/core'; | ||
import { NgLazyLoadComponentImporter, NgLazyLoadComponentOutput } from 'ng-lazy-load-component'; | ||
import { NgLazyLoadComponentImporter, NgLazyLoadComponentOutput, NgLazyLoadComponentInput } from 'ng-lazy-load-component'; | ||
// import ONLY type definition of the component | ||
@@ -111,4 +111,5 @@ import type { TestLazyComponent } from './test-lazy'; | ||
export class AppComponent { | ||
public testInput1 = 0; // test-lazy component `@Input() testInput1` | ||
public testInput2 = 0; // test-lazy component `@Input() testInput2` | ||
// NgLazyLoadComponentInput force Input type casting between ng-lazy-load-component and lazy loaded component | ||
public testInput1: NgLazyLoadComponentInput<TestLazyComponent, 'testInput1'> = 0; // bind with test-lazy component `@Input() testInput1` | ||
public testInput2: NgLazyLoadComponentInput<TestLazyComponent, 'testInput2'> = 0; // bind with test-lazy component `@Input() testInput2` | ||
@@ -121,3 +122,6 @@ /** Lazy load the component with `import()` */ | ||
/** test-lazy component outputs: `@Output() testOutput1` and `@Output() testOutput2` */ | ||
/** | ||
* test-lazy component outputs: `@Output() testOutput1` and `@Output() testOutput2` | ||
* NgLazyLoadComponentOutput force Output type casting between ng-lazy-load-component and lazy loaded component | ||
*/ | ||
onComponentOutput(event: NgLazyLoadComponentOutput<TestLazyComponent>) { | ||
@@ -124,0 +128,0 @@ switch (event.property) { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
62118
455
150