StirTrek 2018
This project was generated with Angular CLI version 1.2.7.
All the Angular code resides under the folder src and the ng build process outputs the code to the wwwroot folder.
bower install --config.interactive=false
To run within the asp.net application you will need to do the following: (Step 3 - 7 only needed when setting up for the first time)
- DO NOT RUN
ng serve
- Ensure that you have npm, node.js, and angular installed
- Run
npm install -g gulp
- Run
npm install --save gulp-install
- Run
npm install gulp-clean
- Run
npm install -g bower
- Run
bower install --config.interactive=false
- Compile the dotnet application through visual studio or through the command line (
dotnet restore
followed bydotnet build
) or through gulp by using 'gulp dotnetBuild'- a. If you start the application within visual studio it will launch a browser
- b. If you start the application from the command prompt(
gulp dotnetRunNWatch
or 'gulp dotnetRun'), navigate to http://localhost:PortNumber- i.
gulp dotnetRunNWatch
will run 3 commands,dotnet restore
,dotnet build
, anddotnet watch run
(dotnet watch run
will listen to any changes and rebuild the .net code, it will also display any errors, and any information that would normally show in the output window in visual studio)
- i.
- NOTE: If you see errors during build regarding "Unexpected token =" or "The command
ng-build --delete-output-path=false
" try doing anpm install gulp
to install Gulp in your local directory and avoid using the one installed in your Roaming directory.
- Run
gulp default
- a. This will run
npm install
in the background - b. Then
ng build
- c. Then
bower install
- d. The gulp process will keep watching for any changes in ts files under the src folder. Keep that terminal running and it will rebuild as you make changes to the angular application
- a. This will run
- js code will redirect you to /index.html which will serve the angular application
Run ng generate component component-name
to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module
.
- Run
npm install
- Run
ng build
- Run
bower install
Run ng test
to execute the unit tests via Karma.
Run ng e2e
to execute the end-to-end tests via Protractor.
Before running the tests make sure you are serving the app via ng serve
.
To get more help on the Angular CLI use ng help
or go check out the Angular CLI README.