Socket
Socket
Sign inDemoInstall

@angular-extensions/elements

Package Overview
Dependencies
5
Maintainers
2
Versions
63
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @angular-extensions/elements


Version published
Weekly downloads
11K
increased by17.98%
Maintainers
2
Install size
281 kB
Created
Weekly downloads
 

Changelog

Source

8.7.0 (2019-09-20)

Features

  • demo: add link to podcast discussing this library (7cc361b)
  • demo/api: document new configuration options (f849602)
  • demo/docs: update list of delivered vs upcoming features (d3c2c6b)
  • demo/examples: add examples showcasing new configuration options (c8a1556)
  • module: add additional configuration using forRoot and forFeature (afdaec7)

Readme

Source

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

Quickstart

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

Example of module implementation...

import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { LazyElementsModule } from '@angular-extensions/elements';

@NgModule({
  schemas: [CUSTOM_ELEMENTS_SCHEMA],
  imports: [BrowserModule, LazyElementsModule],
  declarations: [AppComponent, FeatureComponent],
  bootstrap: [AppComponent]
})
export class AppModule {}

Example of component implementation

import { Component } from '@angular/core';

@Component({
  selector: 'your-org-feature',
  template: `
    <some-element *axLazyElement="elementUrl"></some-element>
  `
})
export class FeatureComponent {
  elementUrl = 'https://your-org.com/elements/some-element.js';
}

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"": "^8.0.0" with "@angular-extensions/elements": "^8.0.0" ).

  • 7.x

  • 8.x

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

💻 🎨 💡 📖 🤔 🚇 ⚠️

Wayne Maurer

🐛 💻

Santosh Yadav

💻 📦

David Dal Busco

💻 💡

Zama Khan Mohammed

💻 🤔 ⚠️

Angel Fraga Parodi

💡 🤔

Keywords

FAQs

Last updated on 20 Sep 2019

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc