Learning Angular
Coming from Java background and start coding in JavaScript seriously for the first time, well, not the first if previous work with Express.js counts, I do appreciate the convenience and new concepts Angular gives me. And after all, this simple blog app that shows Markdown format of user post in HTML, and the end of struggle of various errors/bugs are worth celebrating.
Here’s what I did:
- Implement back-end server with Express and MongoDB
- Build REST-ful API for blog post access, auth with JWT in cookies
- Develop front-end components of blog list, edit, and preview as Single Page App
- Enhance visual effects with CSS and deliver a modern look
- Test and debug with e2e UI testing
Here are the challenges I encountered:
- Observables, Subjects are Rxjs modules that are handy, but require some learning
- Sometimes the component (controller) and view inconsistency is annoying
There was a bug that’s nagging me for days, and it’s a simple mistake that providers declaration in a component creates a new service apart from the one in root. So there are two service running in the background. The debugging was painstaking and took two days. And it made me have a deeper understanding of JavaScript reference, and the break of which led me to the finding of the bug.
Published on November 26, 2018