angular bootstraping


I’ve been working on angular for more than two months. It has always been at the level of only knowing the basic usage, doing projects, and searching for duplicate code when encountering problems. While the project is stable, go through angular API from the beginning. Consolidate basic knowledge.


There are two ways to start angular. One is to add ng app directive to the tag. There is another way to start it, which is to start it with the command / manual way. When starting, angular does the following operations:
1. Project dependent injectors will be injected.
2. The injector creates a root scope. Rootscope will be the context of our project’s model.
3. Angular will start “compile” with ngapp as the root element, and handle assignments and “bindings”. Binding is the expression of {}} package. I understand this one. Looking forward to correction.
Once the project is started, the project will wait for the browser event. When the event occurs, angular will detect its related model and change them.

Project structure

The project structure takes the link description as the classic. Our company’s projects are still divided into folders by function. It’s in angular style guide
Angular application structure

static Template

Recommended Today

Redis design and implementation 4: Dictionary Dict

In redis, the dictionary is the infrastructure. Redis database data, expiration time and hash type all take the dictionary as the underlying structure. Structure of dictionary Hashtable The implementation code of hash table is as follows:dict.h/dictht The dictionary of redis is implemented in the form of hash table. typedef struct dictht { //Hash table array, […]