-
Notifications
You must be signed in to change notification settings - Fork 13.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
@gvaish Merge remote-tracking branch 't/gh-pages' into gh-pages
- Loading branch information
Showing
316 changed files
with
17,488 additions
and
2,648 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# AngularJS (performance optimized) TodoMVC app | ||
|
||
The normal AngularJS TodoMVC implemetation performs deep watching of the todos array object. This means that it keeps an in-memory copy of the complete array that is used for dirty checking in order to detect model mutations. For smaller applications such as TodoMVC, this is completely fine as one trades off a little memory and performance for the sake of simplicity. | ||
|
||
In larger more complex applications however, where one might be working with 100s or 1000s of large objects one definitely should avoid using this approach. This implementation of the AngularJS app demonstrates the correct way to approach this problem when working in larger apps. |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
38 changes: 38 additions & 0 deletions
38
architecture-examples/canjs/bower_components/todomvc-common/base.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
(function () { | ||
'use strict'; | ||
|
||
if (location.hostname === 'todomvc.com') { | ||
window._gaq = [['_setAccount','UA-31081062-1'],['_trackPageview']];(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];g.src='//www.google-analytics.com/ga.js';s.parentNode.insertBefore(g,s)}(document,'script')); | ||
} | ||
|
||
function getSourcePath() { | ||
// If accessed via tastejs.github.io/todomvc/, strip the project path. | ||
if (location.hostname.indexOf('github.io') > 0) { | ||
return location.pathname.replace(/todomvc\//, ''); | ||
} | ||
return location.pathname; | ||
} | ||
|
||
function appendSourceLink() { | ||
var sourceLink = document.createElement('a'); | ||
var paragraph = document.createElement('p'); | ||
var footer = document.getElementById('info'); | ||
var urlBase = 'https://github.com/tastejs/todomvc/tree/gh-pages'; | ||
|
||
if (footer) { | ||
sourceLink.href = urlBase + getSourcePath(); | ||
sourceLink.appendChild(document.createTextNode('Check out the source')); | ||
paragraph.appendChild(sourceLink); | ||
footer.appendChild(paragraph); | ||
} | ||
} | ||
|
||
function redirect() { | ||
if (location.hostname === 'tastejs.github.io') { | ||
location.href = location.href.replace('tastejs.github.io/todomvc', 'todomvc.com'); | ||
} | ||
} | ||
|
||
appendSourceLink(); | ||
redirect(); | ||
})(); |
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
38 changes: 38 additions & 0 deletions
38
architecture-examples/closure/bower_components/todomvc-common/base.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
(function () { | ||
'use strict'; | ||
|
||
if (location.hostname === 'todomvc.com') { | ||
window._gaq = [['_setAccount','UA-31081062-1'],['_trackPageview']];(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];g.src='//www.google-analytics.com/ga.js';s.parentNode.insertBefore(g,s)}(document,'script')); | ||
} | ||
|
||
function getSourcePath() { | ||
// If accessed via tastejs.github.io/todomvc/, strip the project path. | ||
if (location.hostname.indexOf('github.io') > 0) { | ||
return location.pathname.replace(/todomvc\//, ''); | ||
} | ||
return location.pathname; | ||
} | ||
|
||
function appendSourceLink() { | ||
var sourceLink = document.createElement('a'); | ||
var paragraph = document.createElement('p'); | ||
var footer = document.getElementById('info'); | ||
var urlBase = 'https://github.com/tastejs/todomvc/tree/gh-pages'; | ||
|
||
if (footer) { | ||
sourceLink.href = urlBase + getSourcePath(); | ||
sourceLink.appendChild(document.createTextNode('Check out the source')); | ||
paragraph.appendChild(sourceLink); | ||
footer.appendChild(paragraph); | ||
} | ||
} | ||
|
||
function redirect() { | ||
if (location.hostname === 'tastejs.github.io') { | ||
location.href = location.href.replace('tastejs.github.io/todomvc', 'todomvc.com'); | ||
} | ||
} | ||
|
||
appendSourceLink(); | ||
redirect(); | ||
})(); |
File renamed without changes
38 changes: 0 additions & 38 deletions
38
architecture-examples/closure/components/todomvc-common/base.js
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.