ANGULARJS Study Notes

Source: Internet
Author: User

Introduction   angularjs is designed to overcome the lack of HTML in building applications. HTML is a good declarative language for static text presentation design, but it seems weak to build a Web application. So I did some work (you can also think of it as a gimmick) to get the browser to do what I want.    Generally, we use the following techniques to solve the lack of static web page technology in building dynamic applications:   Class Library-class library is a collection of functions that can help you write Web applications. It's your code that dominates, and it's up to you to decide when to use the class library. Class libraries include: jquery    framework-Framework is a special, already implemented Web application, you just need to fill it with specific business logic. The framework here is the dominant one, and it is used to invoke your code based on the specific application logic. The framework is: Knockout, Sproutcore and so on.   angularjs uses a different approach, and it tries to make up for the drawbacks of HTML itself in building applications. Angularjs allows the browser to recognize the new syntax by using the structure we call Identifiers (directives). For example,:   uses the double curly braces {{}}} syntax for data binding;   use the DOM control structure to implement iterations or hide DOM fragments;   support forms and forms validation;   The ability to associate logical code to related DOM elements;   can compose HTML into reusable components. End-to-end solution   angularjs is trying to be an end-to-end solution in Web applications. This means it's not just a small part of your web app, it's a complete end-to-end solution. This will allow ANGULARJS to be "stubborn" when building a crud (adding create, querying retrieve, updating updates, deleting deletes) (the original is opinionated, meaning that there are not too many other ways). However, while it is "stubborn", it can still ensure that its "stubbornness" is just the starting point for your application, and you can still change it. Some of the great things about Angularjs are as follows:   all that might be used to build a CRUD application include: Data binding, basic template identifiers, form validation, routing, deep linking, component reuse, dependency injection.    testing includes: unit testing, end-to-end testing, simulation, and automated testing frameworks.    with catalog layout and test scriptsSeed application as a starting point. Angularjs's loveliness   angularjs simplifies application development by presenting a higher level of abstraction for developers. As with other abstractions, this also loses some of the flexibility. In other words, not all applications are suitable for use with ANGULARJS. Angularjs is primarily concerned with building crud applications. Fortunately, at least 90% of Web applications are CRUD applications. But to understand what is appropriate to build with ANGULARJS, you need to understand what does not fit angularjs build.    such as the game, graphical interface Editor, this DOM operation is very frequent and very complex applications, and crud applications are very different, they are not suitable for angularjs to build. It might be better to use some lighter, simpler technology like jquery in this case. Hello world!

A good way to start learning Angularjs is to create a classic app "Hello world!" :

    1. Using your favorite text editor, create an HTML file, for example: helloworld.html.
    2. Copy the following source code to your HTML file.
    3. Open the HTML file in a Web browser.

Source

<!doctype html> ng-app>  <script src="http://code.angularjs.org/angular-1.0.1.min.js"></script>  <body> Hello {{‘World‘}}! </body>

Please run the above code to see the effect in your browser.

Thank you for watching (this article is for recording purposes only)

ANGULARJS Study Notes

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.