Coder Social home page Coder Social logo

agularjs2_first_config's Introduction

AgularJs2_first_config

Create a first config project using extension & package for AngularJs2 (initial project)

################## STEP TO STEP TO CREATE AN ANGULARJS 2 PROJECT ##################

create a new project AngularJs :

Next you need to follow this steps :

create index.html

touch index.html

create package.json with defaults

npm init --yes

install lite-server

npm install --save-dev lite-server

create the file "pakage.json" & execute the command

npm run lite

################## TYPESCRIPT ################## And now, we need to install the Typescript into you project NG-2.

Add this line in the tsconfig.json

"lib": ["es2015", "dom"]

Add this line in the script > package.json:

"start": "concurrently "npm run tsc:w" "npm run lite"",

install the typescript package

npm install --save-dev typescript @types/node @types/jasmine @types/core-js

configurate with the same tsconfig.json

################## Angular 2 : Dependencies ##################

To install the dependencies use :

npm install core-js reflect-metadata zone.js rxjs systemjs --save or use : npm install core-js reflect-metadata zone.js [email protected] systemjs --save

################## Angular 2 : Packages ##################

To install the angular packages use :

npm install @angular/core @angular/common @angular/compiler @angular/platform-browser @angular/platform-browser-dynamic @angular/forms @angular/http @angular/router --save npm i @angular/upgrade

Install System.js

create a new file systemjs.config.js and copy the same configuration of my project

Add the dependency in the view " index.html ":

<!-- load the dependencies -->
<script type="text/javascript" src="node_modules/core-js/client/shim.min.js"></script>
<script type="text/javascript" src="node_modules/zone.js/dist/zone.js"></script>
<script type="text/javascript" src="node_modules/reflect-metadata/Reflect.js"></script>
<!-- load angular app with  system.js-->
<script type="text/javascript" src="node_modules/systemjs/dist/system.src.js"></script>
<script type="text/javascript" src="systemjs.config.js"></script>
<script>
    system.import('app').catch(function (e) {
        console.error(e);
    });
</script>
<!-- Js End --->

agularjs2_first_config's People

Contributors

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