Giter VIP home page Giter VIP logo

angular2-hn's Introduction

Angular 2 HN

A progressive Hacker News client built with Angular

View App

PRs Welcome Build Status


Fast: Uses a Service Worker App Shell + dynamic content model to achieve faster load times with and without a network

Responsive: Completely responsive UI that can be installed to your mobile home screen to provide a native feel regardless of which device you use.

Progressive: Lighthouse score of 99/100.

Mobile Preview

Laptop Preview

Offline Support

This app uses a Service Worker to load quickly and work offline.

  • sw-precache is used to serve local static resources (App Shell) cache first.
  • sw-toolbox is used to handle requests using the networkFirst strategy. If a request fails, the app will fulfill the request from the cache. This means previously loaded pages will now work offline.

Manifest

With Chromium based browsers for Android (Chrome, Opera, etc...), Angular 2 HN includes a Web App Manifest that allows you to install to your homescreen.

Possible areas of improvement

  • Realtime updating
  • Server side rendering (Angular Universal) to allow for a functional app with JS disabled

Feel free to send me feedback on twitter or file an issue! Feature requests are always welcome.

Build process

  • Clone or download the repo
  • If you don't have Angular CLI installed: npm install -g angular-cli@latest
  • ng init
  • Input n for each file to not overwrite any file changes
  • ng serve will kick off the server at http://localhost:4200/. Any changes you do to the source files should automatically reload the app
  • ng serve --prod --aot will kick off a production build with uglifying, tree-shaking and Ahead-of-Time compilation

Click here to see a full list of what you can do with Angular CLI.

Note: Any Service Worker changes will not be reflected when you run the application locally in development. To test service worker changes:

  • ng build --prod --aot to kick off a fresh build and update the dist/ directory
  • npm run precache to generate the service worker file
  • npm run static-serve to load the application along with the service worker asset using live-server

Contributors

A million thanks to some awesome people :)

angular2-hn's People

Contributors

angular-cli avatar bbrks avatar beeman avatar blackpr avatar mateuszwitkowski avatar zachberger avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.