4 ms·
How I built a Hacker News client with Angular 2
- deleted 10y ago[deleted]
- MrAwesomeSauce 10y agoI built a Hacker News client with Angular 2 (https://angular2-hn.firebaseapp.com https://angular2-hn.firebaseapp.com) and shared it here a short while ago (https://news.ycombinator.com/item?id=12438119 https://news.ycombinator.com/item?id=12438119). Got some very useful feedback and thought it would be nice to write a post on how I built it. I go through building the entire app step by step from scratch solving each problem along the way. As always, I hope you find it useful and would appreciate any feedback.
- daveroberts 10y agoFails for me pretty early on: ng set defaults.styleExt scss Could not start watchman; falling back to NodeWatcher for file system events. Visit http://ember-cli.com/user-guide/#watchman http://ember-cli.com/user-guide/#watchman for more info. Cannot read property 'serialize' of undefined TypeError: Cannot read property 'serialize' of undefined I installed watchman and received the same error Looks like this has been reported elsewhere: https://github.com/angular/angular-cli/issues/1905 https://github.com/angular/angular-cli/issues/1905
- MrAwesomeSauce 10y agoYeah someone else mentioned they were seeing the same thing, weird I didn't see this issue at all. But he did solve it by just manually updating the value in angular-cli.json (https://github.com/angular/angular-cli/issues/1900 https://github.com/angular/angular-cli/issues/1900) so give that a shot if you haven't already. Put a note in my post in case anyone else experiences this issue.
- daveroberts 10y agoJust a minor point, but your first stories.component.html snippet doesn't include {{i}}, so the way it renders in the browser is different than your screenshot
- MrAwesomeSauce 10y agoOops, thanks for catching this. Just updated it.
- daveroberts 10y agoThere are some other issues for users trying to follow along. I hit my next snag from moment.js not being imported, and not having the filters domain, amFromUnix and amTimeAgo not being found. I see you addressed these points later on in your post notes, kind of as an "excercise left for the user". After that point, I just read the article and stopped trying to follow along. Perhaps it wasn't your intent to make a step-by-step type article, but I'm just sharing the experience I had trying to go along one step at a time. I appreciated the article, especially because right now we're starved for Angular 2 content, and there's not a lot out there yet.
- MrAwesomeSauce 10y agoThank you for this, this is exactly the kind of feedback I appreciate so much. It was my intention to have people follow along step by step, so I apologize for having some unnecessary complexity in the middle that sort of stopped you from following along. I'll try and update my post around this area to make it a little more streamlined. I felt like these points weren't really necessary to mention as I omit them once I begin to use the unofficial API. But my apologies, I should have addressed this better.