-
Notifications
You must be signed in to change notification settings - Fork 441
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
57 changed files
with
12,480 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Editor configuration, see http://editorconfig.org | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
indent_style = space | ||
indent_size = 2 | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[*.md] | ||
max_line_length = off | ||
trim_trailing_whitespace = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# See http://help.github.com/ignore-files/ for more about ignoring files. | ||
|
||
# compiled output | ||
/dist | ||
/tmp | ||
/out-tsc | ||
|
||
# dependencies | ||
/node_modules | ||
|
||
# IDEs and editors | ||
/.idea | ||
.project | ||
.classpath | ||
.c9/ | ||
*.launch | ||
.settings/ | ||
*.sublime-workspace | ||
|
||
# IDE - VSCode | ||
.vscode/* | ||
!.vscode/settings.json | ||
!.vscode/tasks.json | ||
!.vscode/launch.json | ||
!.vscode/extensions.json | ||
|
||
# misc | ||
/.sass-cache | ||
/connect.lock | ||
/coverage | ||
/libpeerconnection.log | ||
npm-debug.log | ||
testem.log | ||
/typings | ||
|
||
# e2e | ||
/e2e/*.js | ||
/e2e/*.map | ||
|
||
# System Files | ||
.DS_Store | ||
Thumbs.db |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
|
||
# Initializing a clean Angular Material Project | ||
|
||
These are the commands and steps needed to scaffold a new Angular Material project from scratch, | ||
from an empty folder. | ||
|
||
Please make sure to have the latest CLI, and at least NPM 5. | ||
|
||
When is doubt, its recommended to update to the latest version of node using a node versioning tool | ||
such as for example [nave](https://github.com/isaacs/nave) or [nvm-windows](https://github.com/coreybutler/nvm-windows). | ||
|
||
# Step 1 - Scaffold a clean project using the Angular CLI | ||
|
||
With a CLI version 1.5 or above, let's scaffold a new project with routing: | ||
|
||
ng new angular-material-hello-world --routing | ||
|
||
# Step 2 - Installing Angular Material dependencies | ||
|
||
Next, let's install these dependencies: | ||
|
||
npm install @angular/material @angular/cdk @angular/animations hammerjs | ||
|
||
# Step 3 - Adding Google Material Icons Font | ||
|
||
Let's add this to our index.html: | ||
|
||
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> | ||
|
||
# Step 4 - choosing a Theme | ||
|
||
Before starting to import components, let's choose a widget theme, have a look at the themes available | ||
|
||
inside `node_modules/@angular/material/prebuild-themes`. | ||
|
||
We can for example use the Indigo Pink theme by adding this line to our styles.css file: | ||
|
||
@import "~@angular/material/prebuilt-themes/indigo-pink.css"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,151 @@ | ||
|
||
## Angular Material Course | ||
|
||
This repository contains the code of the [Angular Material Course](https://angular-university.io/course/angular-material-course). | ||
|
||
This course repository is updated to Angular v6, and there is a package-lock.json file available, for avoiding semantic versioning installation issues. | ||
|
||
 | ||
|
||
|
||
# Installation pre-requisites | ||
|
||
IMPORTANT: Please use NPM 5 or above, to make sure the package-lock.json is used. | ||
|
||
For running this project we need and npm installed on our machine. These are some tutorials to install node in different operating systems: | ||
|
||
*Its important to install the latest version of Node* | ||
|
||
- [Install Node and NPM on Windows](https://www.youtube.com/watch?v=8ODS6RM6x7g) | ||
- [Install Node and NPM on Linux](https://www.youtube.com/watch?v=yUdHk-Dk_BY) | ||
- [Install Node and NPM on Mac](https://www.youtube.com/watch?v=Imj8PgG3bZU) | ||
|
||
|
||
# Installing the Angular CLI | ||
|
||
With the following command the angular-cli will be installed globally in your machine: | ||
|
||
npm install -g @angular/cli | ||
|
||
|
||
# How To install this repository | ||
|
||
We can install the master branch using the following commands: | ||
|
||
git clone https://github.com/angular-university/angular-material-course.git | ||
|
||
This repository is made of several separate npm modules, that are installable separately. For example, to run the au-input module, we can do the following: | ||
|
||
cd angular-material-course | ||
npm install | ||
|
||
Its also possible to install the modules as usual using npm: | ||
|
||
npm install | ||
|
||
NPM 5 or above has the big advantage that if you use it you will be installing the exact same dependencies than I installed in my machine, so you wont run into issues caused by semantic versioning updates. | ||
|
||
This should take a couple of minutes. If there are issues, please post the complete error message in the Questions section of the course. | ||
|
||
# To Run the Development Backend Server | ||
|
||
We can start the sample application backend with the following command: | ||
|
||
npm run server | ||
|
||
This is a small Node REST API server. | ||
|
||
# To run the Development UI Server | ||
|
||
To run the frontend part of our code, we will use the Angular CLI: | ||
|
||
npm start | ||
|
||
The application is visible at port 4200: [http://localhost:4200](http://localhost:4200) | ||
|
||
|
||
|
||
# Important | ||
|
||
This repository has multiple branches, have a look at the beginning of each section to see the name of the branch. | ||
|
||
At certain points along the course, you will be asked to checkout other remote branches other than master. You can view all branches that you have available remotely using the following command: | ||
|
||
git branch -a | ||
|
||
The remote branches have their starting in origin, such as for example 1-navigation-and-containers. | ||
|
||
We can checkout the remote branch and start tracking it with a local branch that has the same name, by using the following command: | ||
|
||
git checkout -b section-1 origin/1-navigation-and-containers | ||
|
||
It's also possible to download a ZIP file for a given branch, using the branch dropdown on this page on the top left, and then selecting the Clone or Download / Download as ZIP button. | ||
|
||
# Other Courses | ||
|
||
# Angular PWA Course | ||
|
||
If you are looking for the [Angular PWA Course](https://angular-university.io/course/angular-pwa-course), the repo with the full code can be found here: | ||
|
||
 | ||
|
||
# Angular Security Masterclass | ||
|
||
If you are looking for the [Angular Security Masterclass](https://angular-university.io/course/angular-security-course), the repo with the full code can be found here: | ||
|
||
[Angular Security Masterclass](https://github.com/angular-university/angular-security-course). | ||
|
||
 | ||
|
||
# Angular Advanced Library Laboratory Course | ||
|
||
If you are looking for the Angular Advanced Course, the repo with the full code can be found here: | ||
|
||
[Angular Advanced Library Laboratory Course: Build Your Own Library](https://angular-university.io/course/angular-advanced-course). | ||
|
||
 | ||
|
||
|
||
## RxJs and Reactive Patterns Angular Architecture Course | ||
|
||
If you are looking for the RxJs and Reactive Patterns Angular Architecture Course code, the repo with the full code can be found here: | ||
|
||
[RxJs and Reactive Patterns Angular Architecture Course](https://angular-university.io/course/reactive-angular-architecture-course) | ||
|
||
 | ||
|
||
|
||
|
||
## Angular Ngrx Reactive Extensions Architecture Course | ||
|
||
If you are looking for the Angular Ngrx Reactive Extensions Architecture Course code, the repo with the full code can be found here: | ||
|
||
[Angular Ngrx Reactive Extensions Architecture Course](https://angular-university.io/course/angular2-ngrx) | ||
|
||
[Github repo for this course](https://github.com/angular-university/ngrx-course) | ||
|
||
 | ||
|
||
|
||
|
||
## Angular 2 and Firebase - Build a Web Application Course | ||
|
||
If you are looking for the Angular 2 and Firebase - Build a Web Application Course code, the repo with the full code can be found here: | ||
|
||
[Angular 2 and Firebase - Build a Web Application](https://angular-university.io/course/build-an-application-with-angular2) | ||
|
||
[Github repo for this course](https://github.com/angular-university/angular-firebase-app) | ||
|
||
 | ||
|
||
|
||
## Complete Typescript 2 Course - Build A REST API | ||
|
||
If you are looking for the Complete Typescript 2 Course - Build a REST API, the repo with the full code can be found here: | ||
|
||
[https://angular-university.io/course/typescript-2-tutorial](https://github.com/angular-university/complete-typescript-course) | ||
|
||
[Github repo for this course](https://github.com/angular-university/complete-typescript-course) | ||
|
||
 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,132 @@ | ||
{ | ||
"$schema": "./node_modules/@angular/cli/lib/config/schema.json", | ||
"version": 1, | ||
"newProjectRoot": "projects", | ||
"projects": { | ||
"angular-material-course": { | ||
"root": "", | ||
"sourceRoot": "src", | ||
"projectType": "application", | ||
"architect": { | ||
"build": { | ||
"builder": "@angular-devkit/build-angular:browser", | ||
"options": { | ||
"outputPath": "dist", | ||
"index": "src/index.html", | ||
"main": "src/main.ts", | ||
"tsConfig": "src/tsconfig.app.json", | ||
"polyfills": "src/polyfills.ts", | ||
"assets": [ | ||
"src/assets", | ||
"src/favicon.ico" | ||
], | ||
"styles": [ | ||
"src/styles.scss" | ||
], | ||
"scripts": [] | ||
}, | ||
"configurations": { | ||
"production": { | ||
"optimization": true, | ||
"outputHashing": "all", | ||
"sourceMap": false, | ||
"extractCss": true, | ||
"namedChunks": false, | ||
"aot": true, | ||
"extractLicenses": true, | ||
"vendorChunk": false, | ||
"buildOptimizer": true, | ||
"fileReplacements": [ | ||
{ | ||
"replace": "src/environments/environment.ts", | ||
"with": "src/environments/environment.prod.ts" | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
"serve": { | ||
"builder": "@angular-devkit/build-angular:dev-server", | ||
"options": { | ||
"browserTarget": "angular-material-course:build" | ||
}, | ||
"configurations": { | ||
"production": { | ||
"browserTarget": "angular-material-course:build:production" | ||
} | ||
} | ||
}, | ||
"extract-i18n": { | ||
"builder": "@angular-devkit/build-angular:extract-i18n", | ||
"options": { | ||
"browserTarget": "angular-material-course:build" | ||
} | ||
}, | ||
"test": { | ||
"builder": "@angular-devkit/build-angular:karma", | ||
"options": { | ||
"main": "src/test.ts", | ||
"karmaConfig": "./karma.conf.js", | ||
"polyfills": "src/polyfills.ts", | ||
"tsConfig": "src/tsconfig.spec.json", | ||
"scripts": [], | ||
"styles": [ | ||
"src/styles.scss" | ||
], | ||
"assets": [ | ||
"src/assets", | ||
"src/favicon.ico" | ||
] | ||
} | ||
}, | ||
"lint": { | ||
"builder": "@angular-devkit/build-angular:tslint", | ||
"options": { | ||
"tsConfig": [ | ||
"src/tsconfig.app.json", | ||
"src/tsconfig.spec.json" | ||
], | ||
"exclude": [ | ||
"**/node_modules/**" | ||
] | ||
} | ||
} | ||
} | ||
}, | ||
"angular-material-course-e2e": { | ||
"root": "", | ||
"sourceRoot": "", | ||
"projectType": "application", | ||
"architect": { | ||
"e2e": { | ||
"builder": "@angular-devkit/build-angular:protractor", | ||
"options": { | ||
"protractorConfig": "./protractor.conf.js", | ||
"devServerTarget": "angular-material-course:serve" | ||
} | ||
}, | ||
"lint": { | ||
"builder": "@angular-devkit/build-angular:tslint", | ||
"options": { | ||
"tsConfig": [ | ||
"e2e/tsconfig.e2e.json" | ||
], | ||
"exclude": [ | ||
"**/node_modules/**" | ||
] | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"defaultProject": "angular-material-course", | ||
"schematics": { | ||
"@schematics/angular:component": { | ||
"prefix": "", | ||
"styleext": "scss" | ||
}, | ||
"@schematics/angular:directive": { | ||
"prefix": "" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { AppPage } from './app.po'; | ||
|
||
describe('angular-material-course App', () => { | ||
let page: AppPage; | ||
|
||
beforeEach(() => { | ||
page = new AppPage(); | ||
}); | ||
|
||
it('should display welcome message', () => { | ||
page.navigateTo(); | ||
expect(page.getParagraphText()).toEqual('Welcome to app!'); | ||
}); | ||
}); |
Oops, something went wrong.