Web Developer

Author: zero2full

Section 2-2 component

It is better to put all files in a new folder named with a meaningful name, such as : server first name component.ts file, which name is normally folder’s name, such as: server.component.ts Component is just Class, angular could instantiate it to create objects in order to let angular understand this class, it should use

Section 2-3 Module

For simple project, only one module is enough, which bundles different components. @NgModule({}) decorator includes: declarations[], imports:[], providers[], bootstrap: [AppComponet] declarations: should declare all components

Section 2-1 How Angular Boots Application

How the Angular app start main.ts file will be executed first, where there is a function, called bootstrapModule(AppModule), that will connect the module in the argument. this module should be a module created by angular, in this module (AppModule) (app.module.ts), it points out bootstrap component (AppComponent) (App.Component.ts) this component has defined the selector (app-root), and

Basic TypeScript

TypeScript could sign variables with different type, and after sign the type, you couldn’t assign other type of value to this variable, or errors will pop up. Syntax: let test: string, if you assign number to this variable, it will be errors. type of variable: :string, :number, :array<string>, :boolean, :any sometimes, TypeScript could infer the

Environment of Running Angular

Install Node.js from https://nodejs.org/en/ Check Node.js version command: node -v Update NPM: sudo npm install -g npm Install Angular CLI (Command Line Interface): sudo npm install -g @angular/cli@latest Check angular verion: ng version | ng –version | ng v

zval container & symbol table

zval container: all php variables’ value is store in the zval container, which also includes is_ref (boolean value, and default is false, this is indicated whether the variable point to this value is reference variable or not) and refcount (contains how many variables point to this value) symbol table: all variable name in different scope

function: extract()

Syntax extract ( array &$array [, int $flags = EXTR_OVERWRITE [, string $prefix = NULL ]] ) Description extract — Import variables into the current symbol table from an array, Checks each key to see whether it has a valid variable name. It also checks for collisions with existing variables in the symbol table. Code

function: shortcode_atts

Syntax shortcode_atts(array $pair, array $atts, string $shortcode = ”) Description The pairs should be considered to be all of the attributes which are supported by the caller and given as a list. The returned attributes will only contain the attributes in the $pairs list. If the $atts list has unsupported attributes, then they will be

JavaScript Object Hierarchy