/flashcard-angular2

A simple Angular2 app to help with learning new words. It's a front-end for flashcard-rails.

Primary LanguageJavaScriptMIT LicenseMIT

Flashcard Angular2

This repo contains a simple app created with Angular2. I used boilerplate: Angular 2 Starter. The backend for this app is delivered by a Rails application published in my repository flashcard-rails. For correctly working flashcard-angular2 app you must before sign-in in the rails app. This angular app using browser cookie to identify a session in rails backend. If you want to know how deal with Rails, Angular and OAuth2 feel free to check academic project eKRK, developed with my friends.

App can show your groups, flashcards and take a quiz with your flashcards.

Online version

You can check this app in action here.

Development information

For start app locally type: npm start. In order to run specs type: npm test

For usefully information I keep below README from Angular 2 Starter.

Angular 2 Starter

Build Status Build status Coverage Status Dependency Status devDependency Status Dependency Status

Live Production Build Demo

Introduction

Welcome to Angular 2 Starter! This starter contains almost everything you need to start developing Angular 2.

Why choose this starter?

  • Extensible via ngstarter extensions
  • Complete workflow from serve, lint, unit test, e2e test, to bundling
  • Support file-based and strong-typed Environment Variables
  • 100% code coverage
  • 100% CI/CD pipeline ready
  • No global package installation
  • No module bundler coupling

What's included?

Please visit the wiki for more details.

Prerequisites

You need to have Node.js and npm

  • Support Node v4 - latest
  • Support npm v3 - latest

Global Gulp CLI is not required, since you can map them to npm scripts, but a nice to have for development purpose.

Installation

Download the starter from releases page

Go to the starter directory and install the packages:

npm install

Start

Let's start up the server, run:

npm start

and done! The browser will popup and you can start trying Angular 2! Every changes to the file will refresh the browser automatically and it'll also compile your changed TypeScripts files to Javascript files.

Testing

This starter comes with testing gulp workflow

Unit testing

Just run

npm test

and it'll compile all TypeScript files, start Karma, then remap Istanbul coverage so that it shows TypeScript coverage, not the transpiled JavaScript coverage.

Coverage result

E2E testing

Firstly start the server:

npm start

To begin testing, run:

npm run e2e

and it'll compile all E2E spec files in /src/test/e2e/*.spec.ts, boot up Selenium server then launches Chrome browser.

Production

All build tasks will run the gulp test, the bundle will only be created if the test passed.

For more details, visit Continuous Integration wiki

You can create production build by running:

npm run build

or you can create production build and then serve it using Browsersync by running:

npm run serve-build

The starter defaults to bundle using SystemJS Builder extension. There is Webpack extension available too, feel free to swap it as you like.

Extension

You can extend this starter with many extensions built by the community. Browse the extensions here

Contributing

Feel free to submit a PR if there are any issues or new features, please read this before

Special thanks

License

MIT