Skip to content
Example of converting an Angular.js application to Angular
JavaScript TypeScript HTML CSS Shell
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
e2e
guide
src
test/mocks
.angular-cli.json
.bowerrc
.gitignore
.nvmrc
.update_angular.sh
Gruntfile.js
README.md
bower.json
karma.conf.js
package.json
protractor.conf.js
tsconfig.json
tslint.json
yarn.lock

README.md

UpgradeModule with Angular/AngularJS

Guide

This guide is to serve as an example for how to upgrade an AngularJS (versions 1.x) application to Angular (versions 2+).

It is written as verbosely as possible to (hoepfully) cover all aspects of what was done to get things working. This might be helpful to some, and for others you can just feel free to browse through the code to see what's going on.

While the following is explained in much more detail in the guide above, a few basic pieces about the code layout:

  • Source code is split between src/client and src/server. This was an AngularJS application so it was served with a nodejs server. There was some modification necessary to the node server's code to facilitate the new directories and routes when adding Angular. Keep this in mind for your own environments.
  • AngularJS code is in src/client/app.
  • Angular code is in src/client/ngsrc.
  • Grunt is used to build the hybrid Angular/AngularJS application. With the additiona of the angular-cli, I added grunt tasks to wrap the ng build commands.
  • A custom plugin is used to provide combined code coverage reports.
You can’t perform that action at this time.