The properties and methods of this object need to be accessible to components in any module
Simply create the corresponding component in ShareModule.
ShareModule
Use the service, please note that the service must be registered in the root module
You can use services or local storage
It’s more convenient to use the service.
Use the run method to define a $rootScope.aa = 1; then you can get $rootScope.aa from other places
Simply create the corresponding component in
ShareModule
.Use the service, please note that the service must be registered in the root module
You can use services or local storage
It’s more convenient to use the service.
Use the run method to define a $rootScope.aa = 1; then you can get $rootScope.aa from other places