Skip to content

angular-esx/quickstart

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Angular QuickStart Javascript Source

This repository holds the Javascript source code of the ngxjs.io quickstart, the foundation for most of the documentation samples and potentially a good starting point for your application.

This is not the perfect arrangement for your application. It is not designed for production. It exists primarily to get you started quickly with learning and prototyping in Angular

Updating to a newer version of the Quickstart Repo

From time to time the QuickStart will add be enhanced with support for new features or to reflect changes

You can update your existing project to an up-to-date QuickStart by following these instructions:

  • Create a new project using the instructions below
  • Copy the code you have in your project's main.js file onto src/app/main.js in the new project
  • Copy your old app folder into src/app
  • Copy your old index.html into src/
  • Copy your old styles.css into src/styles/app.css
  • Install all your third party dependencies
  • Copy over any other files you added to your project
  • Copy your old .git folder into your new project's root

Now you can continue working on the new project.

Prerequisites

Node.js and npm are essential to Angular development.

Get it now if it's not already installed on your machine.

Verify that you are running at least node v4.x.x and npm 3.x.x by running node -v and npm -v in a terminal/console window. Older versions produce errors.

We recommend nvm for managing multiple versions of node and npm.

Create a new project based on the QuickStart

Clone this repo into new project folder (e.g., my-project).

git clone https://github.com/angular/quickstart  my-project
cd my-project

We have no intention of updating the source on angular/quickstart. Discard the .git folder..

rm -rf .git  # OS/X (bash)
rd .git /S/Q # windows

Create a new git repo

You could start writing code now and throw it all away when you're done. If you'd rather preserve your work under source control, consider taking the following steps.

Initialize this project as a local git repo and make the first commit:

git init
git add .
git commit -m "Initial commit"

Create a remote repository for this project on the service of your choice.

Grab its address (e.g. https://github.com/<my-org>/my-project.git) and push the local repo to the remote.

git remote add origin <repo-address>
git push -u origin master

Install npm packages

See npm and nvm version notes above

Install the npm packages described in the package.json and verify that it works:

npm install
npm start

Doesn't work in Bash for Windows which does not support servers as of January, 2017.

The npm start command first compiles the application, then simultaneously re-compiles and runs the lite-server. Both the compiler and the server watch for file changes.

Shut it down manually with Ctrl-C.

You're ready to write your application.

npm scripts

We've captured many of the most useful commands in npm scripts defined in the package.json:

  • npm start - runs the compiler and a server at the same time, both in "watch mode".
  • npm run build - runs the webpack build for production.

About

Angular 2 QuickStart Javascript - source from the documentation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published