A novice to angular6.x, recently encountered the following questions in the process of using. Do you have any familiar gods to share your experience
- how multiple components share a state in angular? Flux architecture can be used in vue, etc. Official libraries such as (VUEX), how to sibling components in angular, or data sharing between parent components and grandchildren components (excluding intermediate components for forwarding) feel poor scalability and difficult to maintain. )
- how should service services be understood in angular? Personal feeling is very similar to mixins, in vue is a common method, import registration in the component can be used, and different components into the same service will not share data.
- angualr projects are bound to face multi-component sharing in medium-to large-scale projects, so what should be done in medium-and large-scale projects? Or what kind of programs do you all adopt
- what is the best way to deal with authentication in routing? For example, if you are not logged in, you cannot enter some pages. If you can, you would like to provide the corresponding demo .