{ By: Nirmal V }
Text
Text
To answer that question
a little bit of history recap is needed...
Text
Text
<html>
<body>
<h1>Mattias homepage</h1>
<p>Welcome to my homepage</p>
</body>
</html>
Text
$name = "Mattias";
print "<html>";
print "<body>";
print "<h1>$name homepage</h1>";
print "<p>Welcome to my homepage</p>";
print "</body>";
print "</html>";
Perl
Php
<html>
<body>
<h1><?php $name="Mattias"; echo $name ?> homepage</h1>
<p>Welcome to my homepage</p>
</body>
</html>
Text
<html>
<body>
<h1></h1>
<p>Welcome to my homepage</p>
<script>
h1 = document.getElementsByTagName("h1")[0];
h1.innerHTML = "Mattias Homepage";
</script>
</body>
</html>
Text
<html>
<body>
<h1></h1>
<p>Welcome to my homepage</p>
<script>
$("h1").innerHTML("Mattias Homepage");
</script>
</body>
</html>
Text
Once a best friend forever
...until the era of webapps
It has grown from
a handy DOM manipulation tool...
Text
to an all-in-one juggernaut
without much forethoughts
Then, there is
It brings structures to our codes
...but still uses jQuery to handle the Views
What about
Well, since Backbone is unopinionated...
It lacks the necessary tools
to easily manage any webapp
above a certain threshold in complexity
From personal experiences...
(Many real-world webapps belong to this category)
In the end,
Backbone asks you to write
to get what you want
Text
Here to save your day
What the * is
and why should I use it, exactly?
Text
(Once you two become good buddies)
(Both in terms of code structure and robustness)
(w00t!)
Text
puts a heavy emphasis on
Text
Text
Model − It is the lowest level of the pattern responsible for maintaining data.
View − It is responsible for displaying all or a portion of the data to the user.
Controller − It is a software Code that controls the interactions between the Model and View.
Text
Text
ng-app − This directive defines and links an AngularJS application to HTML.
ng-model − This directive binds the values of AngularJS application data to HTML input controls.
ng-bind − This directive binds the AngularJS Application data to HTML tags.
Text
ng-app − This directive starts an AngularJS Application.
ng-init − This directive initializes application data.
ng-model − This directive defines the model that is variable to be used in AngularJS.
ng-repeat − This directive repeats html elements for each item in a collection.
Scope in AngularJS
is a plain old Javascript object
$scope
{
$$childHead: Child
$$childTail: Child
$$listeners: Object
$$nextSibling: Child
$$prevSibling: null
$$watchers: Array[2]
$id: '004'
$parent: Child
...
}
Each
has its own Scope
The properties of a Scope is the
corresponding Controller's
And the
knows nothing about the Controller
...except those
exposed through the Scope
nirmalkamath@gmail.com
http://codenirmal.com/