Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 1b91d30

Browse files
frankstepanskigkalpak
authored andcommitted
docs(README.md): expand the "Interconnection with HTML" section
Closes #15150
1 parent 5395573 commit 1b91d30

File tree

1 file changed

+42
-9
lines changed

1 file changed

+42
-9
lines changed

README.md

+42-9
Original file line numberDiff line numberDiff line change
@@ -51,24 +51,57 @@ We've set up a separate document for our [contribution guidelines](https://githu
5151

5252
What to use AngularJS for and when to use it
5353
---------
54-
AngularJS is the next generation framework where each component is designed to work with every other component in an interconnected way like a well-oiled machine. AngularJS is JavaScript MVC made easy and done right. (Well it is not really MVC, read on, to understand what this means.)
54+
AngularJS is the next generation framework where each component is designed to work with every other
55+
component in an interconnected way like a well-oiled machine. AngularJS is JavaScript MVC made easy
56+
and done right. (Well it is not really MVC, read on, to understand what this means.)
5557

5658
#### MVC, no, MV* done the right way!
57-
MVC, short for Model-View-Controller, is a design pattern, i.e. how the code should be organized and how the different parts of an application separated for proper readability and debugging. Model is the data and the database. View is the user interface and what the user sees. Controller is the main link between Model and View. These are the three pillars of major programming frameworks present on the market today. On the other hand AngularJS works on MV*, short for Model-View-_Whatever_. The _Whatever_ is AngularJS's way of telling that you may create any kind of linking between the Model and the View here.
58-
59-
Unlike other frameworks in any programming language, where MVC, the three separate components, each one has to be written and then connected by the programmer, AngularJS helps the programmer by asking him/her to just create these and everything else will be taken care of by AngularJS.
59+
MVC, short for Model-View-Controller, is a design pattern, i.e. how the code should be organized and
60+
how the different parts of an application separated for proper readability and debugging. Model is
61+
the data and the database. View is the user interface and what the user sees. Controller is the main
62+
link between Model and View. These are the three pillars of major programming frameworks present on
63+
the market today. On the other hand AngularJS works on MV*, short for Model-View-_Whatever_. The
64+
_Whatever_ is AngularJS's way of telling that you may create any kind of linking between the Model
65+
and the View here.
66+
67+
Unlike other frameworks in any programming language, where MVC, the three separate components, each
68+
one has to be written and then connected by the programmer, AngularJS helps the programmer by asking
69+
him/her to just create these and everything else will be taken care of by AngularJS.
6070

6171
#### Interconnection with HTML at the root level
62-
AngularJS uses HTML to define the user's interface. AngularJS also enables the programmer to write new HTML tags (AngularJS Directives) and increase the readability and understandability of the HTML code. Directives are AngularJS’s way of bringing additional functionality to HTML. Directives achieve this by enabling us to invent our own HTML elements. This also helps in making the code DRY (Don't Repeat Yourself), which means once created, a new directive can be used anywhere within the application.
72+
AngularJS uses HTML to define the user's interface. AngularJS also enables the programmer to write
73+
new HTML tags (AngularJS Directives) and increase the readability and understandability of the HTML
74+
code. Directives are AngularJS’s way of bringing additional functionality to HTML. Directives
75+
achieve this by enabling us to invent our own HTML elements. This also helps in making the code DRY
76+
(Don't Repeat Yourself), which means once created, a new directive can be used anywhere within the
77+
application.
78+
79+
HTML is also used to determine the wiring of the app. Special attributes in the HTML determine where
80+
to load the app, which components or controllers to use for each element, etc. We specify "what"
81+
gets loaded, but not "how". This declarative approach greatly simplifies app development in a sort
82+
of WYSIWYG way. Rather than spending time on how the program flows and orchestrating the various
83+
moving parts, we simply define what we want and Angular will take care of the dependencies.
6384

6485
#### Data Handling made simple
65-
Data and Data Models in AngularJS are plain JavaScript objects and one can add and change properties directly on it and loop over objects and arrays at will.
86+
Data and Data Models in AngularJS are plain JavaScript objects and one can add and change properties
87+
directly on it and loop over objects and arrays at will.
6688

6789
#### Two-way Data Binding
68-
One of AngularJS's strongest features. Two-way Data Binding means that if something changes in the Model, the change gets reflected in the View instantaneously, and the same happens the other way around. This is also referred to as Reactive Programming, i.e. suppose `a = b + c` is being programmed and after this, if the value of `b` and/or `c` is changed then the value of `a` will be automatically updated to reflect the change. AngularJS uses its "scopes" as a glue between the Model and View and makes these updates in one available for the other.
90+
One of AngularJS's strongest features. Two-way Data Binding means that if something changes in the
91+
Model, the change gets reflected in the View instantaneously, and the same happens the other way
92+
around. This is also referred to as Reactive Programming, i.e. suppose `a = b + c` is being
93+
programmed and after this, if the value of `b` and/or `c` is changed then the value of `a` will be
94+
automatically updated to reflect the change. AngularJS uses its "scopes" as a glue between the Model
95+
and View and makes these updates in one available for the other.
6996

7097
#### Less Written Code and Easily Maintainable Code
71-
Everything in AngularJS is created to enable the programmer to end up writing less code that is easily maintainable and readable by any other new person on the team. Believe it or not, one can write a complete working two-way data binded application in less than 10 lines of code. Try and see for yourself!
98+
Everything in AngularJS is created to enable the programmer to end up writing less code that is
99+
easily maintainable and readable by any other new person on the team. Believe it or not, one can
100+
write a complete working two-way data binded application in less than 10 lines of code. Try and see
101+
for yourself!
72102

73103
#### Testing Ready
74-
AngularJS has Dependency Injection, i.e. it takes care of providing all the necessary dependencies to its controllers whenever required. This helps in making the AngularJS code ready for unit testing by making use of mock dependencies created and injected. This makes AngularJS more modular and easily testable thus in turn helping a team create more robust applications.
104+
AngularJS has Dependency Injection, i.e. it takes care of providing all the necessary dependencies
105+
to its controllers and services whenever required. This helps in making the AngularJS code ready for
106+
unit testing by making use of mock dependencies created and injected. This makes AngularJS more
107+
modular and easily testable thus in turn helping a team create more robust applications.

0 commit comments

Comments
 (0)