Reputation: 7436
I am having a angular library in npm repo. Installed that library in another angular application.
Do we have any direct options to bootstrap the remote angular library from the main project? Need to initialize the routing, NgRx stores etc... from the angular library
Upvotes: 1
Views: 28
Reputation: 57521
You have to export all the initialization code first, that you want to call from the main application.
Then add these exports to the public.api.ts
export * from './example-data';
// The example-module file will be auto-generated. As soon as the
// examples are being compiled, the module file will be generated.
export * from './example-module';
After this is done, call the initialization code in the application and it should work as intended. Since no code is provided, please try this suggestion.
Upvotes: 0