Skip to content

Latest commit

 

History

History
71 lines (51 loc) · 2.74 KB

README.md

File metadata and controls

71 lines (51 loc) · 2.74 KB

hn-ng2

Hacker News made with Angular 2.

I created this to see what it's like to create an AngularJS 2.0 application. I've previously experimented creating a Hacker News clone with AngularJS 1 so this was fun to play with.

Uses:

Made possible thanks to shuhei's work getting AngularJS 2 to work with webpack and babeljs. Thank you!

Also a lot of inspiration and example API usages taken from blacksonic's angular2-es6-todomvc and angular2-es6-starter.

Todo

  • Actually use Firebase's life updating and propogate those changes in the UI.
  • Dynamically load templates to achieve. Desire is to be able to do this: <div ng-include="'/components/hn-item/hn-item--' + (data.type || 'story') + '.html'" />
  • Pre-warm the template cache for production builds.
  • Create and register new pipes (filters) for components.
  • User angular-router 2 when it's available.
  • The angular2 equivalent for ng-bind-html
  • How to create same @Component properties keys and values. So that I can have:
    @Component({
      properties: {
        itemId: 'itemId',
      }
    })
  • Implement recursive <hn-items /> so we can render comment trees.

Develop

  1. npm install
  2. gulp watch
  3. Open http://localhost:8080/.

Build

  1. npm install && bower install
  2. gulp build

License

The MIT License

Copyright (c) 2015 Harry Wolff http://hswolff.com/

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.