function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
sesha boddapatisesha boddapati 

How to include angular js with lwc

Hi All,
       Can you plaese help me this, How to include Angular js with Lwc..

Thanks, Sesha.
 
Piyush Sharma AppcinoPiyush Sharma Appcino
import { LightningElement } from 'lwc';
import { loadScript } from 'lightning/platformResourceLoader';
import AngularResource from '@salesforce/resourceUrl/AngularResource ';
export default class ContactsComponent extends LightningElement {
    renderedCallback() {
        Promise.all([
            loadScript(this, AngularResource )
        ])
            .then(() => {
                alert('Files loaded.');
            })
            .catch(error => {
                alert(error.body.message);
            });
    }  
}

In the above code, AngularResource is a static resource that contains angular.js file.