class Student {
fullName: string;
constructor(public firstName: string, public lastName: string) {
this.fullName = firstName + " " lastName;
}
}
interface Person {
firstName: string;
lastName: string;
}
function greeter(person : Person) {
return "Hello, " + person.firstName + person.lastName;
}
let user = new Student("Jane", "M.", "User");
# Pre-requisites (NPM must be installed)
npm install -g npm@latest
npm -v
npm install -g @angular/cli@latest
ng version
npm install -g typescript@3.2.4
tsc -v
# ng CLI
ng new my-dream-app
ng serve
src
app
app.module.ts
main.ts
angular.js
package.json
ng generate --help
# Create a new component
ng generate component