Git Product home page Git Product logo

angular-jumpstart's Introduction

Angular JumpStart with TypeScript

The goal of this jumpstart app is to provide a simple way to get started with Angular 2+ while also showing several key Angular features. The sample relies on System.js to load TypeScript modules and the required scripts used in the application.

Angular Concepts Covered

  • TypeScript version that relies on classes and modules
  • Modules are loaded with System.js
  • Defining routes including child routes and lazy loaded routes
  • Using Custom Components including custom input and output properties
  • Using Custom Directives
  • Using Custom Pipes
  • Defining Properties and Using Events in Components/Directives
  • Using the Http object for Ajax calls along with RxJS observables
  • Working with Utility and Service classes (such as for sorting and Ajax calls)
  • Using Angular databinding Syntax [], () and [()]
  • Using template-driven and reactive forms functionality for capturing and validating data
  • Optional: Webpack functionality is available for module loading and more (see below for details)
  • Optional: Ahead-of-Time (AOT) functionality is available for a production build of the project (see below for details)

Running the Application

  1. Install Node.js 6.5 or higher. IMPORTANT: The server uses ES2015 features so you need Node 6.x or higher!!!!

  2. Run npm install to install app dependencies

  3. Run npm start in a separate terminal window to build the TypeScript, watch for changes and launch the web server

  4. Go to http://localhost:3000 in your browser

Looking for expert onsite Angular/TypeScript training? We've trained the biggest (and smallest :-)) companies around the world for over 15 years. For more information visit http://codewithdan.com.

Simply clone the project or download and extract the .zip to get started. Here are a few screenshots from the app:







Running the Application using WebPack (and optionally AOT)

The Angular JumpStart application uses System.JS by default for module loading mainly so that the app can load directly without going through a build process. However, Webpack can also be used to handle working with modules plus perform tasks such as bundling, minification, conversion of TypeScript to JavaScript, start up a dev web server and much more.

Follow these steps if you'd like to use webpack:

  1. Run npm install to install app dependencies

  2. Open src/app/app-routing.module.ts and change app/ to ./ for all loadChildren paths. For example:

    Change: loadChildren: 'app/customers/customers.module#CustomersModule'

    To: loadChildren: './customers/customers.module#CustomersModule'

  3. Optional (for AOT). If you'd like to run the application using Ahead of Time (AOT) compilation, run the following command to set the NODE_ENV environment variable to production and create an AOT build:

    Mac: export NODE_ENV=production *Windows: set NODE_ENV=production

  4. Run npm run build in a console window. This will generate the required script assets needed to run the application and place them in the src/devDist folder for a development build or src/dist for a production/AOT build (if you performed the previous step). It will also watch for any code changes that are made and rebuild the script bundles as needed.

  5. Run node server.js in another command window to start the server.

  6. Navigate to http://localhost:3000 in a browser.

angular-jumpstart's People

Contributors

agarbutt avatar danwahlin avatar dnaniel avatar emazv72 avatar javascriptmick avatar jimthedev avatar johnpapa avatar limarenkodenis avatar meligy avatar mitchell-logan avatar peterblazejewicz avatar philcorcoran avatar tillman32 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.