top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

What is the difference between ngModule vs moduleprovider in angular?

0 votes
367 views
What is the difference between ngModule vs moduleprovider in angular?
posted Jun 29, 2018 by anonymous

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

NgModules
NgModules configure the injector and the compiler and help organize related things together.
An NgModule is a class marked by the @NgModule decorator. @NgModule takes a metadata object that describes how to compile a component's template and how to create an injector at runtime.

ModuleProvider
When overridden in a derived class, gets the type of the module service that is associated with the module provider.

answer Jun 30, 2018 by Madhavi Latha
...