https://angular.io/guide/styleguide
We will build following Angular's recommended style guide
https://angular.io/guide/styleguide
We will build following Angular's recommended style guide
Example: navigation.component.ts
File Structure Convention
https://angular.io/guide/styleguide
We will build following Angular's recommended style guide
File Structure Convention
Single Responsibility
Naming
Custom-Prefix
Bootstraping
Unit Test File Names
package.json
tsconfig.json
*Node and NPM installed
systemjs.config.js
Purpose: manages all of your dependencies for your app
package.json
tsconfig.json
systemjs.config.js
Purpose: manages all of your dependencies for your app
package.json
tsconfig.json
systemjs.config.js
core-js
zone.js
rx.js
package.json
tsconfig.json
systemjs.config.js
npm i --save core-js zone.js rxjs
*will create the package.json automatically for us
Adds "missing" essential features to major browsers via polyfills
<TODO>
allows you to work with asynchronous data streams
Purpose: Dynamic Module Loader
systemjs.config.js
tsconfig.json
package.json
https://juristr.com/blog/2017/03/angular-modules-vs-es6-modules/
Purpose: Dynamic Module Loader
systemjs.config.js
tsconfig.json
package.json
Module: Provides encapsulation to your JS code
Purpose: Dynamic Module Loader
systemjs.config.js
tsconfig.json
package.json
Module: Provides encapsulation to your JS code
"Good authors divide their books into chapters and sections; good programmers divide their programs into modules."
Purpose: Dynamic Module Loader
systemjs.config.js
tsconfig.json
package.json
Dynamic: During "Runtime"
systemjs.config.js
tsconfig.json
package.json
npm i --save systemjs
Step 1 - Install SystemJS
Step 2 - Create system.config.js file
Purpose: Allow us to configure the TypeScript compiler
tsconfig.json
systemjs.config.js
package.json
Types
Interfaces
Decorators
tsconfig.json
systemjs.config.js
package.json
npm i --save typescript
Step 1 - Install SystemJS
Step 2 - Create tsconfig.json file
package.json
tsconfig.json
systemjs.config.js
package.json
tsconfig.json
systemjs.config.js
npm i --save
@angular/core
@angular/compiler
@angular/common
@angular/platform-browser
@angular/platform-browser-dynamic
npm i --save-dev live-server
"scripts": {
"build": "tsc",
"start": "live-server"
},
Resources
https://stackoverflow.com/questions/38263406/what-are-differences-between-systemjs-and-webpack
https://medium.freecodecamp.org/javascript-modules-a-beginner-s-guide-783f7d7a5fcc