Observables and Subscriptions In Angular

How To Create An Observable

ng new application-name
ng serve
Ignore the ‘Angular is running..’ and ‘[WDS] Live Reloading’ logs. They are not part of our blog and do not affect the observable demonstration
The error ends the subscription

A More Practical Example

ng generate component get-the-time
Be sure to include the .toString method in your Observable

Wrapping Up



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Aidan McBride

Aidan McBride

I ‘m a Web Developer and a Flatiron coding bootcamp alumni. I currently work in the financial tech industry as a Front End Engineer