Code Monkey home page Code Monkey logo

starter-quizz-2022's Introduction

Starter Quiz

Installation

  1. Install NodeJS Installer

Note, for those using linux, you can find instruction to install NodeJS here (install the latest LTS Version 14.15.4).

  1. Fork this repository

Click on the fork button on the page of the repository on github to create your own copy of the starter.

  1. Clone your repository, your fork
git clone https://github.com/YOUR_USERNAME/starter-quiz-2022.git
  1. Install the dependencies

Open command prompt inside the repository (starter-quiz-2022) and run:

npm install

If you have an error saying that npm is not a known command, it means that NodeJS is not installed.

  1. Install angular/cli
npm install -g @angular/cli

Run the app

npm start

Then navigate to http://localhost:4200/ to see the application. The app will automatically reload if you change any of the source files.

You can also use the command ng serve to start the app and also ng serve --open to open directly the app in the browser.

Run the linter

The linter is a tool which automatically detects static code issues (such as unused imports or variables, trailing whitespaces etc...).

To run it:

npm run lint

If you get an error saying that Missing script: "lint", then you can run : ng lint. Then, you should be able to run the linter. Note: for this project, we will disable a rule from the default linter, edit your .eslintrc.json to disable the rule "@angular-eslint/no-empty-lifecycle-method": "off", edit the "rules" array as follow:

 "rules": {
        "@angular-eslint/no-empty-lifecycle-method": "off",
        "@angular-eslint/directive-selector": [
          "error",
          {
            "type": "attribute",
            "prefix": "app",
            "style": "camelCase"
          }
        ],
        "@angular-eslint/component-selector": [
          "error",
          {
            "type": "element",
            "prefix": "app",
            "style": "kebab-case"
          }
        ]
      }

Several issues from the linter can be fixed automatically (for instance: trailing whitespace, missing new line etc...) thanks to the following command:

npm run lint -- --fix

But you will have to manually manage the other types of error.

Angular documentation

The best documentation is the Official Angular Documentation. It contains everything and it is always up to date.

Important note

We are working with Angular version 2+ (here Angular 8). When you look for some documentation, add "Angular 2" in your research to be sure to find the right documentation. You might find documentation about AngularJS, run if it's the case! It's a very old version totally different from our version.

Documentation - Links

Documentation Angular:

Documentation on Observables:

Questions?

Any question? Do not hesitate to contact us on slack for any question.

Additional commands available

Code scaffolding

Run ng generate component component-name to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module.

starter-quizz-2022's People

Contributors

nablat 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.