├── .idea
├── .name
├── misc.xml
├── scopes
│ └── scope_settings.xml
├── encodings.xml
├── vcs.xml
├── modules.xml
└── ng-perf.iml
├── demo-app
├── bower_components
│ ├── jquery
│ │ ├── src
│ │ │ ├── outro.js
│ │ │ ├── selector.js
│ │ │ ├── var
│ │ │ │ ├── arr.js
│ │ │ │ ├── rnotwhite.js
│ │ │ │ ├── strundefined.js
│ │ │ │ ├── concat.js
│ │ │ │ ├── push.js
│ │ │ │ ├── slice.js
│ │ │ │ ├── class2type.js
│ │ │ │ ├── indexOf.js
│ │ │ │ ├── pnum.js
│ │ │ │ ├── toString.js
│ │ │ │ ├── hasOwn.js
│ │ │ │ └── support.js
│ │ │ ├── ajax
│ │ │ │ ├── var
│ │ │ │ │ ├── rquery.js
│ │ │ │ │ └── nonce.js
│ │ │ │ ├── parseJSON.js
│ │ │ │ ├── parseXML.js
│ │ │ │ ├── script.js
│ │ │ │ ├── load.js
│ │ │ │ ├── jsonp.js
│ │ │ │ └── xhr.js
│ │ │ ├── css
│ │ │ │ ├── var
│ │ │ │ │ ├── rmargin.js
│ │ │ │ │ ├── cssExpand.js
│ │ │ │ │ ├── rnumnonpx.js
│ │ │ │ │ ├── getStyles.js
│ │ │ │ │ └── isHidden.js
│ │ │ │ ├── hiddenVisibleSelectors.js
│ │ │ │ ├── swap.js
│ │ │ │ ├── addGetHookIf.js
│ │ │ │ ├── curCSS.js
│ │ │ │ ├── defaultDisplay.js
│ │ │ │ └── support.js
│ │ │ ├── manipulation
│ │ │ │ ├── var
│ │ │ │ │ └── rcheckableType.js
│ │ │ │ ├── _evalUrl.js
│ │ │ │ └── support.js
│ │ │ ├── data
│ │ │ │ ├── var
│ │ │ │ │ ├── data_priv.js
│ │ │ │ │ └── data_user.js
│ │ │ │ ├── accepts.js
│ │ │ │ └── Data.js
│ │ │ ├── core
│ │ │ │ ├── var
│ │ │ │ │ └── rsingleTag.js
│ │ │ │ ├── parseHTML.js
│ │ │ │ ├── access.js
│ │ │ │ ├── ready.js
│ │ │ │ └── init.js
│ │ │ ├── traversing
│ │ │ │ ├── var
│ │ │ │ │ └── rneedsContext.js
│ │ │ │ └── findFilter.js
│ │ │ ├── event
│ │ │ │ ├── support.js
│ │ │ │ └── alias.js
│ │ │ ├── attributes.js
│ │ │ ├── deprecated.js
│ │ │ ├── effects
│ │ │ │ ├── animatedSelector.js
│ │ │ │ └── Tween.js
│ │ │ ├── selector-sizzle.js
│ │ │ ├── queue
│ │ │ │ └── delay.js
│ │ │ ├── jquery.js
│ │ │ ├── exports
│ │ │ │ ├── global.js
│ │ │ │ └── amd.js
│ │ │ ├── attributes
│ │ │ │ ├── support.js
│ │ │ │ ├── prop.js
│ │ │ │ ├── attr.js
│ │ │ │ ├── val.js
│ │ │ │ └── classes.js
│ │ │ ├── intro.js
│ │ │ ├── wrap.js
│ │ │ ├── dimensions.js
│ │ │ ├── serialize.js
│ │ │ ├── queue.js
│ │ │ ├── deferred.js
│ │ │ ├── selector-native.js
│ │ │ ├── traversing.js
│ │ │ ├── data.js
│ │ │ ├── offset.js
│ │ │ ├── callbacks.js
│ │ │ ├── core.js
│ │ │ └── css.js
│ │ ├── bower.json
│ │ ├── .bower.json
│ │ └── MIT-LICENSE.txt
│ ├── angular-route
│ │ ├── bower.json
│ │ ├── .bower.json
│ │ ├── package.json
│ │ ├── README.md
│ │ ├── angular-route.min.js
│ │ └── angular-route.min.js.map
│ ├── ng-perf
│ │ ├── lib
│ │ │ ├── ng-perf-patches.js
│ │ │ └── ngpLocalEventDirs.js
│ │ ├── bower.json
│ │ ├── .bower.json
│ │ └── README.md
│ └── bower_components
│ │ └── ng-perf
│ │ ├── lib
│ │ ├── ng-perf-patches.js
│ │ └── ngpLocalEventDirs.js
│ │ ├── bower.json
│ │ └── .bower.json
├── ng-repeat
│ ├── direct.html
│ ├── repeat-template.html
│ ├── bind-once.html
│ ├── expression-bind.html
│ ├── ng-bind.html
│ ├── class-expression.html
│ ├── ng-style.html
│ ├── ng-class.html
│ ├── complex-expressions.html
│ ├── repeat-view.html
│ └── repeat-ctrl.js
├── angular
├── expressions
│ ├── expressions-view.html
│ └── expressions-ctrl.js
├── directives
│ └── randomButton.js
├── index.html
└── app.js
├── .gitignore
├── lib
├── ng-perf-patches.js
└── ngpLocalEventDirs.js
├── bower.json
└── README.md
/.idea/.name:
--------------------------------------------------------------------------------
1 | ng-perf
--------------------------------------------------------------------------------
/demo-app/bower_components/jquery/src/outro.js:
--------------------------------------------------------------------------------
1 | }));
2 |
--------------------------------------------------------------------------------
/demo-app/ng-repeat/direct.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | angular/
2 | node_modules/
3 | _site/
4 | .idea/
5 |
--------------------------------------------------------------------------------
/demo-app/angular:
--------------------------------------------------------------------------------
1 | /Users/ambikasukla/projects/angular.js/build/
--------------------------------------------------------------------------------
/demo-app/bower_components/jquery/src/selector.js:
--------------------------------------------------------------------------------
1 | define([ "./selector-sizzle" ]);
2 |
--------------------------------------------------------------------------------
/demo-app/bower_components/jquery/src/var/arr.js:
--------------------------------------------------------------------------------
1 | define(function() {
2 | return [];
3 | });
4 |
--------------------------------------------------------------------------------
/demo-app/bower_components/jquery/src/ajax/var/rquery.js:
--------------------------------------------------------------------------------
1 | define(function() {
2 | return (/\?/);
3 | });
4 |
--------------------------------------------------------------------------------
/demo-app/bower_components/jquery/src/var/rnotwhite.js:
--------------------------------------------------------------------------------
1 | define(function() {
2 | return (/\S+/g);
3 | });
4 |
--------------------------------------------------------------------------------
/demo-app/bower_components/jquery/src/css/var/rmargin.js:
--------------------------------------------------------------------------------
1 | define(function() {
2 | return (/^margin/);
3 | });
4 |
--------------------------------------------------------------------------------
/demo-app/bower_components/jquery/src/var/strundefined.js:
--------------------------------------------------------------------------------
1 | define(function() {
2 | return typeof undefined;
3 | });
4 |
--------------------------------------------------------------------------------
/demo-app/bower_components/jquery/src/var/concat.js:
--------------------------------------------------------------------------------
1 | define([
2 | "./arr"
3 | ], function( arr ) {
4 | return arr.concat;
5 | });
6 |
--------------------------------------------------------------------------------
/demo-app/bower_components/jquery/src/var/push.js:
--------------------------------------------------------------------------------
1 | define([
2 | "./arr"
3 | ], function( arr ) {
4 | return arr.push;
5 | });
6 |
--------------------------------------------------------------------------------
/demo-app/bower_components/jquery/src/var/slice.js:
--------------------------------------------------------------------------------
1 | define([
2 | "./arr"
3 | ], function( arr ) {
4 | return arr.slice;
5 | });
6 |
--------------------------------------------------------------------------------
/demo-app/bower_components/jquery/src/var/class2type.js:
--------------------------------------------------------------------------------
1 | define(function() {
2 | // [[Class]] -> type pairs
3 | return {};
4 | });
5 |
--------------------------------------------------------------------------------
/demo-app/bower_components/jquery/src/var/indexOf.js:
--------------------------------------------------------------------------------
1 | define([
2 | "./arr"
3 | ], function( arr ) {
4 | return arr.indexOf;
5 | });
6 |
--------------------------------------------------------------------------------
/demo-app/bower_components/jquery/src/css/var/cssExpand.js:
--------------------------------------------------------------------------------
1 | define(function() {
2 | return [ "Top", "Right", "Bottom", "Left" ];
3 | });
4 |
--------------------------------------------------------------------------------
/demo-app/bower_components/jquery/src/manipulation/var/rcheckableType.js:
--------------------------------------------------------------------------------
1 | define(function() {
2 | return (/^(?:checkbox|radio)$/i);
3 | });
4 |
--------------------------------------------------------------------------------
/demo-app/bower_components/jquery/src/var/pnum.js:
--------------------------------------------------------------------------------
1 | define(function() {
2 | return (/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/).source;
3 | });
4 |
--------------------------------------------------------------------------------
/demo-app/bower_components/jquery/src/ajax/var/nonce.js:
--------------------------------------------------------------------------------
1 | define([
2 | "../../core"
3 | ], function( jQuery ) {
4 | return jQuery.now();
5 | });
6 |
--------------------------------------------------------------------------------
/demo-app/bower_components/jquery/src/data/var/data_priv.js:
--------------------------------------------------------------------------------
1 | define([
2 | "../Data"
3 | ], function( Data ) {
4 | return new Data();
5 | });
6 |
--------------------------------------------------------------------------------
/demo-app/bower_components/jquery/src/data/var/data_user.js:
--------------------------------------------------------------------------------
1 | define([
2 | "../Data"
3 | ], function( Data ) {
4 | return new Data();
5 | });
6 |
--------------------------------------------------------------------------------
/demo-app/bower_components/jquery/src/var/toString.js:
--------------------------------------------------------------------------------
1 | define([
2 | "./class2type"
3 | ], function( class2type ) {
4 | return class2type.toString;
5 | });
6 |
--------------------------------------------------------------------------------
/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/demo-app/bower_components/jquery/src/var/hasOwn.js:
--------------------------------------------------------------------------------
1 | define([
2 | "./class2type"
3 | ], function( class2type ) {
4 | return class2type.hasOwnProperty;
5 | });
6 |
--------------------------------------------------------------------------------
/demo-app/bower_components/jquery/src/core/var/rsingleTag.js:
--------------------------------------------------------------------------------
1 | define(function() {
2 | // Match a standalone tag
3 | return (/^<(\w+)\s*\/?>(?:<\/\1>|)$/);
4 | });
5 |
--------------------------------------------------------------------------------
/demo-app/bower_components/jquery/src/var/support.js:
--------------------------------------------------------------------------------
1 | define(function() {
2 | // All support tests are defined in their respective modules.
3 | return {};
4 | });
5 |
--------------------------------------------------------------------------------
/demo-app/expressions/expressions-view.html:
--------------------------------------------------------------------------------
1 |
2 | {{test}}
3 |
4 |
--------------------------------------------------------------------------------
/.idea/scopes/scope_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/demo-app/bower_components/jquery/src/css/var/rnumnonpx.js:
--------------------------------------------------------------------------------
1 | define([
2 | "../../var/pnum"
3 | ], function( pnum ) {
4 | return new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" );
5 | });
6 |
--------------------------------------------------------------------------------
/demo-app/bower_components/jquery/src/traversing/var/rneedsContext.js:
--------------------------------------------------------------------------------
1 | define([
2 | "../../core",
3 | "../../selector"
4 | ], function( jQuery ) {
5 | return jQuery.expr.match.needsContext;
6 | });
7 |
--------------------------------------------------------------------------------
/.idea/encodings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/demo-app/bower_components/jquery/src/css/var/getStyles.js:
--------------------------------------------------------------------------------
1 | define(function() {
2 | return function( elem ) {
3 | return elem.ownerDocument.defaultView.getComputedStyle( elem, null );
4 | };
5 | });
6 |
--------------------------------------------------------------------------------
/demo-app/bower_components/angular-route/bower.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "angular-route",
3 | "version": "1.3.0",
4 | "main": "./angular-route.js",
5 | "dependencies": {
6 | "angular": "1.3.0"
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/demo-app/bower_components/jquery/src/event/support.js:
--------------------------------------------------------------------------------
1 | define([
2 | "../var/support"
3 | ], function( support ) {
4 |
5 | support.focusinBubbles = "onfocusin" in window;
6 |
7 | return support;
8 |
9 | });
10 |
--------------------------------------------------------------------------------
/demo-app/expressions/expressions-ctrl.js:
--------------------------------------------------------------------------------
1 | var module = angular.module('blah', []);
2 |
3 | module.controller('expressionsController', ['$scope', function($scope) {
4 | $scope.test = "Success";
5 | $scope.blah = function () {
6 |
7 | }
8 | }]);
--------------------------------------------------------------------------------
/demo-app/bower_components/jquery/src/attributes.js:
--------------------------------------------------------------------------------
1 | define([
2 | "./core",
3 | "./attributes/attr",
4 | "./attributes/prop",
5 | "./attributes/classes",
6 | "./attributes/val"
7 | ], function( jQuery ) {
8 |
9 | // Return jQuery for attributes-only inclusion
10 | return jQuery;
11 | });
12 |
--------------------------------------------------------------------------------
/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/demo-app/bower_components/jquery/src/ajax/parseJSON.js:
--------------------------------------------------------------------------------
1 | define([
2 | "../core"
3 | ], function( jQuery ) {
4 |
5 | // Support: Android 2.3
6 | // Workaround failure to string-cast null input
7 | jQuery.parseJSON = function( data ) {
8 | return JSON.parse( data + "" );
9 | };
10 |
11 | return jQuery.parseJSON;
12 |
13 | });
14 |
--------------------------------------------------------------------------------
/demo-app/bower_components/jquery/src/deprecated.js:
--------------------------------------------------------------------------------
1 | define([
2 | "./core",
3 | "./traversing"
4 | ], function( jQuery ) {
5 |
6 | // The number of elements contained in the matched element set
7 | jQuery.fn.size = function() {
8 | return this.length;
9 | };
10 |
11 | jQuery.fn.andSelf = jQuery.fn.addBack;
12 |
13 | });
14 |
--------------------------------------------------------------------------------
/demo-app/bower_components/jquery/src/effects/animatedSelector.js:
--------------------------------------------------------------------------------
1 | define([
2 | "../core",
3 | "../selector",
4 | "../effects"
5 | ], function( jQuery ) {
6 |
7 | jQuery.expr.filters.animated = function( elem ) {
8 | return jQuery.grep(jQuery.timers, function( fn ) {
9 | return elem === fn.elem;
10 | }).length;
11 | };
12 |
13 | });
14 |
--------------------------------------------------------------------------------
/demo-app/bower_components/jquery/src/manipulation/_evalUrl.js:
--------------------------------------------------------------------------------
1 | define([
2 | "../ajax"
3 | ], function( jQuery ) {
4 |
5 | jQuery._evalUrl = function( url ) {
6 | return jQuery.ajax({
7 | url: url,
8 | type: "GET",
9 | dataType: "script",
10 | async: false,
11 | global: false,
12 | "throws": true
13 | });
14 | };
15 |
16 | return jQuery._evalUrl;
17 |
18 | });
19 |
--------------------------------------------------------------------------------
/demo-app/bower_components/jquery/src/selector-sizzle.js:
--------------------------------------------------------------------------------
1 | define([
2 | "./core",
3 | "sizzle"
4 | ], function( jQuery, Sizzle ) {
5 |
6 | jQuery.find = Sizzle;
7 | jQuery.expr = Sizzle.selectors;
8 | jQuery.expr[":"] = jQuery.expr.pseudos;
9 | jQuery.unique = Sizzle.uniqueSort;
10 | jQuery.text = Sizzle.getText;
11 | jQuery.isXMLDoc = Sizzle.isXML;
12 | jQuery.contains = Sizzle.contains;
13 |
14 | });
15 |
--------------------------------------------------------------------------------
/demo-app/bower_components/jquery/src/css/var/isHidden.js:
--------------------------------------------------------------------------------
1 | define([
2 | "../../core",
3 | "../../selector"
4 | // css is assumed
5 | ], function( jQuery ) {
6 |
7 | return function( elem, el ) {
8 | // isHidden might be called from jQuery#filter function;
9 | // in that case, element will be second argument
10 | elem = el || elem;
11 | return jQuery.css( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument, elem );
12 | };
13 | });
14 |
--------------------------------------------------------------------------------
/lib/ng-perf-patches.js:
--------------------------------------------------------------------------------
1 | /**
2 | *
3 | * License: MIT
4 | * @Description: Shameless hacks to workaround angular performance bottlenecks
5 | *
6 | */
7 | //Bypass .data calls with argument $binding improves ng-bind and {{}} expression binding performance
8 | //Applies to 1.2 only
9 | if (jQuery) {
10 | var originalFn = $.fn.data;
11 | $.fn.data = function() {
12 | if (arguments[0] !== '$binding')
13 | return originalFn.apply(this, arguments);
14 | }
15 | }
--------------------------------------------------------------------------------
/demo-app/bower_components/jquery/src/css/hiddenVisibleSelectors.js:
--------------------------------------------------------------------------------
1 | define([
2 | "../core",
3 | "../selector"
4 | ], function( jQuery ) {
5 |
6 | jQuery.expr.filters.hidden = function( elem ) {
7 | // Support: Opera <= 12.12
8 | // Opera reports offsetWidths and offsetHeights less than zero on some elements
9 | return elem.offsetWidth <= 0 && elem.offsetHeight <= 0;
10 | };
11 | jQuery.expr.filters.visible = function( elem ) {
12 | return !jQuery.expr.filters.hidden( elem );
13 | };
14 |
15 | });
16 |
--------------------------------------------------------------------------------
/demo-app/bower_components/jquery/src/data/accepts.js:
--------------------------------------------------------------------------------
1 | define([
2 | "../core"
3 | ], function( jQuery ) {
4 |
5 | /**
6 | * Determines whether an object can have data
7 | */
8 | jQuery.acceptData = function( owner ) {
9 | // Accepts only:
10 | // - Node
11 | // - Node.ELEMENT_NODE
12 | // - Node.DOCUMENT_NODE
13 | // - Object
14 | // - Any
15 | /* jshint -W018 */
16 | return owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType );
17 | };
18 |
19 | return jQuery.acceptData;
20 | });
21 |
--------------------------------------------------------------------------------
/demo-app/bower_components/ng-perf/lib/ng-perf-patches.js:
--------------------------------------------------------------------------------
1 | /**
2 | *
3 | * License: MIT
4 | * @Description: Shameless hacks to workaround angular performance bottlenecks
5 | *
6 | */
7 | //Bypass .data calls with argument $binding improves ng-bind and {{}} expression binding performance
8 | //Applies to 1.2 only
9 | if (jQuery) {
10 | var originalFn = $.fn.data;
11 | $.fn.data = function() {
12 | if (arguments[0] !== '$binding')
13 | return originalFn.apply(this, arguments);
14 | }
15 | }
--------------------------------------------------------------------------------
/demo-app/bower_components/bower_components/ng-perf/lib/ng-perf-patches.js:
--------------------------------------------------------------------------------
1 | /**
2 | *
3 | * License: MIT
4 | * @Description: Shameless hacks to workaround angular performance bottlenecks
5 | *
6 | */
7 | //Bypass .data calls with argument $binding improves ng-bind and {{}} expression binding performance
8 | //Applies to 1.2 only
9 | if (jQuery) {
10 | var originalFn = $.fn.data;
11 | $.fn.data = function() {
12 | if (arguments[0] !== '$binding')
13 | return originalFn.apply(this, arguments);
14 | }
15 | }
--------------------------------------------------------------------------------
/demo-app/bower_components/ng-perf/bower.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "ng-perf",
3 | "version": "0.1.0",
4 | "homepage": "https://github.com/ansukla/ng-perf",
5 | "authors": [
6 | "Ambika Sukla "
7 | ],
8 | "description": "add-ons to improve angularjs app performance",
9 | "keywords": [
10 | "perfmatters",
11 | "angularjs"
12 | ],
13 | "license": "MIT",
14 | "ignore": [
15 | "**/.*",
16 | "node_modules",
17 | "bower_components",
18 | "test",
19 | "demo-app",
20 | "tests"
21 | ]
22 | }
23 |
--------------------------------------------------------------------------------
/demo-app/bower_components/bower_components/ng-perf/bower.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "ng-perf",
3 | "version": "0.1.0",
4 | "homepage": "https://github.com/ansukla/ng-perf",
5 | "authors": [
6 | "Ambika Sukla "
7 | ],
8 | "description": "add-ons to improve angularjs app performance",
9 | "keywords": [
10 | "perfmatters",
11 | "angularjs"
12 | ],
13 | "license": "MIT",
14 | "ignore": [
15 | "**/.*",
16 | "node_modules",
17 | "bower_components",
18 | "test",
19 | "demo-app",
20 | "tests"
21 | ]
22 | }
23 |
--------------------------------------------------------------------------------
/bower.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "ng-perf",
3 | "version": "0.1.0",
4 | "homepage": "https://github.com/ansukla/ng-perf",
5 | "authors": [
6 | "Ambika Sukla "
7 | ],
8 | "description": "add-ons to improve angularjs app performance",
9 | "keywords": [
10 | "perfmatters",
11 | "angularjs"
12 | ],
13 | "main": [
14 | "lib/ngpLocalEventDirs.js"
15 | ],
16 | "license": "MIT",
17 | "ignore": [
18 | "**/.*",
19 | "node_modules",
20 | "bower_components",
21 | "test",
22 | "demo-app",
23 | "tests"
24 | ]
25 | }
26 |
--------------------------------------------------------------------------------
/demo-app/bower_components/jquery/bower.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "jquery",
3 | "version": "2.1.1",
4 | "main": "dist/jquery.js",
5 | "license": "MIT",
6 | "ignore": [
7 | "**/.*",
8 | "build",
9 | "speed",
10 | "test",
11 | "*.md",
12 | "AUTHORS.txt",
13 | "Gruntfile.js",
14 | "package.json"
15 | ],
16 | "devDependencies": {
17 | "sizzle": "1.10.19",
18 | "requirejs": "2.1.10",
19 | "qunit": "1.14.0",
20 | "sinon": "1.8.1"
21 | },
22 | "keywords": [
23 | "jquery",
24 | "javascript",
25 | "library"
26 | ]
27 | }
28 |
--------------------------------------------------------------------------------
/demo-app/bower_components/angular-route/.bower.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "angular-route",
3 | "version": "1.3.0",
4 | "main": "./angular-route.js",
5 | "dependencies": {
6 | "angular": "1.3.0"
7 | },
8 | "homepage": "https://github.com/angular/bower-angular-route",
9 | "_release": "1.3.0",
10 | "_resolution": {
11 | "type": "version",
12 | "tag": "v1.3.0",
13 | "commit": "73a3cc8371603e22e32b6dc5354116f73b91e164"
14 | },
15 | "_source": "git://github.com/angular/bower-angular-route.git",
16 | "_target": "~1.3.0",
17 | "_originalSource": "angular-route",
18 | "_direct": true
19 | }
--------------------------------------------------------------------------------
/.idea/ng-perf.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/demo-app/bower_components/jquery/src/ajax/parseXML.js:
--------------------------------------------------------------------------------
1 | define([
2 | "../core"
3 | ], function( jQuery ) {
4 |
5 | // Cross-browser xml parsing
6 | jQuery.parseXML = function( data ) {
7 | var xml, tmp;
8 | if ( !data || typeof data !== "string" ) {
9 | return null;
10 | }
11 |
12 | // Support: IE9
13 | try {
14 | tmp = new DOMParser();
15 | xml = tmp.parseFromString( data, "text/xml" );
16 | } catch ( e ) {
17 | xml = undefined;
18 | }
19 |
20 | if ( !xml || xml.getElementsByTagName( "parsererror" ).length ) {
21 | jQuery.error( "Invalid XML: " + data );
22 | }
23 | return xml;
24 | };
25 |
26 | return jQuery.parseXML;
27 |
28 | });
29 |
--------------------------------------------------------------------------------
/demo-app/bower_components/jquery/src/queue/delay.js:
--------------------------------------------------------------------------------
1 | define([
2 | "../core",
3 | "../queue",
4 | "../effects" // Delay is optional because of this dependency
5 | ], function( jQuery ) {
6 |
7 | // Based off of the plugin by Clint Helfers, with permission.
8 | // http://blindsignals.com/index.php/2009/07/jquery-delay/
9 | jQuery.fn.delay = function( time, type ) {
10 | time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;
11 | type = type || "fx";
12 |
13 | return this.queue( type, function( next, hooks ) {
14 | var timeout = setTimeout( next, time );
15 | hooks.stop = function() {
16 | clearTimeout( timeout );
17 | };
18 | });
19 | };
20 |
21 | return jQuery.fn.delay;
22 | });
23 |
--------------------------------------------------------------------------------
/demo-app/ng-repeat/repeat-template.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | | {{$index + 1}} |
4 |
5 | {{contact.name}}
6 | |
7 | {{contact.company}} |
8 | {{contact.email}} |
9 | {{contact.age}} |
10 | {{contact.eyeColor}} |
11 | {{contact.gender}} |
12 | {{contact.phone}} |
13 | {{contact.address}} |
14 | {{contact.registered}} |
15 | {{contact.latitude}} |
16 | {{contact.longitude}} |
17 | {{contact.favoriteFruit}} |
18 |
19 |
--------------------------------------------------------------------------------
/demo-app/bower_components/jquery/src/css/swap.js:
--------------------------------------------------------------------------------
1 | define([
2 | "../core"
3 | ], function( jQuery ) {
4 |
5 | // A method for quickly swapping in/out CSS properties to get correct calculations.
6 | jQuery.swap = function( elem, options, callback, args ) {
7 | var ret, name,
8 | old = {};
9 |
10 | // Remember the old values, and insert the new ones
11 | for ( name in options ) {
12 | old[ name ] = elem.style[ name ];
13 | elem.style[ name ] = options[ name ];
14 | }
15 |
16 | ret = callback.apply( elem, args || [] );
17 |
18 | // Revert the old values
19 | for ( name in options ) {
20 | elem.style[ name ] = old[ name ];
21 | }
22 |
23 | return ret;
24 | };
25 |
26 | return jQuery.swap;
27 |
28 | });
29 |
--------------------------------------------------------------------------------
/demo-app/bower_components/jquery/src/css/addGetHookIf.js:
--------------------------------------------------------------------------------
1 | define(function() {
2 |
3 | function addGetHookIf( conditionFn, hookFn ) {
4 | // Define the hook, we'll check on the first run if it's really needed.
5 | return {
6 | get: function() {
7 | if ( conditionFn() ) {
8 | // Hook not needed (or it's not possible to use it due to missing dependency),
9 | // remove it.
10 | // Since there are no other hooks for marginRight, remove the whole object.
11 | delete this.get;
12 | return;
13 | }
14 |
15 | // Hook needed; redefine it so that the support test is not executed again.
16 |
17 | return (this.get = hookFn).apply( this, arguments );
18 | }
19 | };
20 | }
21 |
22 | return addGetHookIf;
23 |
24 | });
25 |
--------------------------------------------------------------------------------
/demo-app/directives/randomButton.js:
--------------------------------------------------------------------------------
1 | angular.module('ngPerf.randomButton', [])
2 | .directive('randomButton', function() {
3 | return {
4 | restrict: 'EA',
5 | scope: {},
6 | controller: function($scope) {
7 | $scope.randomNumber = '123';
8 | $scope.generateRandom = function() {
9 | $scope.randomNumber = Math.floor(Math.random()*100);
10 | // event.preventDefault(); //uncomment to suppress digest altogether
11 | }
12 | },
13 | template: '',
14 | link: function(){}
15 | };
16 | });
--------------------------------------------------------------------------------
/demo-app/bower_components/angular-route/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "angular-route",
3 | "version": "1.3.0",
4 | "description": "AngularJS router module",
5 | "main": "angular-route.js",
6 | "scripts": {
7 | "test": "echo \"Error: no test specified\" && exit 1"
8 | },
9 | "repository": {
10 | "type": "git",
11 | "url": "https://github.com/angular/angular.js.git"
12 | },
13 | "keywords": [
14 | "angular",
15 | "framework",
16 | "browser",
17 | "router",
18 | "client-side"
19 | ],
20 | "author": "Angular Core Team ",
21 | "license": "MIT",
22 | "bugs": {
23 | "url": "https://github.com/angular/angular.js/issues"
24 | },
25 | "homepage": "http://angularjs.org"
26 | }
27 |
--------------------------------------------------------------------------------
/demo-app/bower_components/jquery/src/jquery.js:
--------------------------------------------------------------------------------
1 | define([
2 | "./core",
3 | "./selector",
4 | "./traversing",
5 | "./callbacks",
6 | "./deferred",
7 | "./core/ready",
8 | "./data",
9 | "./queue",
10 | "./queue/delay",
11 | "./attributes",
12 | "./event",
13 | "./event/alias",
14 | "./manipulation",
15 | "./manipulation/_evalUrl",
16 | "./wrap",
17 | "./css",
18 | "./css/hiddenVisibleSelectors",
19 | "./serialize",
20 | "./ajax",
21 | "./ajax/xhr",
22 | "./ajax/script",
23 | "./ajax/jsonp",
24 | "./ajax/load",
25 | "./effects",
26 | "./effects/animatedSelector",
27 | "./offset",
28 | "./dimensions",
29 | "./deprecated",
30 | "./exports/amd",
31 | "./exports/global"
32 | ], function( jQuery ) {
33 |
34 | return jQuery;
35 |
36 | });
37 |
--------------------------------------------------------------------------------
/demo-app/bower_components/jquery/src/exports/global.js:
--------------------------------------------------------------------------------
1 | define([
2 | "../core",
3 | "../var/strundefined"
4 | ], function( jQuery, strundefined ) {
5 |
6 | var
7 | // Map over jQuery in case of overwrite
8 | _jQuery = window.jQuery,
9 |
10 | // Map over the $ in case of overwrite
11 | _$ = window.$;
12 |
13 | jQuery.noConflict = function( deep ) {
14 | if ( window.$ === jQuery ) {
15 | window.$ = _$;
16 | }
17 |
18 | if ( deep && window.jQuery === jQuery ) {
19 | window.jQuery = _jQuery;
20 | }
21 |
22 | return jQuery;
23 | };
24 |
25 | // Expose jQuery and $ identifiers, even in
26 | // AMD (#7102#comment:10, https://github.com/jquery/jquery/pull/557)
27 | // and CommonJS for browser emulators (#13566)
28 | if ( typeof noGlobal === strundefined ) {
29 | window.jQuery = window.$ = jQuery;
30 | }
31 |
32 | });
33 |
--------------------------------------------------------------------------------
/demo-app/bower_components/ng-perf/.bower.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "ng-perf",
3 | "homepage": "https://github.com/ansukla/ng-perf",
4 | "authors": [
5 | "Ambika Sukla "
6 | ],
7 | "description": "add-ons to improve angularjs app performance",
8 | "keywords": [
9 | "perfmatters",
10 | "angularjs"
11 | ],
12 | "license": "MIT",
13 | "ignore": [
14 | "**/.*",
15 | "node_modules",
16 | "bower_components",
17 | "test",
18 | "demo-app",
19 | "tests"
20 | ],
21 | "_release": "473140a1c3",
22 | "_resolution": {
23 | "type": "branch",
24 | "branch": "master",
25 | "commit": "473140a1c3aa00451791dfd9eebe85f8ea0c4920"
26 | },
27 | "_source": "git://github.com/ansukla/ng-perf.git",
28 | "_target": "*",
29 | "_originalSource": "ng-perf",
30 | "_direct": true
31 | }
--------------------------------------------------------------------------------
/demo-app/bower_components/bower_components/ng-perf/.bower.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "ng-perf",
3 | "homepage": "https://github.com/ansukla/ng-perf",
4 | "authors": [
5 | "Ambika Sukla "
6 | ],
7 | "description": "add-ons to improve angularjs app performance",
8 | "keywords": [
9 | "perfmatters",
10 | "angularjs"
11 | ],
12 | "license": "MIT",
13 | "ignore": [
14 | "**/.*",
15 | "node_modules",
16 | "bower_components",
17 | "test",
18 | "demo-app",
19 | "tests"
20 | ],
21 | "_release": "26d5606508",
22 | "_resolution": {
23 | "type": "branch",
24 | "branch": "master",
25 | "commit": "26d56065084cab17a89e61256e2430d598b25a20"
26 | },
27 | "_source": "git://github.com/ansukla/ng-perf.git",
28 | "_target": "*",
29 | "_originalSource": "ng-perf",
30 | "_direct": true
31 | }
--------------------------------------------------------------------------------
/demo-app/ng-repeat/bind-once.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | | Contacts |
5 |
6 |
7 | | {{::$index}} |
8 |
9 | {{::contact.name}}
10 | |
11 | {{::contact.company}} |
12 | {{::contact.email}} |
13 | {{::contact.age}} |
14 | {{::contact.eyeColor}} |
15 | {{::contact.gender}} |
16 | {{::contact.phone}} |
17 | {{::contact.address}} |
18 | {{::contact.registered}} |
19 | {{::contact.latitude}} |
20 | {{::contact.longitude}} |
21 | {{::contact.favoriteFruit}} |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/demo-app/ng-repeat/expression-bind.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | | Contacts |
6 |
7 |
8 | | {{$index + 1}} |
9 |
10 | {{contact.name}}
11 | |
12 | {{contact.company}} |
13 | {{contact.email}} |
14 | {{contact.age}} |
15 | {{contact.eyeColor}} |
16 | {{contact.gender}} |
17 | {{contact.phone}} |
18 | {{contact.address}} |
19 | {{contact.registered}} |
20 | {{contact.latitude}} |
21 | {{contact.longitude}} |
22 | {{contact.favoriteFruit}} |
23 |
24 |
25 |
26 |
29 |
--------------------------------------------------------------------------------
/demo-app/ng-repeat/ng-bind.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | | Contacts |
4 |
5 |
6 | |
7 |
8 | |
9 | |
10 | |
11 | |
12 | |
13 | |
14 | |
15 | |
16 | |
17 | |
18 | |
19 | |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/demo-app/bower_components/jquery/.bower.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "jquery",
3 | "version": "2.1.1",
4 | "main": "dist/jquery.js",
5 | "license": "MIT",
6 | "ignore": [
7 | "**/.*",
8 | "build",
9 | "speed",
10 | "test",
11 | "*.md",
12 | "AUTHORS.txt",
13 | "Gruntfile.js",
14 | "package.json"
15 | ],
16 | "devDependencies": {
17 | "sizzle": "1.10.19",
18 | "requirejs": "2.1.10",
19 | "qunit": "1.14.0",
20 | "sinon": "1.8.1"
21 | },
22 | "keywords": [
23 | "jquery",
24 | "javascript",
25 | "library"
26 | ],
27 | "homepage": "https://github.com/jquery/jquery",
28 | "_release": "2.1.1",
29 | "_resolution": {
30 | "type": "version",
31 | "tag": "2.1.1",
32 | "commit": "4dec426aa2a6cbabb1b064319ba7c272d594a688"
33 | },
34 | "_source": "git://github.com/jquery/jquery.git",
35 | "_target": "~2.1.1",
36 | "_originalSource": "jquery",
37 | "_direct": true
38 | }
--------------------------------------------------------------------------------
/demo-app/bower_components/jquery/src/exports/amd.js:
--------------------------------------------------------------------------------
1 | define([
2 | "../core"
3 | ], function( jQuery ) {
4 |
5 | // Register as a named AMD module, since jQuery can be concatenated with other
6 | // files that may use define, but not via a proper concatenation script that
7 | // understands anonymous AMD modules. A named AMD is safest and most robust
8 | // way to register. Lowercase jquery is used because AMD module names are
9 | // derived from file names, and jQuery is normally delivered in a lowercase
10 | // file name. Do this after creating the global so that if an AMD module wants
11 | // to call noConflict to hide this version of jQuery, it will work.
12 |
13 | // Note that for maximum portability, libraries that are not jQuery should
14 | // declare themselves as anonymous modules, and avoid setting a global if an
15 | // AMD loader is present. jQuery is a special case. For more information, see
16 | // https://github.com/jrburke/requirejs/wiki/Updating-existing-libraries#wiki-anon
17 |
18 | if ( typeof define === "function" && define.amd ) {
19 | define( "jquery", [], function() {
20 | return jQuery;
21 | });
22 | }
23 |
24 | });
25 |
--------------------------------------------------------------------------------
/demo-app/bower_components/jquery/src/core/parseHTML.js:
--------------------------------------------------------------------------------
1 | define([
2 | "../core",
3 | "./var/rsingleTag",
4 | "../manipulation" // buildFragment
5 | ], function( jQuery, rsingleTag ) {
6 |
7 | // data: string of html
8 | // context (optional): If specified, the fragment will be created in this context, defaults to document
9 | // keepScripts (optional): If true, will include scripts passed in the html string
10 | jQuery.parseHTML = function( data, context, keepScripts ) {
11 | if ( !data || typeof data !== "string" ) {
12 | return null;
13 | }
14 | if ( typeof context === "boolean" ) {
15 | keepScripts = context;
16 | context = false;
17 | }
18 | context = context || document;
19 |
20 | var parsed = rsingleTag.exec( data ),
21 | scripts = !keepScripts && [];
22 |
23 | // Single tag
24 | if ( parsed ) {
25 | return [ context.createElement( parsed[1] ) ];
26 | }
27 |
28 | parsed = jQuery.buildFragment( [ data ], context, scripts );
29 |
30 | if ( scripts && scripts.length ) {
31 | jQuery( scripts ).remove();
32 | }
33 |
34 | return jQuery.merge( [], parsed.childNodes );
35 | };
36 |
37 | return jQuery.parseHTML;
38 |
39 | });
40 |
--------------------------------------------------------------------------------
/demo-app/bower_components/jquery/src/manipulation/support.js:
--------------------------------------------------------------------------------
1 | define([
2 | "../var/support"
3 | ], function( support ) {
4 |
5 | (function() {
6 | var fragment = document.createDocumentFragment(),
7 | div = fragment.appendChild( document.createElement( "div" ) ),
8 | input = document.createElement( "input" );
9 |
10 | // #11217 - WebKit loses check when the name is after the checked attribute
11 | // Support: Windows Web Apps (WWA)
12 | // `name` and `type` need .setAttribute for WWA
13 | input.setAttribute( "type", "radio" );
14 | input.setAttribute( "checked", "checked" );
15 | input.setAttribute( "name", "t" );
16 |
17 | div.appendChild( input );
18 |
19 | // Support: Safari 5.1, iOS 5.1, Android 4.x, Android 2.3
20 | // old WebKit doesn't clone checked state correctly in fragments
21 | support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked;
22 |
23 | // Make sure textarea (and checkbox) defaultValue is properly cloned
24 | // Support: IE9-IE11+
25 | div.innerHTML = "";
26 | support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue;
27 | })();
28 |
29 | return support;
30 |
31 | });
32 |
--------------------------------------------------------------------------------
/demo-app/bower_components/jquery/src/attributes/support.js:
--------------------------------------------------------------------------------
1 | define([
2 | "../var/support"
3 | ], function( support ) {
4 |
5 | (function() {
6 | var input = document.createElement( "input" ),
7 | select = document.createElement( "select" ),
8 | opt = select.appendChild( document.createElement( "option" ) );
9 |
10 | input.type = "checkbox";
11 |
12 | // Support: iOS 5.1, Android 4.x, Android 2.3
13 | // Check the default checkbox/radio value ("" on old WebKit; "on" elsewhere)
14 | support.checkOn = input.value !== "";
15 |
16 | // Must access the parent to make an option select properly
17 | // Support: IE9, IE10
18 | support.optSelected = opt.selected;
19 |
20 | // Make sure that the options inside disabled selects aren't marked as disabled
21 | // (WebKit marks them as disabled)
22 | select.disabled = true;
23 | support.optDisabled = !opt.disabled;
24 |
25 | // Check if an input maintains its value after becoming a radio
26 | // Support: IE9, IE10
27 | input = document.createElement( "input" );
28 | input.value = "t";
29 | input.type = "radio";
30 | support.radioValue = input.value === "t";
31 | })();
32 |
33 | return support;
34 |
35 | });
36 |
--------------------------------------------------------------------------------
/demo-app/bower_components/jquery/MIT-LICENSE.txt:
--------------------------------------------------------------------------------
1 | Copyright 2014 jQuery Foundation and other contributors
2 | http://jquery.com/
3 |
4 | Permission is hereby granted, free of charge, to any person obtaining
5 | a copy of this software and associated documentation files (the
6 | "Software"), to deal in the Software without restriction, including
7 | without limitation the rights to use, copy, modify, merge, publish,
8 | distribute, sublicense, and/or sell copies of the Software, and to
9 | permit persons to whom the Software is furnished to do so, subject to
10 | the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be
13 | included in all copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
19 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
20 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 |
--------------------------------------------------------------------------------
/demo-app/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | Angular Performance Examples
4 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/demo-app/bower_components/jquery/src/event/alias.js:
--------------------------------------------------------------------------------
1 | define([
2 | "../core",
3 | "../event"
4 | ], function( jQuery ) {
5 |
6 | jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " +
7 | "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
8 | "change select submit keydown keypress keyup error contextmenu").split(" "), function( i, name ) {
9 |
10 | // Handle event binding
11 | jQuery.fn[ name ] = function( data, fn ) {
12 | return arguments.length > 0 ?
13 | this.on( name, null, data, fn ) :
14 | this.trigger( name );
15 | };
16 | });
17 |
18 | jQuery.fn.extend({
19 | hover: function( fnOver, fnOut ) {
20 | return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );
21 | },
22 |
23 | bind: function( types, data, fn ) {
24 | return this.on( types, null, data, fn );
25 | },
26 | unbind: function( types, fn ) {
27 | return this.off( types, null, fn );
28 | },
29 |
30 | delegate: function( selector, types, data, fn ) {
31 | return this.on( types, selector, data, fn );
32 | },
33 | undelegate: function( selector, types, fn ) {
34 | // ( namespace ) or ( selector, types [, fn] )
35 | return arguments.length === 1 ? this.off( selector, "**" ) : this.off( types, selector || "**", fn );
36 | }
37 | });
38 |
39 | });
40 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | ng-perf is a set of utilities to help with AngularJS performance.
2 |
3 |
4 | ngp-local-*
5 | ===========
6 |
7 | A set of events that invoke $scope.digest() instead of $rootScope.apply. This will help with directives where the result of events only needs to be applied to the current scope and downward instead of all the way from rootScope. These events also provide a way to supress the digest altogether via preventDefault method.
8 |
9 | To use directives
10 |
11 | ```
12 | bower install ng-perf
13 | ```
14 |
15 | Include ngPerfLocalDirectives.js and add module ngPerf.directives as a dependency
16 |
17 |
18 | Here's an example directive using ngp-local-click.
19 |
20 | ```javascript
21 |
22 | angular.module('ngPerf.randomButton', ['ngPerf.directives'])
23 | .directive('randomButton', function() {
24 | return {
25 | restrict: 'EA',
26 | scope: {},
27 | controller: function($scope) {
28 | $scope.randomNumber = '123';
29 | $scope.generateRandom = function() {
30 | $scope.randomNumber = Math.floor(Math.random()*100);
31 | // event.preventDefault(); //uncomment to suppress digest altogether
32 | }
33 | },
34 | template: '',
35 | link: function(){}
36 | };
37 | });
38 |
39 | ```
40 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/demo-app/bower_components/jquery/src/core/access.js:
--------------------------------------------------------------------------------
1 | define([
2 | "../core"
3 | ], function( jQuery ) {
4 |
5 | // Multifunctional method to get and set values of a collection
6 | // The value/s can optionally be executed if it's a function
7 | var access = jQuery.access = function( elems, fn, key, value, chainable, emptyGet, raw ) {
8 | var i = 0,
9 | len = elems.length,
10 | bulk = key == null;
11 |
12 | // Sets many values
13 | if ( jQuery.type( key ) === "object" ) {
14 | chainable = true;
15 | for ( i in key ) {
16 | jQuery.access( elems, fn, i, key[i], true, emptyGet, raw );
17 | }
18 |
19 | // Sets one value
20 | } else if ( value !== undefined ) {
21 | chainable = true;
22 |
23 | if ( !jQuery.isFunction( value ) ) {
24 | raw = true;
25 | }
26 |
27 | if ( bulk ) {
28 | // Bulk operations run against the entire set
29 | if ( raw ) {
30 | fn.call( elems, value );
31 | fn = null;
32 |
33 | // ...except when executing function values
34 | } else {
35 | bulk = fn;
36 | fn = function( elem, key, value ) {
37 | return bulk.call( jQuery( elem ), value );
38 | };
39 | }
40 | }
41 |
42 | if ( fn ) {
43 | for ( ; i < len; i++ ) {
44 | fn( elems[i], key, raw ? value : value.call( elems[i], i, fn( elems[i], key ) ) );
45 | }
46 | }
47 | }
48 |
49 | return chainable ?
50 | elems :
51 |
52 | // Gets
53 | bulk ?
54 | fn.call( elems ) :
55 | len ? fn( elems[0], key ) : emptyGet;
56 | };
57 |
58 | return access;
59 |
60 | });
61 |
--------------------------------------------------------------------------------
/demo-app/bower_components/ng-perf/README.md:
--------------------------------------------------------------------------------
1 | ng-perf is a set of utilities to help with AngularJS performance.
2 |
3 |
4 | ngp-local-*
5 | ===========
6 |
7 | A set of events that invoke $scope.digest() instead of $rootScope.apply. This will help with directives where the result of events only needs to be applied to the current scope and downward instead of all the way from rootScope. These events also provide a way to supress the digest altogether via preventDefault method.
8 |
9 | To use directives
10 |
11 | ```
12 | bower install ng-perf
13 | ```
14 |
15 | Include ngPerfLocalDirectives.js and add module ngPerf.directives as a dependency
16 |
17 |
18 | Here's an example directive using ngp-local-click.
19 |
20 | ```javascript
21 |
22 | angular.module('ngPerf.randomButton', ['ngPerf.directives'])
23 | .directive('randomButton', function() {
24 | return {
25 | restrict: 'EA',
26 | scope: {},
27 | controller: function($scope) {
28 | $scope.randomNumber = '123';
29 | $scope.generateRandom = function() {
30 | $scope.randomNumber = Math.floor(Math.random()*100);
31 | // event.preventDefault(); //uncomment to suppress digest altogether
32 | }
33 | },
34 | template: '',
35 | link: function(){}
36 | };
37 | });
38 |
39 | ```
40 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/demo-app/app.js:
--------------------------------------------------------------------------------
1 | angular.module('NgPerf', [
2 | 'NgPerf.controllers',
3 | 'blah',
4 | 'ngRoute',
5 | 'ngPerf.directives',
6 | 'ngPerf.randomButton'
7 | ]).
8 | config(['$routeProvider', '$compileProvider', function($routeProvider, $compileProvider) {
9 | $routeProvider.
10 | when("/repeat", {templateUrl: "ng-repeat/repeat-view.html", controller: "repeatController"}).
11 | when("/bind-once", {templateUrl: "ng-repeat/bind-once.html", controller: "repeatController"}).
12 | when("/expression-bind", {templateUrl: "ng-repeat/expression-bind.html", controller: "repeatController"}).
13 | when("/ng-bind", {templateUrl: "ng-repeat/ng-bind.html", controller: "repeatController"}).
14 | when("/direct", {templateUrl: "ng-repeat/direct.html", controller: "repeatController"}).
15 | when("/ng-class", {templateUrl: "ng-repeat/ng-class.html", controller: "repeatController"}).
16 | when("/ng-style", {templateUrl: "ng-repeat/ng-style.html", controller: "repeatController"}).
17 | when("/class-expression", {templateUrl: "ng-repeat/class-expression.html", controller: "repeatController"}).
18 | when("/expression", {templateUrl: "ng-repeat/complex-expressions.html", controller: "repeatController"}).
19 | when("/expressions", {templateUrl: "expressions/expressions-view.html", controller: "expressionsController"}).
20 | otherwise({redirectTo: '/direct'});
21 | $compileProvider.debugInfoEnabled(false);
22 | }]
23 | );
--------------------------------------------------------------------------------
/demo-app/bower_components/jquery/src/ajax/script.js:
--------------------------------------------------------------------------------
1 | define([
2 | "../core",
3 | "../ajax"
4 | ], function( jQuery ) {
5 |
6 | // Install script dataType
7 | jQuery.ajaxSetup({
8 | accepts: {
9 | script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"
10 | },
11 | contents: {
12 | script: /(?:java|ecma)script/
13 | },
14 | converters: {
15 | "text script": function( text ) {
16 | jQuery.globalEval( text );
17 | return text;
18 | }
19 | }
20 | });
21 |
22 | // Handle cache's special case and crossDomain
23 | jQuery.ajaxPrefilter( "script", function( s ) {
24 | if ( s.cache === undefined ) {
25 | s.cache = false;
26 | }
27 | if ( s.crossDomain ) {
28 | s.type = "GET";
29 | }
30 | });
31 |
32 | // Bind script tag hack transport
33 | jQuery.ajaxTransport( "script", function( s ) {
34 | // This transport only deals with cross domain requests
35 | if ( s.crossDomain ) {
36 | var script, callback;
37 | return {
38 | send: function( _, complete ) {
39 | script = jQuery("
19 | ```
20 |
21 | And add `ngRoute` as a dependency for your app:
22 |
23 | ```javascript
24 | angular.module('myApp', ['ngRoute']);
25 | ```
26 |
27 | ## Documentation
28 |
29 | Documentation is available on the
30 | [AngularJS docs site](http://docs.angularjs.org/api/ngRoute).
31 |
32 | ## License
33 |
34 | The MIT License
35 |
36 | Copyright (c) 2010-2012 Google, Inc. http://angularjs.org
37 |
38 | Permission is hereby granted, free of charge, to any person obtaining a copy
39 | of this software and associated documentation files (the "Software"), to deal
40 | in the Software without restriction, including without limitation the rights
41 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
42 | copies of the Software, and to permit persons to whom the Software is
43 | furnished to do so, subject to the following conditions:
44 |
45 | The above copyright notice and this permission notice shall be included in
46 | all copies or substantial portions of the Software.
47 |
48 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
49 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
50 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
51 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
52 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
53 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
54 | THE SOFTWARE.
55 |
--------------------------------------------------------------------------------
/demo-app/bower_components/jquery/src/css/defaultDisplay.js:
--------------------------------------------------------------------------------
1 | define([
2 | "../core",
3 | "../manipulation" // appendTo
4 | ], function( jQuery ) {
5 |
6 | var iframe,
7 | elemdisplay = {};
8 |
9 | /**
10 | * Retrieve the actual display of a element
11 | * @param {String} name nodeName of the element
12 | * @param {Object} doc Document object
13 | */
14 | // Called only from within defaultDisplay
15 | function actualDisplay( name, doc ) {
16 | var style,
17 | elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ),
18 |
19 | // getDefaultComputedStyle might be reliably used only on attached element
20 | display = window.getDefaultComputedStyle && ( style = window.getDefaultComputedStyle( elem[ 0 ] ) ) ?
21 |
22 | // Use of this method is a temporary fix (more like optmization) until something better comes along,
23 | // since it was removed from specification and supported only in FF
24 | style.display : jQuery.css( elem[ 0 ], "display" );
25 |
26 | // We don't have any data stored on the element,
27 | // so use "detach" method as fast way to get rid of the element
28 | elem.detach();
29 |
30 | return display;
31 | }
32 |
33 | /**
34 | * Try to determine the default display value of an element
35 | * @param {String} nodeName
36 | */
37 | function defaultDisplay( nodeName ) {
38 | var doc = document,
39 | display = elemdisplay[ nodeName ];
40 |
41 | if ( !display ) {
42 | display = actualDisplay( nodeName, doc );
43 |
44 | // If the simple way fails, read from inside an iframe
45 | if ( display === "none" || !display ) {
46 |
47 | // Use the already-created iframe if possible
48 | iframe = (iframe || jQuery( "" )).appendTo( doc.documentElement );
49 |
50 | // Always write a new HTML skeleton so Webkit and Firefox don't choke on reuse
51 | doc = iframe[ 0 ].contentDocument;
52 |
53 | // Support: IE
54 | doc.write();
55 | doc.close();
56 |
57 | display = actualDisplay( nodeName, doc );
58 | iframe.detach();
59 | }
60 |
61 | // Store the correct default display
62 | elemdisplay[ nodeName ] = display;
63 | }
64 |
65 | return display;
66 | }
67 |
68 | return defaultDisplay;
69 |
70 | });
71 |
--------------------------------------------------------------------------------
/demo-app/bower_components/jquery/src/attributes/prop.js:
--------------------------------------------------------------------------------
1 | define([
2 | "../core",
3 | "../core/access",
4 | "./support"
5 | ], function( jQuery, access, support ) {
6 |
7 | var rfocusable = /^(?:input|select|textarea|button)$/i;
8 |
9 | jQuery.fn.extend({
10 | prop: function( name, value ) {
11 | return access( this, jQuery.prop, name, value, arguments.length > 1 );
12 | },
13 |
14 | removeProp: function( name ) {
15 | return this.each(function() {
16 | delete this[ jQuery.propFix[ name ] || name ];
17 | });
18 | }
19 | });
20 |
21 | jQuery.extend({
22 | propFix: {
23 | "for": "htmlFor",
24 | "class": "className"
25 | },
26 |
27 | prop: function( elem, name, value ) {
28 | var ret, hooks, notxml,
29 | nType = elem.nodeType;
30 |
31 | // don't get/set properties on text, comment and attribute nodes
32 | if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
33 | return;
34 | }
35 |
36 | notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
37 |
38 | if ( notxml ) {
39 | // Fix name and attach hooks
40 | name = jQuery.propFix[ name ] || name;
41 | hooks = jQuery.propHooks[ name ];
42 | }
43 |
44 | if ( value !== undefined ) {
45 | return hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ?
46 | ret :
47 | ( elem[ name ] = value );
48 |
49 | } else {
50 | return hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ?
51 | ret :
52 | elem[ name ];
53 | }
54 | },
55 |
56 | propHooks: {
57 | tabIndex: {
58 | get: function( elem ) {
59 | return elem.hasAttribute( "tabindex" ) || rfocusable.test( elem.nodeName ) || elem.href ?
60 | elem.tabIndex :
61 | -1;
62 | }
63 | }
64 | }
65 | });
66 |
67 | // Support: IE9+
68 | // Selectedness for an option in an optgroup can be inaccurate
69 | if ( !support.optSelected ) {
70 | jQuery.propHooks.selected = {
71 | get: function( elem ) {
72 | var parent = elem.parentNode;
73 | if ( parent && parent.parentNode ) {
74 | parent.parentNode.selectedIndex;
75 | }
76 | return null;
77 | }
78 | };
79 | }
80 |
81 | jQuery.each([
82 | "tabIndex",
83 | "readOnly",
84 | "maxLength",
85 | "cellSpacing",
86 | "cellPadding",
87 | "rowSpan",
88 | "colSpan",
89 | "useMap",
90 | "frameBorder",
91 | "contentEditable"
92 | ], function() {
93 | jQuery.propFix[ this.toLowerCase() ] = this;
94 | });
95 |
96 | });
97 |
--------------------------------------------------------------------------------
/demo-app/ng-repeat/complex-expressions.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | | Contacts |
5 |
6 |
7 | |
8 |
9 | |
10 | |
11 | |
12 | |
13 | |
14 | |
15 | |
16 | |
17 | |
18 | |
19 | |
20 | |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
45 |
2 |
3 |
4 | Random Local
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 | | Contacts |
15 |
16 |
17 | |
18 |
19 | |
20 | |
21 | |
22 | |
23 | |
24 | |
25 | |
26 | |
27 | |
28 | |
29 | |
30 | |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
55 |