My understanding of the ANGULARJS framework

Source: Internet
Author: User

Two-way binding

When your business has reached a certain scale, the data changes to the view display is not a simple two-way binding can hold, your view updated you may not even know where the data changes caused.

Give you another angle to manipulate the DOM.

Simplifies your writing of DOM operations, and you don't see those each,append. And you have a clear logical world.

Avoid a lot of JavaScript operation DOM, this can make the code clear, more convenient maintenance.

Angular more suitable for crud Development of management systems

Angular is suitable for forms, and all MVVM is suitable for making forms. Then large mvvm, such as angular, will provide a series of support for the form-related.

Search engines can only get a template, but no content.

Need SEO. (SEO now also has the PreRender solution) Https//prerender.io.

Modular programming can be tested

This train of thought has two points, 1) Modular 2) can be tested.

The future trend is: Background program no longer do any template processing

The future trend is that the front-end backend relies only on JSON data for communication: The backend only processes and sends a piece of JSON data to the front end, and then the compute and template rendering is done at the front end. After the front-end changes, the JSON data is formed and then passed back to the backend. The future trend is: The background program no longer do any template processing.

Angular is in line with the trend of development, first, decoupling the front end, second, can be modular, the third can be tested, the fourth natural support json, v Dependency Injection and so on, There are other features that allow angular to follow and even push the front-end development trend.

The ANGULARJS itself is a good front-end templating engine, and the future development is that the back-end MVC produces a JSON view as the front-end model, whereas the entire front-end MVC is the back-end view, and the intermediate communication relies on JSON. The high decoupling of the front and rear ends can fully meet the requirements of the modular design.

Google

With Google's strong support and growing popularity, the company began to use angular, some jobs need to have angular knowledge to work.

Angularjs2

ANGULARJS2 is angularjs1.x's mvvm+componet system.

What is the structure of a complete project?

Any NG application consists of a limited number of module types, such as controllers, directives, services, routes, filters, and so on.

Using a total app module as the entry point, it relies on all other modules.

App

|--css

|--imgs

|--lib

|--js

|--app.js as the starting point JS

|--controllers.js controller encapsulates business logic with controller

|--directives.js directives encapsulate DOM operations with directives

|--filters.js Filter conversion Output with filter

|--services.js Service encapsulates reusable code with services

|--routes.js Front-end routing

|--tpls->templates Template hello.html

|--index.html app's main HTML file

My understanding of the ANGULARJS framework

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.