1

I am looking to use Angular JS in Lightning Component.

Before starting it, just wanted to check if anyone has tried this implementation before.

Is it compatible to use angular js with lightning component? Which are those things need be considered before starting this implementation?

Thanks in advance :)

  • 2
    LC being an JS framework itself has many features angularjs covers. LC has its own DOM rendering mechanism like angularjs, so combining both might lead to race condition which eventually overwrite DOM written by the other. I'm not stating it can't be done, it needs to be carefully used so that above doesn't occur. With that said, I'm curious to know why would like to use angularjs inside LC? – Praveen Jun 8 '17 at 6:12
2

In addition to Praveen's comment, I read some information in the ISV checklist guide that basically says that external MV* frameworks are not supported and will fail security review. Even if you don't build an ISV package, I would be careful in using those two in conjunction until it is supported by Salesforce.

Use of third party MV* frameworks is not currently supported with Lightning. Any Lightning package that uses Angular or React or other third party DOM-based templating frameworks will automatically fail the security review until supported by the framework . In order to use another framework as part of a package that uses Lightning, please use an iframe or Visualforce container until approved Lightning containers are published.

0

I believe the new < lightning:container > element might be what we're all looking for:

https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/aura_compref_lightning_container.htm

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.