{"id":25269931,"url":"https://github.com/javascript-pro/angular2","last_synced_at":"2025-09-04T05:08:25.899Z","repository":{"id":89533956,"uuid":"82015974","full_name":"javascript-pro/angular2","owner":"javascript-pro","description":"Quickstart Angular 2 tutorial app","archived":false,"fork":false,"pushed_at":"2017-02-15T03:57:37.000Z","size":1128,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-12T11:37:34.663Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/javascript-pro.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-02-15T03:23:05.000Z","updated_at":"2019-09-26T23:07:21.000Z","dependencies_parsed_at":null,"dependency_job_id":"a4d0f600-80d5-4495-bcf9-4f4ac2b2cde1","html_url":"https://github.com/javascript-pro/angular2","commit_stats":null,"previous_names":["javascript-pro/angular2"],"tags_count":23,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/javascript-pro%2Fangular2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/javascript-pro%2Fangular2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/javascript-pro%2Fangular2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/javascript-pro%2Fangular2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/javascript-pro","download_url":"https://codeload.github.com/javascript-pro/angular2/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247441060,"owners_count":20939239,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-02-12T11:28:00.924Z","updated_at":"2025-04-06T06:15:14.520Z","avatar_url":"https://github.com/javascript-pro.png","language":"JavaScript","readme":"# Angular QuickStart Source\n[![Build Status][travis-badge]][travis-badge-url]\n\nThis repository holds the TypeScript source code of the [angular.io quickstart](https://angular.io/docs/ts/latest/quickstart.html),\nthe foundation for most of the documentation samples and potentially a good starting point for your application.\n\nIt's been extended with testing support so you can start writing tests immediately.\n\n**This is not the perfect arrangement for your application. It is not designed for production.\nIt exists primarily to get you started quickly with learning and prototyping in Angular**\n\nWe are unlikely to accept suggestions about how to grow this QuickStart into something it is not.\nPlease keep that in mind before posting issues and PRs.\n\n## Updating to a newer version of the Quickstart Repo\n\nFrom time to time the QuickStart will add be enhanced with support for new features or to reflect\nchanges to the [official Style Guide](https://angular.io/docs/ts/latest/guide/style-guide.html).\n\nYou can update your existing project to an up-to-date QuickStart by following these instructions:\n- Create a new project using the [instructions below](#create-a-new-project-based-on-the-quickstart)\n- Copy the code you have in your project's `main.ts` file onto `src/app/main.ts` in the new project\n- Copy your old `app` folder into `src/app`\n- Delete `src/app/main.ts` if you have one (we now use `src/main.ts` instead)\n- Copy your old `index.html`, `styles.css` and `tsconfig.json` into `src/`\n- Install all your third party dependencies\n- Copy your old `e2e/` folder into `e2e/`\n- Copy over any other files you added to your project\n- Copy your old `.git` folder into your new project's root\n\nNow you can continue working on the new project.\n\n## Prerequisites\n\nNode.js and npm are essential to Angular development. \n    \n\u003ca href=\"https://docs.npmjs.com/getting-started/installing-node\" target=\"_blank\" title=\"Installing Node.js and updating npm\"\u003e\nGet it now\u003c/a\u003e if it's not already installed on your machine.\n \n**Verify that you are running at least node `v4.x.x` and npm `3.x.x`**\nby running `node -v` and `npm -v` in a terminal/console window.\nOlder versions produce errors.\n\nWe recommend [nvm](https://github.com/creationix/nvm) for managing multiple versions of node and npm.\n\n## Create a new project based on the QuickStart\n\nClone this repo into new project folder (e.g., `my-proj`).\n```shell\ngit clone https://github.com/angular/quickstart  my-proj\ncd my-proj\n```\n\nWe have no intention of updating the source on `angular/quickstart`.\nDiscard the `.git` folder..\n```shell\nrm -rf .git  # OS/X (bash)\nrd .git /S/Q # windows\n```\n### Delete _non-essential_ files (optional)\n\nYou can quickly delete the _non-essential_ files that concern testing and QuickStart repository maintenance\n(***including all git-related artifacts*** such as the `.git` folder and `.gitignore`!)\nby entering the following commands while in the project folder:\n\n##### OS/X (bash)\n```shell\nxargs rm -rf \u003c non-essential-files.osx.txt\nrm src/app/*.spec*.ts\nrm non-essential-files.osx.txt\n```\n\n##### Windows\n```shell\nfor /f %i in (non-essential-files.txt) do del %i /F /S /Q\nrd .git /s /q\nrd e2e /s /q\n```\n\n### Create a new git repo\nYou could [start writing code](#start-development) now and throw it all away when you're done.\nIf you'd rather preserve your work under source control, consider taking the following steps.\n\nInitialize this project as a *local git repo* and make the first commit:\n```shell\ngit init\ngit add .\ngit commit -m \"Initial commit\"\n```\n\n\u003eRecover the deleted `.gitignore` from the QuickStart repository \nif you lost it in the _Delete non-essential files_ step.\n\nCreate a *remote repository* for this project on the service of your choice.\n\nGrab its address (e.g. *`https://github.com/\u003cmy-org\u003e/my-proj.git`*) and push the *local repo* to the *remote*.\n```shell\ngit remote add origin \u003crepo-address\u003e\ngit push -u origin master\n```\n## Install npm packages\n\n\u003e See npm and nvm version notes above\n\nInstall the npm packages described in the `package.json` and verify that it works:\n\n```shell\nnpm install\nnpm start\n```\n\n\u003eDoesn't work in _Bash for Windows_ which does not support servers as of January, 2017.\n\nThe `npm start` command first compiles the application, \nthen simultaneously re-compiles and runs the `lite-server`.\nBoth the compiler and the server watch for file changes.\n\nShut it down manually with `Ctrl-C`.\n\nYou're ready to write your application.\n\n### npm scripts\n\nWe've captured many of the most useful commands in npm scripts defined in the `package.json`:\n\n* `npm start` - runs the compiler and a server at the same time, both in \"watch mode\".\n* `npm run build` - runs the TypeScript compiler once.\n* `npm run build:w` - runs the TypeScript compiler in watch mode; the process keeps running, awaiting changes to TypeScript files and re-compiling when it sees them.\n* `npm run serve` - runs the [lite-server](https://www.npmjs.com/package/lite-server), a light-weight, static file server, written and maintained by\n[John Papa](https://github.com/johnpapa) and\n[Christopher Martin](https://github.com/cgmartin)\nwith excellent support for Angular apps that use routing.\n\nHere are the test related scripts:\n* `npm test` - compiles, runs and watches the karma unit tests\n* `npm run e2e` - compiles and run protractor e2e tests, written in Typescript (*e2e-spec.ts)\n\n## Testing\n\nThe QuickStart documentation doesn't discuss testing.\nThis repo adds both karma/jasmine unit test and protractor end-to-end testing support.\n\nThese tools are configured for specific conventions described below.\n\n*It is unwise and rarely possible to run the application, the unit tests, and the e2e tests at the same time.\nWe recommend that you shut down one before starting another.*\n\n### Unit Tests\nTypeScript unit-tests are usually in the `src/app` folder. Their filenames must end in `.spec.ts`.\n\nLook for the example `src/app/app.component.spec.ts`.\nAdd more `.spec.ts` files as you wish; we configured karma to find them.\n\nRun it with `npm test`\n\nThat command first compiles the application, then simultaneously re-compiles and runs the karma test-runner.\nBoth the compiler and the karma watch for (different) file changes.\n\nShut it down manually with `Ctrl-C`.\n\nTest-runner output appears in the terminal window.\nWe can update our app and our tests in real-time, keeping a weather eye on the console for broken tests.\nKarma is occasionally confused and it is often necessary to shut down its browser or even shut the command down (`Ctrl-C`) and\nrestart it. No worries; it's pretty quick.\n\n### End-to-end (E2E) Tests\n\nE2E tests are in the `e2e` directory, side by side with the `src` folder.\nTheir filenames must end in `.e2e-spec.ts`.\n\nLook for the example `e2e/app.e2e-spec.ts`.\nAdd more `.e2e-spec.js` files as you wish (although one usually suffices for small projects);\nwe configured Protractor to find them.\n\nThereafter, run them with `npm run e2e`.\n\nThat command first compiles, then simultaneously starts the `lite-server` at `localhost:8080`\nand launches Protractor.  \n\nThe pass/fail test results appear at the bottom of the terminal window.\nA custom reporter (see `protractor.config.js`) generates a  `./_test-output/protractor-results.txt` file\nwhich is easier to read; this file is excluded from source control.\n\nShut it down manually with `Ctrl-C`.\n\n[travis-badge]: https://travis-ci.org/angular/quickstart.svg?branch=master\n[travis-badge-url]: https://travis-ci.org/angular/quickstart\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjavascript-pro%2Fangular2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjavascript-pro%2Fangular2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjavascript-pro%2Fangular2/lists"}