diff --git a/docs/en/UI/Angular/Custom-Setting-Page.md b/docs/en/UI/Angular/Custom-Setting-Page.md index 6aa5d8a3cc..0f39c70f1a 100644 --- a/docs/en/UI/Angular/Custom-Setting-Page.md +++ b/docs/en/UI/Angular/Custom-Setting-Page.md @@ -43,4 +43,4 @@ Navigate to `/setting-management` route to see the changes: ## What's Next? -- [TrackByService](./Track-By-Service.md) +- [Lazy Loading Scripts & Styles](./Lazy-Load-Service.md) diff --git a/docs/en/UI/Angular/Lazy-Load-Service.md b/docs/en/UI/Angular/Lazy-Load-Service.md new file mode 100644 index 0000000000..cdfe3f8263 --- /dev/null +++ b/docs/en/UI/Angular/Lazy-Load-Service.md @@ -0,0 +1,136 @@ +# How to Lazy Load Scripts and Styles + +You can use the `LazyLoadService` in @abp/ng.core package in order to lazy loading scripts and styles in an easy and explicit way. + + + + +## Getting Started + +You do not have to provide the `LazyLoadService` at module or component level, because it is already **provided in root**. You can inject and start using it immediately in your components, directives, or services. + +```js +import { LazyLoadService } from '@abp/ng.core'; + +@Component({ + /* class metadata here */ +}) +class DemoComponent { + constructor(private lazyLoadService: LazyLoadService) {} +} +``` + + + + +## Usage + +You can use the `load` method of `LazyLoadService` to create a `