Git Product home page Git Product logo

angular2-course-udemy's Introduction

Setting up the environment

  1. Install NodeJS from http://nodejs.org
  2. Open the terminal and install typescript module globally npm install -g typescript
  3. Install typings (for supporting normal JS libraries to be autocompleted in typescript) module globally npm install -g typings
  4. Install a good IDE (Pst... install VSCode http://code.visualstudio.com)

Quickstart

First, install all NPM dependencies. Go to the root of the project and type in terminal: npm install

Then, start the project node start

Folders and config files

app/

Container of our application

app/boot.ts

Startup or bootstrap file of our application

app/app.component.ts

Root component of our application

tsconfig.json

Configuration file for typescript compiler. How to compile/transpile our typescript to javascript file.

typings.json

This is the place where we refer typescript definition files.

When we use javascript libraries, we must import typescript definition file for static type checking and intelissense

package.json

Standard NodeJS dependency configuration

How the Typescript compiler works

For each typescript file, the compiler generates two more file.

One of them is the transpiled javascript file, which will be the file that is going to actually run on the browser.

The other is the .map file, which is used during debugging to relate a line in typescript to javascript.

Basics of Angular 2

All the building blocks of Angular 2 are essentially plain typescript files with some class annotations or decorators.

Example:

@Component({
    selector: 'my-app',
    template: `<h1>Hello Angular</h1>`
})
export class AppComponent {}

angular2-course-udemy's People

Contributors

andre-f-paggi avatar

Watchers

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