GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - angular-extensions/elements: Lazy load Angular Elements (or any other web components / custom elements ) with ease!

BranchesTags
Open more actions menu

Latest commit

 

History

404 Commits
404 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
projects
projects
 
 
.all-contributorsrc
.all-contributorsrc
 
 
.editorconfig
.editorconfig
 
 
.gitignore
.gitignore
 
 
.npmrc
.npmrc
 
 
.nvmrc
.nvmrc
 
 
.prettierrc
.prettierrc
 
 
.travis.yml
.travis.yml
 
 
CHANGELOG.md
CHANGELOG.md
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
angular.json
angular.json
 
 
dep-graph.png
dep-graph.png
 
 
eslint.config.js
eslint.config.js
 
 
package-lock.json
package-lock.json
 
 
package.json
package.json
 
 
sync-contributors.js
sync-contributors.js
 
 
sync-versions.js
sync-versions.js
 
 
tsconfig.json
tsconfig.json
 
 

Repository files navigation

ANGULAR EXTENSIONS ELEMENTS

The easiest way to lazy-load Angular Elements or any other web components in your Angular application!

by @tomastrajan

npm npm npm Build Status codecov Conventional Commits Twitter Follow

Documentation

  • Docs
  • Getting started
  • Use cases
  • FAQ
  • API
  • Examples
  • Blog post
  • Meetup presentation (video)

Quickstart

  1. Install npm i @angular-extensions/elements
  2. Add import { LazyElementDirective } from '@angular-extensions/elements';
  3. Append LazyElementDirective to the imports: [] of your MyOrgComponent
  4. Add new schemas: [] property with CUSTOM_ELEMENTS_SCHEMA value to @Component decorator of your MyOrgComponent
  5. Use *axLazyElement directive on an element you wish to load and pass in the url of the element bundle

Example of component implementation

import { Component, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { LazyElementDirective } from '@angular-extensions/elements';

@Component({
  selector: 'your-org-feature',
  imports: [LazyElementDirective],
  schemas: [CUSTOM_ELEMENTS_SCHEMA],
  template: `
    <!-- will be lazy loaded and uses standard Angular template bindings -->
    <some-element
      *axLazyElement="elementUrl"
      [data]="data"
      (dataChange)="handleChange($event)"
    ></some-element>
  `,
})
export class MyOrgComponent {
  elementUrl = 'https://your-org.com/elements/some-element.js';

  data: SomeData;

  handleChange(change: Partial<SomeData>) {
    // ...
  }
}

Supported Angular versions

Library was tested with the following versions of Angular and is meant to be used with the corresponding major version ("@angular/core"": "^15.0.0" with "@angular-extensions/elements": "^15.0.0" ).

  • 9.x (full IVY support, using renderers so careful with SSR)
  • 8.x (partial IVY support, axLazyElement works but axLazyElementDynamic does NOT work with IVY)
  • 7.x
  • 6.x (eg npm i @angular-extensions/elements@^6.0.0)

Internal dep graph

Internal dep graph

Become a contributor

Missing a feature, found bug or typo in docs?

Please, feel free to open an issue or submit a pull request to make this project better for everyone! 🤗

Tomas Trajan
Tomas Trajan

💻 🎨 💡 📖 🤔 🚇 ⚠️
Artur Androsovych
Artur Androsovych

💻 🐛
Wayne Maurer
Wayne Maurer

🐛 💻
Santosh Yadav
Santosh Yadav

💻 📦
David Dal Busco
David Dal Busco

💻 💡
Zama Khan Mohammed
Zama Khan Mohammed

💻 🤔 ⚠️
Angel Fraga Parodi
Angel Fraga Parodi

💡 🤔
ye3i
ye3i

💻 🤔
Heorhi Shakanau
Heorhi Shakanau

💻 🤔
Felipe Plets
Felipe Plets

💻 🎨 💡 📖 🤔 ⚠️
jkubiszewski
jkubiszewski

💻
Heorhi Shakanau
Heorhi Shakanau

💻
NagornovAlex
NagornovAlex

💻
Joseph Davis
Joseph Davis

💻
Arooba Shahoor
Arooba Shahoor

💻
Maximilian Wright
Maximilian Wright

📖
Jakub Stawiarski
Jakub Stawiarski

💻
Paweł Kubiak
Paweł Kubiak

💻
Egor Volvachev
Egor Volvachev

💻
Daniel Bou
Daniel Bou

💻

Sponsors

Are you currently working in an enterprise polyrepo environment with many applications and found yourself thinking you could provide so much more value only if you had better overview to plan, track progress and just get things done?

Try Omniboard, the best tool for lead software engineers and architects that helps them to get an overview to drive change in enterprise polyrepo environments by querying and tracking all their code bases!

The free plan let's you get a full overview of all your projects with your first dashboard, tracking up to 3 different things!

Omniboard.dev - getting started in less than 5 minutes

About

Lazy load Angular Elements (or any other web components / custom elements ) with ease!

angular-extensions.github.io/elements/

Topics

angularangular-elementscustom-elementslazy-loadingmicro-frontendsmicrofrontendsweb-components

Resources

Readme
MIT license
Activity
Custom properties

Stars

321 stars

Watchers

8 watching

Forks

41 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.