Standalone vs module APIs
All main APIs have a standalone and an Angular module-based variant. However, standalone APIs are preferred and recommended. Given it's the current recommended approach to author Angular projects. Despite that, Angular module APIs are still here available to use if you prefer to do so.
Beware that you can use standalone APIs even if your Angular is still module-based. So you can migrate if you want at your own pace.
Angular module-based APIs use standalone APIs under the hood
So if you want to shave some bytes from your bundle size, going for standalone APIs is yet another reason to add to the list. As you'll remove from it the Angular module class overhead.
Equivalent APIs
Here's a table with the list of main APIs with its standalone and Angular-module variants
API | Standalone | Angular module |
---|---|---|
Core | provideNgxMetaCore |
NgxMetaCoreModule.forRoot |
Routing | provideNgxMetaRouting |
NgxMetaRoutingModule.forRoot |
JSON-LD Metadata | provideNgxMetaJsonLd |
NgxMetaJsonLdModule |
Open Graph Metadata | provideNgxMetaOpenGraph |
NgxMetaOpenGraphModule |
Open Graph Profile Metadata | provideNgxMetaOpenGraphProfile |
NgxMetaOpenGraphProfileModule |
Standard Metadata | provideNgxMetaStandard |
NgxMetaStandardModule |
Twitter Cards Metadata | provideNgxMetaTwitterCard |
NgxMetaTwitterCardModule |