Angular 1.5 is pretty much around the corner and with a new release, new fixes, improvements and features are added to the framework. While this is awesome and we’re all excited about it, it seems like we’re forgetting about all the nice things we already have.
Angular started off nice and easy. Magical, even. “Two-way binding! Wow!” And you trotted off and started building your masterpiece, until you hit a snag: you’re building standalone components like everyone online suggests, but how do you share data between those components? Maybe you have 2 views in separate routes that need access to some status variable. Or you have 3 separate components that all need access to the same piece of data. What’s the best way to share it? Some sort of crazy controller-inheritance scheme? No, of course not. The simple, easy way is to use a service.