diff --git a/1.3.0-rc.2/angular-1.3.0-rc.2.zip b/1.3.0-rc.2/angular-1.3.0-rc.2.zip new file mode 100644 index 0000000000..c70bf591bf Binary files /dev/null and b/1.3.0-rc.2/angular-1.3.0-rc.2.zip differ diff --git a/1.3.0-rc.2/angular-animate.js b/1.3.0-rc.2/angular-animate.js new file mode 100644 index 0000000000..424eac1c4e --- /dev/null +++ b/1.3.0-rc.2/angular-animate.js @@ -0,0 +1,1880 @@ +/** + * @license AngularJS v1.3.0-rc.2 + * (c) 2010-2014 Google, Inc. http://angularjs.org + * License: MIT + */ +(function(window, angular, undefined) {'use strict'; + +/* jshint maxlen: false */ + +/** + * @ngdoc module + * @name ngAnimate + * @description + * + * The `ngAnimate` module provides support for JavaScript, CSS3 transition and CSS3 keyframe animation hooks within existing core and custom directives. + * + *
+ * + * # Usage + * + * To see animations in action, all that is required is to define the appropriate CSS classes + * or to register a JavaScript animation via the myModule.animation() function. The directives that support animation automatically are: + * `ngRepeat`, `ngInclude`, `ngIf`, `ngSwitch`, `ngShow`, `ngHide`, `ngView` and `ngClass`. Custom directives can take advantage of animation + * by using the `$animate` service. + * + * Below is a more detailed breakdown of the supported animation events provided by pre-existing ng directives: + * + * | Directive | Supported Animations | + * |-----------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------| + * | {@link ng.directive:ngRepeat#usage_animations ngRepeat} | enter, leave and move | + * | {@link ngRoute.directive:ngView#usage_animations ngView} | enter and leave | + * | {@link ng.directive:ngInclude#usage_animations ngInclude} | enter and leave | + * | {@link ng.directive:ngSwitch#usage_animations ngSwitch} | enter and leave | + * | {@link ng.directive:ngIf#usage_animations ngIf} | enter and leave | + * | {@link ng.directive:ngClass#usage_animations ngClass} | add and remove (the CSS class(es) present) | + * | {@link ng.directive:ngShow#usage_animations ngShow} & {@link ng.directive:ngHide#usage_animations ngHide} | add and remove (the ng-hide class value) | + * | {@link ng.directive:form#usage_animations form} & {@link ng.directive:ngModel#usage_animations ngModel} | add and remove (dirty, pristine, valid, invalid & all other validations) | + * | {@link ngMessages.directive:ngMessage#usage_animations ngMessages} | add and remove (ng-active & ng-inactive) | + * | {@link ngMessages.directive:ngMessage#usage_animations ngMessage} | enter and leave | + * + * You can find out more information about animations upon visiting each directive page. + * + * Below is an example of how to apply animations to a directive that supports animation hooks: + * + * ```html + * + * + * + * + * ``` + * + * Keep in mind that, by default, if an animation is running, any child elements cannot be animated + * until the parent element's animation has completed. This blocking feature can be overridden by + * placing the `ng-animate-children` attribute on a parent container tag. + * + * ```html + *
+ *
+ *
+ * ... + *
+ *
+ *
+ * ``` + * + * When the `on` expression value changes and an animation is triggered then each of the elements within + * will all animate without the block being applied to child elements. + * + * ## Are animations run when the application starts? + * No they are not. When an application is bootstrapped Angular will disable animations from running to avoid + * a frenzy of animations from being triggered as soon as the browser has rendered the screen. For this to work, + * Angular will wait for two digest cycles until enabling animations. From there on, any animation-triggering + * layout changes in the application will trigger animations as normal. + * + * In addition, upon bootstrap, if the routing system or any directives or load remote data (via $http) then Angular + * will automatically extend the wait time to enable animations once **all** of the outbound HTTP requests + * are complete. + * + *

CSS-defined Animations

+ * The animate service will automatically apply two CSS classes to the animated element and these two CSS classes + * are designed to contain the start and end CSS styling. Both CSS transitions and keyframe animations are supported + * and can be used to play along with this naming structure. + * + * The following code below demonstrates how to perform animations using **CSS transitions** with Angular: + * + * ```html + * + * + *
+ *
+ *
+ * ``` + * + * The following code below demonstrates how to perform animations using **CSS animations** with Angular: + * + * ```html + * + * + *
+ *
+ *
+ * ``` + * + * Both CSS3 animations and transitions can be used together and the animate service will figure out the correct duration and delay timing. + * + * Upon DOM mutation, the event class is added first (something like `ng-enter`), then the browser prepares itself to add + * the active class (in this case `ng-enter-active`) which then triggers the animation. The animation module will automatically + * detect the CSS code to determine when the animation ends. Once the animation is over then both CSS classes will be + * removed from the DOM. If a browser does not support CSS transitions or CSS animations then the animation will start and end + * immediately resulting in a DOM element that is at its final state. This final state is when the DOM element + * has no CSS transition/animation classes applied to it. + * + * ### Structural transition animations + * + * Structural transitions (such as enter, leave and move) will always apply a `0s none` transition + * value to force the browser into rendering the styles defined in the setup (.ng-enter, .ng-leave + * or .ng-move) class. This means that any active transition animations operating on the element + * will be cut off to make way for the enter, leave or move animation. + * + * ### Class-based transition animations + * + * Class-based transitions refer to transition animations that are triggered when a CSS class is + * added to or removed from the element (via `$animate.addClass`, `$animate.removeClass`, + * `$animate.setClass`, or by directives such as `ngClass`, `ngModel` and `form`). + * They are different when compared to structural animations since they **do not cancel existing + * animations** nor do they **block successive transitions** from rendering on the same element. + * This distinction allows for **multiple class-based transitions** to be performed on the same element. + * + * In addition to ngAnimate supporting the default (natural) functionality of class-based transition + * animations, ngAnimate also decorates the element with starting and ending CSS classes to aid the + * developer in further styling the element throughout the transition animation. Earlier versions + * of ngAnimate may have caused natural CSS transitions to break and not render properly due to + * $animate temporarily blocking transitions using `0s none` in order to allow the setup CSS class + * (the `-add` or `-remove` class) to be applied without triggering an animation. However, as of + * **version 1.3**, this workaround has been removed with ngAnimate and all non-ngAnimate CSS + * class transitions are compatible with ngAnimate. + * + * There is, however, one special case when dealing with class-based transitions in ngAnimate. + * When rendering class-based transitions that make use of the setup and active CSS classes + * (e.g. `.fade-add` and `.fade-add-active` for when `.fade` is added) be sure to define + * the transition value **on the active CSS class** and not the setup class. + * + * ```css + * .fade-add { + * /* remember to place a 0s transition here + * to ensure that the styles are applied instantly + * even if the element already has a transition style */ + * transition:0s linear all; + * + * /* starting CSS styles */ + * opacity:1; + * } + * .fade-add.fade-add-active { + * /* this will be the length of the animation */ + * transition:1s linear all; + * opacity:0; + * } + * ``` + * + * The setup CSS class (in this case `.fade-add`) also has a transition style property, however, it + * has a duration of zero. This may not be required, however, incase the browser is unable to render + * the styling present in this CSS class instantly then it could be that the browser is attempting + * to perform an unnecessary transition. + * + * This workaround, however, does not apply to standard class-based transitions that are rendered + * when a CSS class containing a transition is applied to an element: + * + * ```css + * .fade { + * /* this works as expected */ + * transition:1s linear all; + * opacity:0; + * } + * ``` + * + * Please keep this in mind when coding the CSS markup that will be used within class-based transitions. + * Also, try not to mix the two class-based animation flavors together since the CSS code may become + * overly complex. + * + * ### CSS Staggering Animations + * A Staggering animation is a collection of animations that are issued with a slight delay in between each successive operation resulting in a + * curtain-like effect. The ngAnimate module, as of 1.2.0, supports staggering animations and the stagger effect can be + * performed by creating a **ng-EVENT-stagger** CSS class and attaching that class to the base CSS class used for + * the animation. The style property expected within the stagger class can either be a **transition-delay** or an + * **animation-delay** property (or both if your animation contains both transitions and keyframe animations). + * + * ```css + * .my-animation.ng-enter { + * /* standard transition code */ + * -webkit-transition: 1s linear all; + * transition: 1s linear all; + * opacity:0; + * } + * .my-animation.ng-enter-stagger { + * /* this will have a 100ms delay between each successive leave animation */ + * -webkit-transition-delay: 0.1s; + * transition-delay: 0.1s; + * + * /* in case the stagger doesn't work then these two values + * must be set to 0 to avoid an accidental CSS inheritance */ + * -webkit-transition-duration: 0s; + * transition-duration: 0s; + * } + * .my-animation.ng-enter.ng-enter-active { + * /* standard transition styles */ + * opacity:1; + * } + * ``` + * + * Staggering animations work by default in ngRepeat (so long as the CSS class is defined). Outside of ngRepeat, to use staggering animations + * on your own, they can be triggered by firing multiple calls to the same event on $animate. However, the restrictions surrounding this + * are that each of the elements must have the same CSS className value as well as the same parent element. A stagger operation + * will also be reset if more than 10ms has passed after the last animation has been fired. + * + * The following code will issue the **ng-leave-stagger** event on the element provided: + * + * ```js + * var kids = parent.children(); + * + * $animate.leave(kids[0]); //stagger index=0 + * $animate.leave(kids[1]); //stagger index=1 + * $animate.leave(kids[2]); //stagger index=2 + * $animate.leave(kids[3]); //stagger index=3 + * $animate.leave(kids[4]); //stagger index=4 + * + * $timeout(function() { + * //stagger has reset itself + * $animate.leave(kids[5]); //stagger index=0 + * $animate.leave(kids[6]); //stagger index=1 + * }, 100, false); + * ``` + * + * Stagger animations are currently only supported within CSS-defined animations. + * + * ## JavaScript-defined Animations + * In the event that you do not want to use CSS3 transitions or CSS3 animations or if you wish to offer animations on browsers that do not + * yet support CSS transitions/animations, then you can make use of JavaScript animations defined inside of your AngularJS module. + * + * ```js + * //!annotate="YourApp" Your AngularJS Module|Replace this or ngModule with the module that you used to define your application. + * var ngModule = angular.module('YourApp', ['ngAnimate']); + * ngModule.animation('.my-crazy-animation', function() { + * return { + * enter: function(element, done) { + * //run the animation here and call done when the animation is complete + * return function(cancelled) { + * //this (optional) function will be called when the animation + * //completes or when the animation is cancelled (the cancelled + * //flag will be set to true if cancelled). + * }; + * }, + * leave: function(element, done) { }, + * move: function(element, done) { }, + * + * //animation that can be triggered before the class is added + * beforeAddClass: function(element, className, done) { }, + * + * //animation that can be triggered after the class is added + * addClass: function(element, className, done) { }, + * + * //animation that can be triggered before the class is removed + * beforeRemoveClass: function(element, className, done) { }, + * + * //animation that can be triggered after the class is removed + * removeClass: function(element, className, done) { } + * }; + * }); + * ``` + * + * JavaScript-defined animations are created with a CSS-like class selector and a collection of events which are set to run + * a javascript callback function. When an animation is triggered, $animate will look for a matching animation which fits + * the element's CSS class attribute value and then run the matching animation event function (if found). + * In other words, if the CSS classes present on the animated element match any of the JavaScript animations then the callback function will + * be executed. It should be also noted that only simple, single class selectors are allowed (compound class selectors are not supported). + * + * Within a JavaScript animation, an object containing various event callback animation functions is expected to be returned. + * As explained above, these callbacks are triggered based on the animation event. Therefore if an enter animation is run, + * and the JavaScript animation is found, then the enter callback will handle that animation (in addition to the CSS keyframe animation + * or transition code that is defined via a stylesheet). + * + */ + +angular.module('ngAnimate', ['ng']) + + /** + * @ngdoc provider + * @name $animateProvider + * @description + * + * The `$animateProvider` allows developers to register JavaScript animation event handlers directly inside of a module. + * When an animation is triggered, the $animate service will query the $animate service to find any animations that match + * the provided name value. + * + * Requires the {@link ngAnimate `ngAnimate`} module to be installed. + * + * Please visit the {@link ngAnimate `ngAnimate`} module overview page learn more about how to use animations in your application. + * + */ + .directive('ngAnimateChildren', function() { + var NG_ANIMATE_CHILDREN = '$$ngAnimateChildren'; + return function(scope, element, attrs) { + var val = attrs.ngAnimateChildren; + if (angular.isString(val) && val.length === 0) { //empty attribute + element.data(NG_ANIMATE_CHILDREN, true); + } else { + scope.$watch(val, function(value) { + element.data(NG_ANIMATE_CHILDREN, !!value); + }); + } + }; + }) + + //this private service is only used within CSS-enabled animations + //IE8 + IE9 do not support rAF natively, but that is fine since they + //also don't support transitions and keyframes which means that the code + //below will never be used by the two browsers. + .factory('$$animateReflow', ['$$rAF', '$document', function($$rAF, $document) { + var bod = $document[0].body; + return function(fn) { + //the returned function acts as the cancellation function + return $$rAF(function() { + //the line below will force the browser to perform a repaint + //so that all the animated elements within the animation frame + //will be properly updated and drawn on screen. This is + //required to perform multi-class CSS based animations with + //Firefox. DO NOT REMOVE THIS LINE. + var a = bod.offsetWidth + 1; + fn(); + }); + }; + }]) + + .config(['$provide', '$animateProvider', function($provide, $animateProvider) { + var noop = angular.noop; + var forEach = angular.forEach; + var selectors = $animateProvider.$$selectors; + var isArray = angular.isArray; + + var ELEMENT_NODE = 1; + var NG_ANIMATE_STATE = '$$ngAnimateState'; + var NG_ANIMATE_CHILDREN = '$$ngAnimateChildren'; + var NG_ANIMATE_CLASS_NAME = 'ng-animate'; + var rootAnimateState = {running: true}; + + function extractElementNode(element) { + for(var i = 0; i < element.length; i++) { + var elm = element[i]; + if (elm.nodeType == ELEMENT_NODE) { + return elm; + } + } + } + + function prepareElement(element) { + return element && angular.element(element); + } + + function stripCommentsFromElement(element) { + return angular.element(extractElementNode(element)); + } + + function isMatchingElement(elm1, elm2) { + return extractElementNode(elm1) == extractElementNode(elm2); + } + + $provide.decorator('$animate', + ['$delegate', '$$q', '$injector', '$sniffer', '$rootElement', '$$asyncCallback', '$rootScope', '$document', '$templateRequest', + function($delegate, $$q, $injector, $sniffer, $rootElement, $$asyncCallback, $rootScope, $document, $templateRequest) { + + $rootElement.data(NG_ANIMATE_STATE, rootAnimateState); + + // Wait until all directive and route-related templates are downloaded and + // compiled. The $templateRequest.totalPendingRequests variable keeps track of + // all of the remote templates being currently downloaded. If there are no + // templates currently downloading then the watcher will still fire anyway. + var deregisterWatch = $rootScope.$watch( + function() { return $templateRequest.totalPendingRequests; }, + function(val, oldVal) { + if (val !== 0) return; + deregisterWatch(); + + // Now that all templates have been downloaded, $animate will wait until + // the post digest queue is empty before enabling animations. By having two + // calls to $postDigest calls we can ensure that the flag is enabled at the + // very end of the post digest queue. Since all of the animations in $animate + // use $postDigest, it's important that the code below executes at the end. + // This basically means that the page is fully downloaded and compiled before + // any animations are triggered. + $rootScope.$$postDigest(function() { + $rootScope.$$postDigest(function() { + rootAnimateState.running = false; + }); + }); + } + ); + + var globalAnimationCounter = 0; + var classNameFilter = $animateProvider.classNameFilter(); + var isAnimatableClassName = !classNameFilter + ? function() { return true; } + : function(className) { + return classNameFilter.test(className); + }; + + function classBasedAnimationsBlocked(element, setter) { + var data = element.data(NG_ANIMATE_STATE) || {}; + if (setter) { + data.running = true; + data.structural = true; + element.data(NG_ANIMATE_STATE, data); + } + return data.disabled || (data.running && data.structural); + } + + function runAnimationPostDigest(fn) { + var cancelFn, defer = $$q.defer(); + defer.promise.$$cancelFn = function() { + cancelFn && cancelFn(); + }; + $rootScope.$$postDigest(function() { + cancelFn = fn(function() { + defer.resolve(); + }); + }); + return defer.promise; + } + + function resolveElementClasses(element, cache, runningAnimations) { + runningAnimations = runningAnimations || {}; + var map = {}; + + forEach(cache.add, function(className) { + if (className && className.length) { + map[className] = map[className] || 0; + map[className]++; + } + }); + + forEach(cache.remove, function(className) { + if (className && className.length) { + map[className] = map[className] || 0; + map[className]--; + } + }); + + var lookup = []; + forEach(runningAnimations, function(data, selector) { + forEach(selector.split(' '), function(s) { + lookup[s]=data; + }); + }); + + var toAdd = [], toRemove = []; + forEach(map, function(status, className) { + var hasClass = angular.$$hasClass(element[0], className); + var matchingAnimation = lookup[className] || {}; + + // When addClass and removeClass is called then $animate will check to + // see if addClass and removeClass cancel each other out. When there are + // more calls to removeClass than addClass then the count falls below 0 + // and then the removeClass animation will be allowed. Otherwise if the + // count is above 0 then that means an addClass animation will commence. + // Once an animation is allowed then the code will also check to see if + // there exists any on-going animation that is already adding or remvoing + // the matching CSS class. + if (status < 0) { + //does it have the class or will it have the class + if (hasClass || matchingAnimation.event == 'addClass') { + toRemove.push(className); + } + } else if (status > 0) { + //is the class missing or will it be removed? + if (!hasClass || matchingAnimation.event == 'removeClass') { + toAdd.push(className); + } + } + }); + + return (toAdd.length + toRemove.length) > 0 && [toAdd.join(' '), toRemove.join(' ')]; + } + + function lookup(name) { + if (name) { + var matches = [], + flagMap = {}, + classes = name.substr(1).split('.'); + + //the empty string value is the default animation + //operation which performs CSS transition and keyframe + //animations sniffing. This is always included for each + //element animation procedure if the browser supports + //transitions and/or keyframe animations. The default + //animation is added to the top of the list to prevent + //any previous animations from affecting the element styling + //prior to the element being animated. + if ($sniffer.transitions || $sniffer.animations) { + matches.push($injector.get(selectors[''])); + } + + for(var i=0; i < classes.length; i++) { + var klass = classes[i], + selectorFactoryName = selectors[klass]; + if (selectorFactoryName && !flagMap[klass]) { + matches.push($injector.get(selectorFactoryName)); + flagMap[klass] = true; + } + } + return matches; + } + } + + function animationRunner(element, animationEvent, className) { + //transcluded directives may sometimes fire an animation using only comment nodes + //best to catch this early on to prevent any animation operations from occurring + var node = element[0]; + if (!node) { + return; + } + + var classNameAdd; + var classNameRemove; + if (isArray(className)) { + classNameAdd = className[0]; + classNameRemove = className[1]; + if (!classNameAdd) { + className = classNameRemove; + animationEvent = 'removeClass'; + } else if (!classNameRemove) { + className = classNameAdd; + animationEvent = 'addClass'; + } else { + className = classNameAdd + ' ' + classNameRemove; + } + } + + var isSetClassOperation = animationEvent == 'setClass'; + var isClassBased = isSetClassOperation || + animationEvent == 'addClass' || + animationEvent == 'removeClass'; + + var currentClassName = element.attr('class'); + var classes = currentClassName + ' ' + className; + if (!isAnimatableClassName(classes)) { + return; + } + + var beforeComplete = noop, + beforeCancel = [], + before = [], + afterComplete = noop, + afterCancel = [], + after = []; + + var animationLookup = (' ' + classes).replace(/\s+/g,'.'); + forEach(lookup(animationLookup), function(animationFactory) { + var created = registerAnimation(animationFactory, animationEvent); + if (!created && isSetClassOperation) { + registerAnimation(animationFactory, 'addClass'); + registerAnimation(animationFactory, 'removeClass'); + } + }); + + function registerAnimation(animationFactory, event) { + var afterFn = animationFactory[event]; + var beforeFn = animationFactory['before' + event.charAt(0).toUpperCase() + event.substr(1)]; + if (afterFn || beforeFn) { + if (event == 'leave') { + beforeFn = afterFn; + //when set as null then animation knows to skip this phase + afterFn = null; + } + after.push({ + event : event, fn : afterFn + }); + before.push({ + event : event, fn : beforeFn + }); + return true; + } + } + + function run(fns, cancellations, allCompleteFn) { + var animations = []; + forEach(fns, function(animation) { + animation.fn && animations.push(animation); + }); + + var count = 0; + function afterAnimationComplete(index) { + if (cancellations) { + (cancellations[index] || noop)(); + if (++count < animations.length) return; + cancellations = null; + } + allCompleteFn(); + } + + //The code below adds directly to the array in order to work with + //both sync and async animations. Sync animations are when the done() + //operation is called right away. DO NOT REFACTOR! + forEach(animations, function(animation, index) { + var progress = function() { + afterAnimationComplete(index); + }; + switch(animation.event) { + case 'setClass': + cancellations.push(animation.fn(element, classNameAdd, classNameRemove, progress)); + break; + case 'addClass': + cancellations.push(animation.fn(element, classNameAdd || className, progress)); + break; + case 'removeClass': + cancellations.push(animation.fn(element, classNameRemove || className, progress)); + break; + default: + cancellations.push(animation.fn(element, progress)); + break; + } + }); + + if (cancellations && cancellations.length === 0) { + allCompleteFn(); + } + } + + return { + node : node, + event : animationEvent, + className : className, + isClassBased : isClassBased, + isSetClassOperation : isSetClassOperation, + before : function(allCompleteFn) { + beforeComplete = allCompleteFn; + run(before, beforeCancel, function() { + beforeComplete = noop; + allCompleteFn(); + }); + }, + after : function(allCompleteFn) { + afterComplete = allCompleteFn; + run(after, afterCancel, function() { + afterComplete = noop; + allCompleteFn(); + }); + }, + cancel : function() { + if (beforeCancel) { + forEach(beforeCancel, function(cancelFn) { + (cancelFn || noop)(true); + }); + beforeComplete(true); + } + if (afterCancel) { + forEach(afterCancel, function(cancelFn) { + (cancelFn || noop)(true); + }); + afterComplete(true); + } + } + }; + } + + /** + * @ngdoc service + * @name $animate + * @kind object + * + * @description + * The `$animate` service provides animation detection support while performing DOM operations (enter, leave and move) as well as during addClass and removeClass operations. + * When any of these operations are run, the $animate service + * will examine any JavaScript-defined animations (which are defined by using the $animateProvider provider object) + * as well as any CSS-defined animations against the CSS classes present on the element once the DOM operation is run. + * + * The `$animate` service is used behind the scenes with pre-existing directives and animation with these directives + * will work out of the box without any extra configuration. + * + * Requires the {@link ngAnimate `ngAnimate`} module to be installed. + * + * Please visit the {@link ngAnimate `ngAnimate`} module overview page learn more about how to use animations in your application. + * ## Callback Promises + * With AngularJS 1.3, each of the animation methods, on the `$animate` service, return a promise when called. The + * promise itself is then resolved once the animation has completed itself, has been cancelled or has been + * skipped due to animations being disabled. (Note that even if the animation is cancelled it will still + * call the resolve function of the animation.) + * + * ```js + * $animate.enter(element, container).then(function() { + * //...this is called once the animation is complete... + * }); + * ``` + * + * Also note that, due to the nature of the callback promise, if any Angular-specific code (like changing the scope, + * location of the page, etc...) is executed within the callback promise then be sure to wrap the code using + * `$scope.$apply(...)`; + * + * ```js + * $animate.leave(element).then(function() { + * $scope.$apply(function() { + * $location.path('/new-page'); + * }); + * }); + * ``` + * + * An animation can also be cancelled by calling the `$animate.cancel(promise)` method with the provided + * promise that was returned when the animation was started. + * + * ```js + * var promise = $animate.addClass(element, 'super-long-animation').then(function() { + * //this will still be called even if cancelled + * }); + * + * element.on('click', function() { + * //tooo lazy to wait for the animation to end + * $animate.cancel(promise); + * }); + * ``` + * + * (Keep in mind that the promise cancellation is unique to `$animate` since promises in + * general cannot be cancelled.) + * + */ + return { + /** + * @ngdoc method + * @name $animate#enter + * @kind function + * + * @description + * Appends the element to the parentElement element that resides in the document and then runs the enter animation. Once + * the animation is started, the following CSS classes will be present on the element for the duration of the animation: + * + * Below is a breakdown of each step that occurs during enter animation: + * + * | Animation Step | What the element class attribute looks like | + * |-------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------| + * | 1. $animate.enter(...) is called | class="my-animation" | + * | 2. element is inserted into the parentElement element or beside the afterElement element | class="my-animation" | + * | 3. $animate waits for the next digest to start the animation | class="my-animation ng-animate" | + * | 4. $animate runs the JavaScript-defined animations detected on the element | class="my-animation ng-animate" | + * | 5. the .ng-enter class is added to the element | class="my-animation ng-animate ng-enter" | + * | 6. $animate scans the element styles to get the CSS transition/animation duration and delay | class="my-animation ng-animate ng-enter" | + * | 7. $animate blocks all CSS transitions on the element to ensure the .ng-enter class styling is applied right away | class="my-animation ng-animate ng-enter" | + * | 8. $animate waits for a single animation frame (this performs a reflow) | class="my-animation ng-animate ng-enter" | + * | 9. $animate removes the CSS transition block placed on the element | class="my-animation ng-animate ng-enter" | + * | 10. the .ng-enter-active class is added (this triggers the CSS transition/animation) | class="my-animation ng-animate ng-enter ng-enter-active" | + * | 11. $animate waits for the animation to complete (via events and timeout) | class="my-animation ng-animate ng-enter ng-enter-active" | + * | 12. The animation ends and all generated CSS classes are removed from the element | class="my-animation" | + * | 13. The returned promise is resolved. | class="my-animation" | + * + * @param {DOMElement} element the element that will be the focus of the enter animation + * @param {DOMElement} parentElement the parent element of the element that will be the focus of the enter animation + * @param {DOMElement} afterElement the sibling element (which is the previous element) of the element that will be the focus of the enter animation + * @return {Promise} the animation callback promise + */ + enter : function(element, parentElement, afterElement) { + element = angular.element(element); + parentElement = prepareElement(parentElement); + afterElement = prepareElement(afterElement); + + classBasedAnimationsBlocked(element, true); + $delegate.enter(element, parentElement, afterElement); + return runAnimationPostDigest(function(done) { + return performAnimation('enter', 'ng-enter', stripCommentsFromElement(element), parentElement, afterElement, noop, done); + }); + }, + + /** + * @ngdoc method + * @name $animate#leave + * @kind function + * + * @description + * Runs the leave animation operation and, upon completion, removes the element from the DOM. Once + * the animation is started, the following CSS classes will be added for the duration of the animation: + * + * Below is a breakdown of each step that occurs during leave animation: + * + * | Animation Step | What the element class attribute looks like | + * |-------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------| + * | 1. $animate.leave(...) is called | class="my-animation" | + * | 2. $animate runs the JavaScript-defined animations detected on the element | class="my-animation ng-animate" | + * | 3. $animate waits for the next digest to start the animation | class="my-animation ng-animate" | + * | 4. the .ng-leave class is added to the element | class="my-animation ng-animate ng-leave" | + * | 5. $animate scans the element styles to get the CSS transition/animation duration and delay | class="my-animation ng-animate ng-leave" | + * | 6. $animate blocks all CSS transitions on the element to ensure the .ng-leave class styling is applied right away | class="my-animation ng-animate ng-leave” | + * | 7. $animate waits for a single animation frame (this performs a reflow) | class="my-animation ng-animate ng-leave" | + * | 8. $animate removes the CSS transition block placed on the element | class="my-animation ng-animate ng-leave” | + * | 9. the .ng-leave-active class is added (this triggers the CSS transition/animation) | class="my-animation ng-animate ng-leave ng-leave-active" | + * | 10. $animate waits for the animation to complete (via events and timeout) | class="my-animation ng-animate ng-leave ng-leave-active" | + * | 11. The animation ends and all generated CSS classes are removed from the element | class="my-animation" | + * | 12. The element is removed from the DOM | ... | + * | 13. The returned promise is resolved. | ... | + * + * @param {DOMElement} element the element that will be the focus of the leave animation + * @return {Promise} the animation callback promise + */ + leave : function(element) { + element = angular.element(element); + + cancelChildAnimations(element); + classBasedAnimationsBlocked(element, true); + this.enabled(false, element); + return runAnimationPostDigest(function(done) { + return performAnimation('leave', 'ng-leave', stripCommentsFromElement(element), null, null, function() { + $delegate.leave(element); + }, done); + }); + }, + + /** + * @ngdoc method + * @name $animate#move + * @kind function + * + * @description + * Fires the move DOM operation. Just before the animation starts, the animate service will either append it into the parentElement container or + * add the element directly after the afterElement element if present. Then the move animation will be run. Once + * the animation is started, the following CSS classes will be added for the duration of the animation: + * + * Below is a breakdown of each step that occurs during move animation: + * + * | Animation Step | What the element class attribute looks like | + * |------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------| + * | 1. $animate.move(...) is called | class="my-animation" | + * | 2. element is moved into the parentElement element or beside the afterElement element | class="my-animation" | + * | 3. $animate waits for the next digest to start the animation | class="my-animation ng-animate" | + * | 4. $animate runs the JavaScript-defined animations detected on the element | class="my-animation ng-animate" | + * | 5. the .ng-move class is added to the element | class="my-animation ng-animate ng-move" | + * | 6. $animate scans the element styles to get the CSS transition/animation duration and delay | class="my-animation ng-animate ng-move" | + * | 7. $animate blocks all CSS transitions on the element to ensure the .ng-move class styling is applied right away | class="my-animation ng-animate ng-move” | + * | 8. $animate waits for a single animation frame (this performs a reflow) | class="my-animation ng-animate ng-move" | + * | 9. $animate removes the CSS transition block placed on the element | class="my-animation ng-animate ng-move” | + * | 10. the .ng-move-active class is added (this triggers the CSS transition/animation) | class="my-animation ng-animate ng-move ng-move-active" | + * | 11. $animate waits for the animation to complete (via events and timeout) | class="my-animation ng-animate ng-move ng-move-active" | + * | 12. The animation ends and all generated CSS classes are removed from the element | class="my-animation" | + * | 13. The returned promise is resolved. | class="my-animation" | + * + * @param {DOMElement} element the element that will be the focus of the move animation + * @param {DOMElement} parentElement the parentElement element of the element that will be the focus of the move animation + * @param {DOMElement} afterElement the sibling element (which is the previous element) of the element that will be the focus of the move animation + * @return {Promise} the animation callback promise + */ + move : function(element, parentElement, afterElement) { + element = angular.element(element); + parentElement = prepareElement(parentElement); + afterElement = prepareElement(afterElement); + + cancelChildAnimations(element); + classBasedAnimationsBlocked(element, true); + $delegate.move(element, parentElement, afterElement); + return runAnimationPostDigest(function(done) { + return performAnimation('move', 'ng-move', stripCommentsFromElement(element), parentElement, afterElement, noop, done); + }); + }, + + /** + * @ngdoc method + * @name $animate#addClass + * + * @description + * Triggers a custom animation event based off the className variable and then attaches the className value to the element as a CSS class. + * Unlike the other animation methods, the animate service will suffix the className value with {@type -add} in order to provide + * the animate service the setup and active CSS classes in order to trigger the animation (this will be skipped if no CSS transitions + * or keyframes are defined on the -add-active or base CSS class). + * + * Below is a breakdown of each step that occurs during addClass animation: + * + * | Animation Step | What the element class attribute looks like | + * |----------------------------------------------------------------------------------------------------|------------------------------------------------------------------| + * | 1. $animate.addClass(element, 'super') is called | class="my-animation" | + * | 2. $animate runs the JavaScript-defined animations detected on the element | class="my-animation ng-animate" | + * | 3. the .super-add class is added to the element | class="my-animation ng-animate super-add" | + * | 4. $animate waits for a single animation frame (this performs a reflow) | class="my-animation ng-animate super-add" | + * | 5. the .super and .super-add-active classes are added (this triggers the CSS transition/animation) | class="my-animation ng-animate super super-add super-add-active" | + * | 6. $animate scans the element styles to get the CSS transition/animation duration and delay | class="my-animation ng-animate super-add" | + * | 7. $animate waits for the animation to complete (via events and timeout) | class="my-animation super super-add super-add-active" | + * | 8. The animation ends and all generated CSS classes are removed from the element | class="my-animation super" | + * | 9. The super class is kept on the element | class="my-animation super" | + * | 10. The returned promise is resolved. | class="my-animation super" | + * + * @param {DOMElement} element the element that will be animated + * @param {string} className the CSS class that will be added to the element and then animated + * @return {Promise} the animation callback promise + */ + addClass : function(element, className) { + return this.setClass(element, className, []); + }, + + /** + * @ngdoc method + * @name $animate#removeClass + * + * @description + * Triggers a custom animation event based off the className variable and then removes the CSS class provided by the className value + * from the element. Unlike the other animation methods, the animate service will suffix the className value with {@type -remove} in + * order to provide the animate service the setup and active CSS classes in order to trigger the animation (this will be skipped if + * no CSS transitions or keyframes are defined on the -remove or base CSS classes). + * + * Below is a breakdown of each step that occurs during removeClass animation: + * + * | Animation Step | What the element class attribute looks like | + * |------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------| + * | 1. $animate.removeClass(element, 'super') is called | class="my-animation super" | + * | 2. $animate runs the JavaScript-defined animations detected on the element | class="my-animation super ng-animate" | + * | 3. the .super-remove class is added to the element | class="my-animation super ng-animate super-remove" | + * | 4. $animate waits for a single animation frame (this performs a reflow) | class="my-animation super ng-animate super-remove" | + * | 5. the .super-remove-active classes are added and .super is removed (this triggers the CSS transition/animation) | class="my-animation ng-animate super-remove super-remove-active" | + * | 6. $animate scans the element styles to get the CSS transition/animation duration and delay | class="my-animation super ng-animate super-remove" | + * | 7. $animate waits for the animation to complete (via events and timeout) | class="my-animation ng-animate super-remove super-remove-active" | + * | 8. The animation ends and all generated CSS classes are removed from the element | class="my-animation" | + * | 9. The returned promise is resolved. | class="my-animation" | + * + * + * @param {DOMElement} element the element that will be animated + * @param {string} className the CSS class that will be animated and then removed from the element + * @return {Promise} the animation callback promise + */ + removeClass : function(element, className) { + return this.setClass(element, [], className); + }, + + /** + * + * @ngdoc method + * @name $animate#setClass + * + * @description Adds and/or removes the given CSS classes to and from the element. + * Once complete, the done() callback will be fired (if provided). + * + * | Animation Step | What the element class attribute looks like | + * |--------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------| + * | 1. $animate.removeClass(element, ‘on’, ‘off’) is called | class="my-animation super off” | + * | 2. $animate runs the JavaScript-defined animations detected on the element | class="my-animation super ng-animate off” | + * | 3. the .on-add and .off-remove classes are added to the element | class="my-animation ng-animate on-add off-remove off” | + * | 4. $animate waits for a single animation frame (this performs a reflow) | class="my-animation ng-animate on-add off-remove off” | + * | 5. the .on, .on-add-active and .off-remove-active classes are added and .off is removed (this triggers the CSS transition/animation) | class="my-animation ng-animate on on-add on-add-active off-remove off-remove-active” | + * | 6. $animate scans the element styles to get the CSS transition/animation duration and delay | class="my-animation ng-animate on on-add on-add-active off-remove off-remove-active" | + * | 7. $animate waits for the animation to complete (via events and timeout) | class="my-animation ng-animate on on-add on-add-active off-remove off-remove-active" | + * | 8. The animation ends and all generated CSS classes are removed from the element | class="my-animation on" | + * | 9. The returned promise is resolved. | class="my-animation on" | + * + * @param {DOMElement} element the element which will have its CSS classes changed + * removed from it + * @param {string} add the CSS classes which will be added to the element + * @param {string} remove the CSS class which will be removed from the element + * CSS classes have been set on the element + * @return {Promise} the animation callback promise + */ + setClass : function(element, add, remove) { + var STORAGE_KEY = '$$animateClasses'; + element = angular.element(element); + element = stripCommentsFromElement(element); + + if (classBasedAnimationsBlocked(element)) { + return $delegate.setClass(element, add, remove); + } + + add = isArray(add) ? add : add.split(' '); + remove = isArray(remove) ? remove : remove.split(' '); + + var cache = element.data(STORAGE_KEY); + if (cache) { + cache.add = cache.add.concat(add); + cache.remove = cache.remove.concat(remove); + + //the digest cycle will combine all the animations into one function + return cache.promise; + } else { + element.data(STORAGE_KEY, cache = { + add : add, + remove : remove + }); + } + + return cache.promise = runAnimationPostDigest(function(done) { + var cache = element.data(STORAGE_KEY); + element.removeData(STORAGE_KEY); + + var state = element.data(NG_ANIMATE_STATE) || {}; + var classes = resolveElementClasses(element, cache, state.active); + return !classes + ? done() + : performAnimation('setClass', classes, element, null, null, function() { + $delegate.setClass(element, classes[0], classes[1]); + }, done); + }); + }, + + /** + * @ngdoc method + * @name $animate#cancel + * @kind function + * + * @param {Promise} animationPromise The animation promise that is returned when an animation is started. + * + * @description + * Cancels the provided animation. + */ + cancel : function(promise) { + promise.$$cancelFn(); + }, + + /** + * @ngdoc method + * @name $animate#enabled + * @kind function + * + * @param {boolean=} value If provided then set the animation on or off. + * @param {DOMElement=} element If provided then the element will be used to represent the enable/disable operation + * @return {boolean} Current animation state. + * + * @description + * Globally enables/disables animations. + * + */ + enabled : function(value, element) { + switch(arguments.length) { + case 2: + if (value) { + cleanup(element); + } else { + var data = element.data(NG_ANIMATE_STATE) || {}; + data.disabled = true; + element.data(NG_ANIMATE_STATE, data); + } + break; + + case 1: + rootAnimateState.disabled = !value; + break; + + default: + value = !rootAnimateState.disabled; + break; + } + return !!value; + } + }; + + /* + all animations call this shared animation triggering function internally. + The animationEvent variable refers to the JavaScript animation event that will be triggered + and the className value is the name of the animation that will be applied within the + CSS code. Element, parentElement and afterElement are provided DOM elements for the animation + and the onComplete callback will be fired once the animation is fully complete. + */ + function performAnimation(animationEvent, className, element, parentElement, afterElement, domOperation, doneCallback) { + + var noopCancel = noop; + var runner = animationRunner(element, animationEvent, className); + if (!runner) { + fireDOMOperation(); + fireBeforeCallbackAsync(); + fireAfterCallbackAsync(); + closeAnimation(); + return noopCancel; + } + + animationEvent = runner.event; + className = runner.className; + var elementEvents = angular.element._data(runner.node); + elementEvents = elementEvents && elementEvents.events; + + if (!parentElement) { + parentElement = afterElement ? afterElement.parent() : element.parent(); + } + + //skip the animation if animations are disabled, a parent is already being animated, + //the element is not currently attached to the document body or then completely close + //the animation if any matching animations are not found at all. + //NOTE: IE8 + IE9 should close properly (run closeAnimation()) in case an animation was found. + if (animationsDisabled(element, parentElement)) { + fireDOMOperation(); + fireBeforeCallbackAsync(); + fireAfterCallbackAsync(); + closeAnimation(); + return noopCancel; + } + + var ngAnimateState = element.data(NG_ANIMATE_STATE) || {}; + var runningAnimations = ngAnimateState.active || {}; + var totalActiveAnimations = ngAnimateState.totalActive || 0; + var lastAnimation = ngAnimateState.last; + var skipAnimation = false; + + if (totalActiveAnimations > 0) { + var animationsToCancel = []; + if (!runner.isClassBased) { + if (animationEvent == 'leave' && runningAnimations['ng-leave']) { + skipAnimation = true; + } else { + //cancel all animations when a structural animation takes place + for(var klass in runningAnimations) { + animationsToCancel.push(runningAnimations[klass]); + } + ngAnimateState = {}; + cleanup(element, true); + } + } else if (lastAnimation.event == 'setClass') { + animationsToCancel.push(lastAnimation); + cleanup(element, className); + } + else if (runningAnimations[className]) { + var current = runningAnimations[className]; + if (current.event == animationEvent) { + skipAnimation = true; + } else { + animationsToCancel.push(current); + cleanup(element, className); + } + } + + if (animationsToCancel.length > 0) { + forEach(animationsToCancel, function(operation) { + operation.cancel(); + }); + } + } + + if (runner.isClassBased && !runner.isSetClassOperation && !skipAnimation) { + skipAnimation = (animationEvent == 'addClass') == element.hasClass(className); //opposite of XOR + } + + if (skipAnimation) { + fireDOMOperation(); + fireBeforeCallbackAsync(); + fireAfterCallbackAsync(); + fireDoneCallbackAsync(); + return noopCancel; + } + + runningAnimations = ngAnimateState.active || {}; + totalActiveAnimations = ngAnimateState.totalActive || 0; + + if (animationEvent == 'leave') { + //there's no need to ever remove the listener since the element + //will be removed (destroyed) after the leave animation ends or + //is cancelled midway + element.one('$destroy', function(e) { + var element = angular.element(this); + var state = element.data(NG_ANIMATE_STATE); + if (state) { + var activeLeaveAnimation = state.active['ng-leave']; + if (activeLeaveAnimation) { + activeLeaveAnimation.cancel(); + cleanup(element, 'ng-leave'); + } + } + }); + } + + //the ng-animate class does nothing, but it's here to allow for + //parent animations to find and cancel child animations when needed + element.addClass(NG_ANIMATE_CLASS_NAME); + + var localAnimationCount = globalAnimationCounter++; + totalActiveAnimations++; + runningAnimations[className] = runner; + + element.data(NG_ANIMATE_STATE, { + last : runner, + active : runningAnimations, + index : localAnimationCount, + totalActive : totalActiveAnimations + }); + + //first we run the before animations and when all of those are complete + //then we perform the DOM operation and run the next set of animations + fireBeforeCallbackAsync(); + runner.before(function(cancelled) { + var data = element.data(NG_ANIMATE_STATE); + cancelled = cancelled || + !data || !data.active[className] || + (runner.isClassBased && data.active[className].event != animationEvent); + + fireDOMOperation(); + if (cancelled === true) { + closeAnimation(); + } else { + fireAfterCallbackAsync(); + runner.after(closeAnimation); + } + }); + + return runner.cancel; + + function fireDOMCallback(animationPhase) { + var eventName = '$animate:' + animationPhase; + if (elementEvents && elementEvents[eventName] && elementEvents[eventName].length > 0) { + $$asyncCallback(function() { + element.triggerHandler(eventName, { + event : animationEvent, + className : className + }); + }); + } + } + + function fireBeforeCallbackAsync() { + fireDOMCallback('before'); + } + + function fireAfterCallbackAsync() { + fireDOMCallback('after'); + } + + function fireDoneCallbackAsync() { + fireDOMCallback('close'); + doneCallback(); + } + + //it is less complicated to use a flag than managing and canceling + //timeouts containing multiple callbacks. + function fireDOMOperation() { + if (!fireDOMOperation.hasBeenRun) { + fireDOMOperation.hasBeenRun = true; + domOperation(); + } + } + + function closeAnimation() { + if (!closeAnimation.hasBeenRun) { + closeAnimation.hasBeenRun = true; + var data = element.data(NG_ANIMATE_STATE); + if (data) { + /* only structural animations wait for reflow before removing an + animation, but class-based animations don't. An example of this + failing would be when a parent HTML tag has a ng-class attribute + causing ALL directives below to skip animations during the digest */ + if (runner && runner.isClassBased) { + cleanup(element, className); + } else { + $$asyncCallback(function() { + var data = element.data(NG_ANIMATE_STATE) || {}; + if (localAnimationCount == data.index) { + cleanup(element, className, animationEvent); + } + }); + element.data(NG_ANIMATE_STATE, data); + } + } + fireDoneCallbackAsync(); + } + } + } + + function cancelChildAnimations(element) { + var node = extractElementNode(element); + if (node) { + var nodes = angular.isFunction(node.getElementsByClassName) ? + node.getElementsByClassName(NG_ANIMATE_CLASS_NAME) : + node.querySelectorAll('.' + NG_ANIMATE_CLASS_NAME); + forEach(nodes, function(element) { + element = angular.element(element); + var data = element.data(NG_ANIMATE_STATE); + if (data && data.active) { + forEach(data.active, function(runner) { + runner.cancel(); + }); + } + }); + } + } + + function cleanup(element, className) { + if (isMatchingElement(element, $rootElement)) { + if (!rootAnimateState.disabled) { + rootAnimateState.running = false; + rootAnimateState.structural = false; + } + } else if (className) { + var data = element.data(NG_ANIMATE_STATE) || {}; + + var removeAnimations = className === true; + if (!removeAnimations && data.active && data.active[className]) { + data.totalActive--; + delete data.active[className]; + } + + if (removeAnimations || !data.totalActive) { + element.removeClass(NG_ANIMATE_CLASS_NAME); + element.removeData(NG_ANIMATE_STATE); + } + } + } + + function animationsDisabled(element, parentElement) { + if (rootAnimateState.disabled) { + return true; + } + + if (isMatchingElement(element, $rootElement)) { + return rootAnimateState.running; + } + + var allowChildAnimations, parentRunningAnimation, hasParent; + do { + //the element did not reach the root element which means that it + //is not apart of the DOM. Therefore there is no reason to do + //any animations on it + if (parentElement.length === 0) break; + + var isRoot = isMatchingElement(parentElement, $rootElement); + var state = isRoot ? rootAnimateState : (parentElement.data(NG_ANIMATE_STATE) || {}); + if (state.disabled) { + return true; + } + + //no matter what, for an animation to work it must reach the root element + //this implies that the element is attached to the DOM when the animation is run + if (isRoot) { + hasParent = true; + } + + //once a flag is found that is strictly false then everything before + //it will be discarded and all child animations will be restricted + if (allowChildAnimations !== false) { + var animateChildrenFlag = parentElement.data(NG_ANIMATE_CHILDREN); + if (angular.isDefined(animateChildrenFlag)) { + allowChildAnimations = animateChildrenFlag; + } + } + + parentRunningAnimation = parentRunningAnimation || + state.running || + (state.last && !state.last.isClassBased); + } + while(parentElement = parentElement.parent()); + + return !hasParent || (!allowChildAnimations && parentRunningAnimation); + } + }]); + + $animateProvider.register('', ['$window', '$sniffer', '$timeout', '$$animateReflow', + function($window, $sniffer, $timeout, $$animateReflow) { + // Detect proper transitionend/animationend event names. + var CSS_PREFIX = '', TRANSITION_PROP, TRANSITIONEND_EVENT, ANIMATION_PROP, ANIMATIONEND_EVENT; + + // If unprefixed events are not supported but webkit-prefixed are, use the latter. + // Otherwise, just use W3C names, browsers not supporting them at all will just ignore them. + // Note: Chrome implements `window.onwebkitanimationend` and doesn't implement `window.onanimationend` + // but at the same time dispatches the `animationend` event and not `webkitAnimationEnd`. + // Register both events in case `window.onanimationend` is not supported because of that, + // do the same for `transitionend` as Safari is likely to exhibit similar behavior. + // Also, the only modern browser that uses vendor prefixes for transitions/keyframes is webkit + // therefore there is no reason to test anymore for other vendor prefixes: http://caniuse.com/#search=transition + if (window.ontransitionend === undefined && window.onwebkittransitionend !== undefined) { + CSS_PREFIX = '-webkit-'; + TRANSITION_PROP = 'WebkitTransition'; + TRANSITIONEND_EVENT = 'webkitTransitionEnd transitionend'; + } else { + TRANSITION_PROP = 'transition'; + TRANSITIONEND_EVENT = 'transitionend'; + } + + if (window.onanimationend === undefined && window.onwebkitanimationend !== undefined) { + CSS_PREFIX = '-webkit-'; + ANIMATION_PROP = 'WebkitAnimation'; + ANIMATIONEND_EVENT = 'webkitAnimationEnd animationend'; + } else { + ANIMATION_PROP = 'animation'; + ANIMATIONEND_EVENT = 'animationend'; + } + + var DURATION_KEY = 'Duration'; + var PROPERTY_KEY = 'Property'; + var DELAY_KEY = 'Delay'; + var ANIMATION_ITERATION_COUNT_KEY = 'IterationCount'; + var ANIMATION_PLAYSTATE_KEY = 'PlayState'; + var NG_ANIMATE_PARENT_KEY = '$$ngAnimateKey'; + var NG_ANIMATE_CSS_DATA_KEY = '$$ngAnimateCSS3Data'; + var ELAPSED_TIME_MAX_DECIMAL_PLACES = 3; + var CLOSING_TIME_BUFFER = 1.5; + var ONE_SECOND = 1000; + + var lookupCache = {}; + var parentCounter = 0; + var animationReflowQueue = []; + var cancelAnimationReflow; + function afterReflow(element, callback) { + if (cancelAnimationReflow) { + cancelAnimationReflow(); + } + animationReflowQueue.push(callback); + cancelAnimationReflow = $$animateReflow(function() { + forEach(animationReflowQueue, function(fn) { + fn(); + }); + + animationReflowQueue = []; + cancelAnimationReflow = null; + lookupCache = {}; + }); + } + + var closingTimer = null; + var closingTimestamp = 0; + var animationElementQueue = []; + function animationCloseHandler(element, totalTime) { + var node = extractElementNode(element); + element = angular.element(node); + + //this item will be garbage collected by the closing + //animation timeout + animationElementQueue.push(element); + + //but it may not need to cancel out the existing timeout + //if the timestamp is less than the previous one + var futureTimestamp = Date.now() + totalTime; + if (futureTimestamp <= closingTimestamp) { + return; + } + + $timeout.cancel(closingTimer); + + closingTimestamp = futureTimestamp; + closingTimer = $timeout(function() { + closeAllAnimations(animationElementQueue); + animationElementQueue = []; + }, totalTime, false); + } + + function closeAllAnimations(elements) { + forEach(elements, function(element) { + var elementData = element.data(NG_ANIMATE_CSS_DATA_KEY); + if (elementData) { + forEach(elementData.closeAnimationFns, function(fn) { + fn(); + }); + } + }); + } + + function getElementAnimationDetails(element, cacheKey) { + var data = cacheKey ? lookupCache[cacheKey] : null; + if (!data) { + var transitionDuration = 0; + var transitionDelay = 0; + var animationDuration = 0; + var animationDelay = 0; + + //we want all the styles defined before and after + forEach(element, function(element) { + if (element.nodeType == ELEMENT_NODE) { + var elementStyles = $window.getComputedStyle(element) || {}; + + var transitionDurationStyle = elementStyles[TRANSITION_PROP + DURATION_KEY]; + transitionDuration = Math.max(parseMaxTime(transitionDurationStyle), transitionDuration); + + var transitionDelayStyle = elementStyles[TRANSITION_PROP + DELAY_KEY]; + transitionDelay = Math.max(parseMaxTime(transitionDelayStyle), transitionDelay); + + var animationDelayStyle = elementStyles[ANIMATION_PROP + DELAY_KEY]; + animationDelay = Math.max(parseMaxTime(elementStyles[ANIMATION_PROP + DELAY_KEY]), animationDelay); + + var aDuration = parseMaxTime(elementStyles[ANIMATION_PROP + DURATION_KEY]); + + if (aDuration > 0) { + aDuration *= parseInt(elementStyles[ANIMATION_PROP + ANIMATION_ITERATION_COUNT_KEY], 10) || 1; + } + animationDuration = Math.max(aDuration, animationDuration); + } + }); + data = { + total : 0, + transitionDelay: transitionDelay, + transitionDuration: transitionDuration, + animationDelay: animationDelay, + animationDuration: animationDuration + }; + if (cacheKey) { + lookupCache[cacheKey] = data; + } + } + return data; + } + + function parseMaxTime(str) { + var maxValue = 0; + var values = angular.isString(str) ? + str.split(/\s*,\s*/) : + []; + forEach(values, function(value) { + maxValue = Math.max(parseFloat(value) || 0, maxValue); + }); + return maxValue; + } + + function getCacheKey(element) { + var parentElement = element.parent(); + var parentID = parentElement.data(NG_ANIMATE_PARENT_KEY); + if (!parentID) { + parentElement.data(NG_ANIMATE_PARENT_KEY, ++parentCounter); + parentID = parentCounter; + } + return parentID + '-' + extractElementNode(element).getAttribute('class'); + } + + function animateSetup(animationEvent, element, className) { + var structural = ['ng-enter','ng-leave','ng-move'].indexOf(className) >= 0; + + var cacheKey = getCacheKey(element); + var eventCacheKey = cacheKey + ' ' + className; + var itemIndex = lookupCache[eventCacheKey] ? ++lookupCache[eventCacheKey].total : 0; + + var stagger = {}; + if (itemIndex > 0) { + var staggerClassName = className + '-stagger'; + var staggerCacheKey = cacheKey + ' ' + staggerClassName; + var applyClasses = !lookupCache[staggerCacheKey]; + + applyClasses && element.addClass(staggerClassName); + + stagger = getElementAnimationDetails(element, staggerCacheKey); + + applyClasses && element.removeClass(staggerClassName); + } + + element.addClass(className); + + var formerData = element.data(NG_ANIMATE_CSS_DATA_KEY) || {}; + var timings = getElementAnimationDetails(element, eventCacheKey); + var transitionDuration = timings.transitionDuration; + var animationDuration = timings.animationDuration; + + if (structural && transitionDuration === 0 && animationDuration === 0) { + element.removeClass(className); + return false; + } + + var blockTransition = structural && transitionDuration > 0; + var blockAnimation = animationDuration > 0 && + stagger.animationDelay > 0 && + stagger.animationDuration === 0; + + var closeAnimationFns = formerData.closeAnimationFns || []; + element.data(NG_ANIMATE_CSS_DATA_KEY, { + stagger : stagger, + cacheKey : eventCacheKey, + running : formerData.running || 0, + itemIndex : itemIndex, + blockTransition : blockTransition, + closeAnimationFns : closeAnimationFns + }); + + var node = extractElementNode(element); + + if (blockTransition) { + blockTransitions(node, true); + } + + if (blockAnimation) { + blockAnimations(node, true); + } + + return true; + } + + function animateRun(animationEvent, element, className, activeAnimationComplete) { + var node = extractElementNode(element); + var elementData = element.data(NG_ANIMATE_CSS_DATA_KEY); + if (node.getAttribute('class').indexOf(className) == -1 || !elementData) { + activeAnimationComplete(); + return; + } + + if (elementData.blockTransition) { + blockTransitions(node, false); + } + + var activeClassName = ''; + var pendingClassName = ''; + forEach(className.split(' '), function(klass, i) { + var prefix = (i > 0 ? ' ' : '') + klass; + activeClassName += prefix + '-active'; + pendingClassName += prefix + '-pending'; + }); + + var style = ''; + var appliedStyles = []; + var itemIndex = elementData.itemIndex; + var stagger = elementData.stagger; + var staggerTime = 0; + if (itemIndex > 0) { + var transitionStaggerDelay = 0; + if (stagger.transitionDelay > 0 && stagger.transitionDuration === 0) { + transitionStaggerDelay = stagger.transitionDelay * itemIndex; + } + + var animationStaggerDelay = 0; + if (stagger.animationDelay > 0 && stagger.animationDuration === 0) { + animationStaggerDelay = stagger.animationDelay * itemIndex; + appliedStyles.push(CSS_PREFIX + 'animation-play-state'); + } + + staggerTime = Math.round(Math.max(transitionStaggerDelay, animationStaggerDelay) * 100) / 100; + } + + if (!staggerTime) { + element.addClass(activeClassName); + } + + var eventCacheKey = elementData.cacheKey + ' ' + activeClassName; + var timings = getElementAnimationDetails(element, eventCacheKey); + var maxDuration = Math.max(timings.transitionDuration, timings.animationDuration); + if (maxDuration === 0) { + element.removeClass(activeClassName); + animateClose(element, className); + activeAnimationComplete(); + return; + } + + var maxDelay = Math.max(timings.transitionDelay, timings.animationDelay); + var maxDelayTime = maxDelay * ONE_SECOND; + + if (appliedStyles.length > 0) { + //the element being animated may sometimes contain comment nodes in + //the jqLite object, so we're safe to use a single variable to house + //the styles since there is always only one element being animated + var oldStyle = node.getAttribute('style') || ''; + if (oldStyle.charAt(oldStyle.length-1) !== ';') { + oldStyle += ';'; + } + node.setAttribute('style', oldStyle + ' ' + style); + } + + var startTime = Date.now(); + var css3AnimationEvents = ANIMATIONEND_EVENT + ' ' + TRANSITIONEND_EVENT; + var animationTime = (maxDelay + maxDuration) * CLOSING_TIME_BUFFER; + var totalTime = (staggerTime + animationTime) * ONE_SECOND; + + var staggerTimeout; + if (staggerTime > 0) { + element.addClass(pendingClassName); + staggerTimeout = $timeout(function() { + staggerTimeout = null; + element.addClass(activeClassName); + element.removeClass(pendingClassName); + if (timings.animationDuration > 0) { + blockAnimations(node, false); + } + }, staggerTime * ONE_SECOND, false); + } + + element.on(css3AnimationEvents, onAnimationProgress); + elementData.closeAnimationFns.push(function() { + onEnd(); + activeAnimationComplete(); + }); + + elementData.running++; + animationCloseHandler(element, totalTime); + return onEnd; + + // This will automatically be called by $animate so + // there is no need to attach this internally to the + // timeout done method. + function onEnd(cancelled) { + element.off(css3AnimationEvents, onAnimationProgress); + element.removeClass(activeClassName); + element.removeClass(pendingClassName); + if (staggerTimeout) { + $timeout.cancel(staggerTimeout); + } + animateClose(element, className); + var node = extractElementNode(element); + for (var i in appliedStyles) { + node.style.removeProperty(appliedStyles[i]); + } + } + + function onAnimationProgress(event) { + event.stopPropagation(); + var ev = event.originalEvent || event; + var timeStamp = ev.$manualTimeStamp || ev.timeStamp || Date.now(); + + /* Firefox (or possibly just Gecko) likes to not round values up + * when a ms measurement is used for the animation */ + var elapsedTime = parseFloat(ev.elapsedTime.toFixed(ELAPSED_TIME_MAX_DECIMAL_PLACES)); + + /* $manualTimeStamp is a mocked timeStamp value which is set + * within browserTrigger(). This is only here so that tests can + * mock animations properly. Real events fallback to event.timeStamp, + * or, if they don't, then a timeStamp is automatically created for them. + * We're checking to see if the timeStamp surpasses the expected delay, + * but we're using elapsedTime instead of the timeStamp on the 2nd + * pre-condition since animations sometimes close off early */ + if (Math.max(timeStamp - startTime, 0) >= maxDelayTime && elapsedTime >= maxDuration) { + activeAnimationComplete(); + } + } + } + + function blockTransitions(node, bool) { + node.style[TRANSITION_PROP + PROPERTY_KEY] = bool ? 'none' : ''; + } + + function blockAnimations(node, bool) { + node.style[ANIMATION_PROP + ANIMATION_PLAYSTATE_KEY] = bool ? 'paused' : ''; + } + + function animateBefore(animationEvent, element, className, calculationDecorator) { + if (animateSetup(animationEvent, element, className, calculationDecorator)) { + return function(cancelled) { + cancelled && animateClose(element, className); + }; + } + } + + function animateAfter(animationEvent, element, className, afterAnimationComplete) { + if (element.data(NG_ANIMATE_CSS_DATA_KEY)) { + return animateRun(animationEvent, element, className, afterAnimationComplete); + } else { + animateClose(element, className); + afterAnimationComplete(); + } + } + + function animate(animationEvent, element, className, animationComplete) { + //If the animateSetup function doesn't bother returning a + //cancellation function then it means that there is no animation + //to perform at all + var preReflowCancellation = animateBefore(animationEvent, element, className); + if (!preReflowCancellation) { + animationComplete(); + return; + } + + //There are two cancellation functions: one is before the first + //reflow animation and the second is during the active state + //animation. The first function will take care of removing the + //data from the element which will not make the 2nd animation + //happen in the first place + var cancel = preReflowCancellation; + afterReflow(element, function() { + //once the reflow is complete then we point cancel to + //the new cancellation function which will remove all of the + //animation properties from the active animation + cancel = animateAfter(animationEvent, element, className, animationComplete); + }); + + return function(cancelled) { + (cancel || noop)(cancelled); + }; + } + + function animateClose(element, className) { + element.removeClass(className); + var data = element.data(NG_ANIMATE_CSS_DATA_KEY); + if (data) { + if (data.running) { + data.running--; + } + if (!data.running || data.running === 0) { + element.removeData(NG_ANIMATE_CSS_DATA_KEY); + } + } + } + + return { + enter : function(element, animationCompleted) { + return animate('enter', element, 'ng-enter', animationCompleted); + }, + + leave : function(element, animationCompleted) { + return animate('leave', element, 'ng-leave', animationCompleted); + }, + + move : function(element, animationCompleted) { + return animate('move', element, 'ng-move', animationCompleted); + }, + + beforeSetClass : function(element, add, remove, animationCompleted) { + var className = suffixClasses(remove, '-remove') + ' ' + + suffixClasses(add, '-add'); + var cancellationMethod = animateBefore('setClass', element, className); + if (cancellationMethod) { + afterReflow(element, animationCompleted); + return cancellationMethod; + } + animationCompleted(); + }, + + beforeAddClass : function(element, className, animationCompleted) { + var cancellationMethod = animateBefore('addClass', element, suffixClasses(className, '-add')); + if (cancellationMethod) { + afterReflow(element, animationCompleted); + return cancellationMethod; + } + animationCompleted(); + }, + + beforeRemoveClass : function(element, className, animationCompleted) { + var cancellationMethod = animateBefore('removeClass', element, suffixClasses(className, '-remove')); + if (cancellationMethod) { + afterReflow(element, animationCompleted); + return cancellationMethod; + } + animationCompleted(); + }, + + setClass : function(element, add, remove, animationCompleted) { + remove = suffixClasses(remove, '-remove'); + add = suffixClasses(add, '-add'); + var className = remove + ' ' + add; + return animateAfter('setClass', element, className, animationCompleted); + }, + + addClass : function(element, className, animationCompleted) { + return animateAfter('addClass', element, suffixClasses(className, '-add'), animationCompleted); + }, + + removeClass : function(element, className, animationCompleted) { + return animateAfter('removeClass', element, suffixClasses(className, '-remove'), animationCompleted); + } + }; + + function suffixClasses(classes, suffix) { + var className = ''; + classes = isArray(classes) ? classes : classes.split(/\s+/); + forEach(classes, function(klass, i) { + if (klass && klass.length > 0) { + className += (i > 0 ? ' ' : '') + klass + suffix; + } + }); + return className; + } + }]); + }]); + + +})(window, window.angular); diff --git a/1.3.0-rc.2/angular-animate.min.js b/1.3.0-rc.2/angular-animate.min.js new file mode 100644 index 0000000000..0ea01401db --- /dev/null +++ b/1.3.0-rc.2/angular-animate.min.js @@ -0,0 +1,30 @@ +/* + AngularJS v1.3.0-rc.2 + (c) 2010-2014 Google, Inc. http://angularjs.org + License: MIT +*/ +(function(D,f,E){'use strict';f.module("ngAnimate",["ng"]).directive("ngAnimateChildren",function(){return function(P,w,g){g=g.ngAnimateChildren;f.isString(g)&&0===g.length?w.data("$$ngAnimateChildren",!0):P.$watch(g,function(f){w.data("$$ngAnimateChildren",!!f)})}}).factory("$$animateReflow",["$$rAF","$document",function(f,w){return function(g){return f(function(){g()})}}]).config(["$provide","$animateProvider",function(P,w){function g(f){for(var g=0;gb?(d||"addClass"==e.event)&&l.push(c):0=B&&a>=w&&d()}var k=g(b);a=b.data("$$ngAnimateCSS3Data");if(-1!=k.getAttribute("class").indexOf(c)&&a){a.blockTransition&&(k.style[H+"Property"]="");var m="", +n="";h(c.split(" "),function(b,a){var c=(0 + * + * See {@link ngCookies.$cookies `$cookies`} and + * {@link ngCookies.$cookieStore `$cookieStore`} for usage. + */ + + +angular.module('ngCookies', ['ng']). + /** + * @ngdoc service + * @name $cookies + * + * @description + * Provides read/write access to browser's cookies. + * + * Only a simple Object is exposed and by adding or removing properties to/from this object, new + * cookies are created/deleted at the end of current $eval. + * The object's properties can only be strings. + * + * Requires the {@link ngCookies `ngCookies`} module to be installed. + * + * @example + * + * ```js + * angular.module('cookiesExample', ['ngCookies']) + * .controller('ExampleController', ['$cookies', function($cookies) { + * // Retrieving a cookie + * var favoriteCookie = $cookies.myFavorite; + * // Setting a cookie + * $cookies.myFavorite = 'oatmeal'; + * }]); + * ``` + */ + factory('$cookies', ['$rootScope', '$browser', function ($rootScope, $browser) { + var cookies = {}, + lastCookies = {}, + lastBrowserCookies, + runEval = false, + copy = angular.copy, + isUndefined = angular.isUndefined; + + //creates a poller fn that copies all cookies from the $browser to service & inits the service + $browser.addPollFn(function() { + var currentCookies = $browser.cookies(); + if (lastBrowserCookies != currentCookies) { //relies on browser.cookies() impl + lastBrowserCookies = currentCookies; + copy(currentCookies, lastCookies); + copy(currentCookies, cookies); + if (runEval) $rootScope.$apply(); + } + })(); + + runEval = true; + + //at the end of each eval, push cookies + //TODO: this should happen before the "delayed" watches fire, because if some cookies are not + // strings or browser refuses to store some cookies, we update the model in the push fn. + $rootScope.$watch(push); + + return cookies; + + + /** + * Pushes all the cookies from the service to the browser and verifies if all cookies were + * stored. + */ + function push() { + var name, + value, + browserCookies, + updated; + + //delete any cookies deleted in $cookies + for (name in lastCookies) { + if (isUndefined(cookies[name])) { + $browser.cookies(name, undefined); + } + } + + //update all cookies updated in $cookies + for(name in cookies) { + value = cookies[name]; + if (!angular.isString(value)) { + value = '' + value; + cookies[name] = value; + } + if (value !== lastCookies[name]) { + $browser.cookies(name, value); + updated = true; + } + } + + //verify what was actually stored + if (updated){ + updated = false; + browserCookies = $browser.cookies(); + + for (name in cookies) { + if (cookies[name] !== browserCookies[name]) { + //delete or reset all cookies that the browser dropped from $cookies + if (isUndefined(browserCookies[name])) { + delete cookies[name]; + } else { + cookies[name] = browserCookies[name]; + } + updated = true; + } + } + } + } + }]). + + + /** + * @ngdoc service + * @name $cookieStore + * @requires $cookies + * + * @description + * Provides a key-value (string-object) storage, that is backed by session cookies. + * Objects put or retrieved from this storage are automatically serialized or + * deserialized by angular's toJson/fromJson. + * + * Requires the {@link ngCookies `ngCookies`} module to be installed. + * + * @example + * + * ```js + * angular.module('cookieStoreExample', ['ngCookies']) + * .controller('ExampleController', ['$cookieStore', function($cookieStore) { + * // Put cookie + * $cookieStore.put('myFavorite','oatmeal'); + * // Get cookie + * var favoriteCookie = $cookieStore.get('myFavorite'); + * // Removing a cookie + * $cookieStore.remove('myFavorite'); + * }]); + * ``` + */ + factory('$cookieStore', ['$cookies', function($cookies) { + + return { + /** + * @ngdoc method + * @name $cookieStore#get + * + * @description + * Returns the value of given cookie key + * + * @param {string} key Id to use for lookup. + * @returns {Object} Deserialized cookie value. + */ + get: function(key) { + var value = $cookies[key]; + return value ? angular.fromJson(value) : value; + }, + + /** + * @ngdoc method + * @name $cookieStore#put + * + * @description + * Sets a value for given cookie key + * + * @param {string} key Id for the `value`. + * @param {Object} value Value to be stored. + */ + put: function(key, value) { + $cookies[key] = angular.toJson(value); + }, + + /** + * @ngdoc method + * @name $cookieStore#remove + * + * @description + * Remove given cookie + * + * @param {string} key Id of the key-value pair to delete. + */ + remove: function(key) { + delete $cookies[key]; + } + }; + + }]); + + +})(window, window.angular); diff --git a/1.3.0-rc.2/angular-cookies.min.js b/1.3.0-rc.2/angular-cookies.min.js new file mode 100644 index 0000000000..9c2a8fef74 --- /dev/null +++ b/1.3.0-rc.2/angular-cookies.min.js @@ -0,0 +1,8 @@ +/* + AngularJS v1.3.0-rc.2 + (c) 2010-2014 Google, Inc. http://angularjs.org + License: MIT +*/ +(function(p,f,n){'use strict';f.module("ngCookies",["ng"]).factory("$cookies",["$rootScope","$browser",function(e,b){var c={},g={},h,k=!1,l=f.copy,m=f.isUndefined;b.addPollFn(function(){var a=b.cookies();h!=a&&(h=a,l(a,g),l(a,c),k&&e.$apply())})();k=!0;e.$watch(function(){var a,d,e;for(a in g)m(c[a])&&b.cookies(a,n);for(a in c)d=c[a],f.isString(d)||(d=""+d,c[a]=d),d!==g[a]&&(b.cookies(a,d),e=!0);if(e)for(a in d=b.cookies(),c)c[a]!==d[a]&&(m(d[a])?delete c[a]:c[a]=d[a])});return c}]).factory("$cookieStore", +["$cookies",function(e){return{get:function(b){return(b=e[b])?f.fromJson(b):b},put:function(b,c){e[b]=f.toJson(c)},remove:function(b){delete e[b]}}}])})(window,window.angular); +//# sourceMappingURL=angular-cookies.min.js.map diff --git a/1.3.0-rc.2/angular-cookies.min.js.map b/1.3.0-rc.2/angular-cookies.min.js.map new file mode 100644 index 0000000000..ad66e4db28 --- /dev/null +++ b/1.3.0-rc.2/angular-cookies.min.js.map @@ -0,0 +1,8 @@ +{ +"version":3, +"file":"angular-cookies.min.js", +"lineCount":7, +"mappings":"A;;;;;aAKC,SAAQ,CAACA,CAAD,CAASC,CAAT,CAAkBC,CAAlB,CAA6B,CAmBtCD,CAAAE,OAAA,CAAe,WAAf,CAA4B,CAAC,IAAD,CAA5B,CAAAC,QAAA,CA0BW,UA1BX,CA0BuB,CAAC,YAAD,CAAe,UAAf,CAA2B,QAAS,CAACC,CAAD,CAAaC,CAAb,CAAuB,CAAA,IACxEC,EAAU,EAD8D,CAExEC,EAAc,EAF0D,CAGxEC,CAHwE,CAIxEC,EAAU,CAAA,CAJ8D,CAKxEC,EAAOV,CAAAU,KALiE,CAMxEC,EAAcX,CAAAW,YAGlBN,EAAAO,UAAA,CAAmB,QAAQ,EAAG,CAC5B,IAAIC,EAAiBR,CAAAC,QAAA,EACjBE,EAAJ,EAA0BK,CAA1B,GACEL,CAGA,CAHqBK,CAGrB,CAFAH,CAAA,CAAKG,CAAL,CAAqBN,CAArB,CAEA,CADAG,CAAA,CAAKG,CAAL,CAAqBP,CAArB,CACA,CAAIG,CAAJ,EAAaL,CAAAU,OAAA,EAJf,CAF4B,CAA9B,CAAA,EAUAL,EAAA,CAAU,CAAA,CAKVL,EAAAW,OAAA,CASAC,QAAa,EAAG,CAAA,IACVC,CADU,CAEVC,CAFU,CAIVC,CAGJ,KAAKF,CAAL,GAAaV,EAAb,CACMI,CAAA,CAAYL,CAAA,CAAQW,CAAR,CAAZ,CAAJ,EACEZ,CAAAC,QAAA,CAAiBW,CAAjB,CAAuBhB,CAAvB,CAKJ,KAAIgB,CAAJ,GAAYX,EAAZ,CACEY,CAKA,CALQZ,CAAA,CAAQW,CAAR,CAKR,CAJKjB,CAAAoB,SAAA,CAAiBF,CAAjB,CAIL,GAHEA,CACA,CADQ,EACR,CADaA,CACb,CAAAZ,CAAA,CAAQW,CAAR,CAAA,CAAgBC,CAElB,EAAIA,CAAJ,GAAcX,CAAA,CAAYU,CAAZ,CAAd,GACEZ,CAAAC,QAAA,CAAiBW,CAAjB,CAAuBC,CAAvB,CACA,CAAAC,CAAA,CAAU,CAAA,CAFZ,CAOF,IAAIA,CAAJ,CAIE,IAAKF,CAAL,GAFAI,EAEaf,CAFID,CAAAC,QAAA,EAEJA,CAAAA,CAAb,CACMA,CAAA,CAAQW,CAAR,CAAJ,GAAsBI,CAAA,CAAeJ,CAAf,CAAtB,GAEMN,CAAA,CAAYU,CAAA,CAAeJ,CAAf,CAAZ,CAAJ,CACE,OAAOX,CAAA,CAAQW,CAAR,CADT,CAGEX,CAAA,CAAQW,CAAR,CAHF,CAGkBI,CAAA,CAAeJ,CAAf,CALpB,CAhCU,CAThB,CAEA,OAAOX,EA1BqE,CAA3D,CA1BvB,CAAAH,QAAA,CAoIW,cApIX;AAoI2B,CAAC,UAAD,CAAa,QAAQ,CAACmB,CAAD,CAAW,CAErD,MAAO,CAWLC,IAAKA,QAAQ,CAACC,CAAD,CAAM,CAEjB,MAAO,CADHN,CACG,CADKI,CAAA,CAASE,CAAT,CACL,EAAQxB,CAAAyB,SAAA,CAAiBP,CAAjB,CAAR,CAAkCA,CAFxB,CAXd,CA0BLQ,IAAKA,QAAQ,CAACF,CAAD,CAAMN,CAAN,CAAa,CACxBI,CAAA,CAASE,CAAT,CAAA,CAAgBxB,CAAA2B,OAAA,CAAeT,CAAf,CADQ,CA1BrB,CAuCLU,OAAQA,QAAQ,CAACJ,CAAD,CAAM,CACpB,OAAOF,CAAA,CAASE,CAAT,CADa,CAvCjB,CAF8C,CAAhC,CApI3B,CAnBsC,CAArC,CAAD,CAwMGzB,MAxMH,CAwMWA,MAAAC,QAxMX;", +"sources":["angular-cookies.js"], +"names":["window","angular","undefined","module","factory","$rootScope","$browser","cookies","lastCookies","lastBrowserCookies","runEval","copy","isUndefined","addPollFn","currentCookies","$apply","$watch","push","name","value","updated","isString","browserCookies","$cookies","get","key","fromJson","put","toJson","remove"] +} diff --git a/1.3.0-rc.2/angular-csp.css b/1.3.0-rc.2/angular-csp.css new file mode 100644 index 0000000000..2124540259 --- /dev/null +++ b/1.3.0-rc.2/angular-csp.css @@ -0,0 +1,13 @@ +/* Include this file in your html if you are using the CSP mode. */ + +@charset "UTF-8"; + +[ng\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], +.ng-cloak, .x-ng-cloak, +.ng-hide:not(.ng-animate) { + display: none !important; +} + +ng\:form { + display: block; +} diff --git a/1.3.0-rc.2/angular-loader.js b/1.3.0-rc.2/angular-loader.js new file mode 100644 index 0000000000..20b9d59c4d --- /dev/null +++ b/1.3.0-rc.2/angular-loader.js @@ -0,0 +1,422 @@ +/** + * @license AngularJS v1.3.0-rc.2 + * (c) 2010-2014 Google, Inc. http://angularjs.org + * License: MIT + */ + +(function() {'use strict'; + +/** + * @description + * + * This object provides a utility for producing rich Error messages within + * Angular. It can be called as follows: + * + * var exampleMinErr = minErr('example'); + * throw exampleMinErr('one', 'This {0} is {1}', foo, bar); + * + * The above creates an instance of minErr in the example namespace. The + * resulting error will have a namespaced error code of example.one. The + * resulting error will replace {0} with the value of foo, and {1} with the + * value of bar. The object is not restricted in the number of arguments it can + * take. + * + * If fewer arguments are specified than necessary for interpolation, the extra + * interpolation markers will be preserved in the final string. + * + * Since data will be parsed statically during a build step, some restrictions + * are applied with respect to how minErr instances are created and called. + * Instances should have names of the form namespaceMinErr for a minErr created + * using minErr('namespace') . Error codes, namespaces and template strings + * should all be static strings, not variables or general expressions. + * + * @param {string} module The namespace to use for the new minErr instance. + * @param {function} ErrorConstructor Custom error constructor to be instantiated when returning + * error from returned function, for cases when a particular type of error is useful. + * @returns {function(code:string, template:string, ...templateArgs): Error} minErr instance + */ + +function minErr(module, ErrorConstructor) { + ErrorConstructor = ErrorConstructor || Error; + return function () { + var code = arguments[0], + prefix = '[' + (module ? module + ':' : '') + code + '] ', + template = arguments[1], + templateArgs = arguments, + stringify = function (obj) { + if (typeof obj === 'function') { + return obj.toString().replace(/ \{[\s\S]*$/, ''); + } else if (typeof obj === 'undefined') { + return 'undefined'; + } else if (typeof obj !== 'string') { + return JSON.stringify(obj); + } + return obj; + }, + message, i; + + message = prefix + template.replace(/\{\d+\}/g, function (match) { + var index = +match.slice(1, -1), arg; + + if (index + 2 < templateArgs.length) { + arg = templateArgs[index + 2]; + if (typeof arg === 'function') { + return arg.toString().replace(/ ?\{[\s\S]*$/, ''); + } else if (typeof arg === 'undefined') { + return 'undefined'; + } else if (typeof arg !== 'string') { + return toJson(arg); + } + return arg; + } + return match; + }); + + message = message + '\nhttp://errors.angularjs.org/1.3.0-rc.2/' + + (module ? module + '/' : '') + code; + for (i = 2; i < arguments.length; i++) { + message = message + (i == 2 ? '?' : '&') + 'p' + (i-2) + '=' + + encodeURIComponent(stringify(arguments[i])); + } + return new ErrorConstructor(message); + }; +} + +/** + * @ngdoc type + * @name angular.Module + * @module ng + * @description + * + * Interface for configuring angular {@link angular.module modules}. + */ + +function setupModuleLoader(window) { + + var $injectorMinErr = minErr('$injector'); + var ngMinErr = minErr('ng'); + + function ensure(obj, name, factory) { + return obj[name] || (obj[name] = factory()); + } + + var angular = ensure(window, 'angular', Object); + + // We need to expose `angular.$$minErr` to modules such as `ngResource` that reference it during bootstrap + angular.$$minErr = angular.$$minErr || minErr; + + return ensure(angular, 'module', function() { + /** @type {Object.} */ + var modules = {}; + + /** + * @ngdoc function + * @name angular.module + * @module ng + * @description + * + * The `angular.module` is a global place for creating, registering and retrieving Angular + * modules. + * All modules (angular core or 3rd party) that should be available to an application must be + * registered using this mechanism. + * + * When passed two or more arguments, a new module is created. If passed only one argument, an + * existing module (the name passed as the first argument to `module`) is retrieved. + * + * + * # Module + * + * A module is a collection of services, directives, controllers, filters, and configuration information. + * `angular.module` is used to configure the {@link auto.$injector $injector}. + * + * ```js + * // Create a new module + * var myModule = angular.module('myModule', []); + * + * // register a new service + * myModule.value('appName', 'MyCoolApp'); + * + * // configure existing services inside initialization blocks. + * myModule.config(['$locationProvider', function($locationProvider) { + * // Configure existing providers + * $locationProvider.hashPrefix('!'); + * }]); + * ``` + * + * Then you can create an injector and load your modules like this: + * + * ```js + * var injector = angular.injector(['ng', 'myModule']) + * ``` + * + * However it's more likely that you'll just use + * {@link ng.directive:ngApp ngApp} or + * {@link angular.bootstrap} to simplify this process for you. + * + * @param {!string} name The name of the module to create or retrieve. + * @param {!Array.=} requires If specified then new module is being created. If + * unspecified then the module is being retrieved for further configuration. + * @param {Function=} configFn Optional configuration function for the module. Same as + * {@link angular.Module#config Module#config()}. + * @returns {module} new module with the {@link angular.Module} api. + */ + return function module(name, requires, configFn) { + var assertNotHasOwnProperty = function(name, context) { + if (name === 'hasOwnProperty') { + throw ngMinErr('badname', 'hasOwnProperty is not a valid {0} name', context); + } + }; + + assertNotHasOwnProperty(name, 'module'); + if (requires && modules.hasOwnProperty(name)) { + modules[name] = null; + } + return ensure(modules, name, function() { + if (!requires) { + throw $injectorMinErr('nomod', "Module '{0}' is not available! You either misspelled " + + "the module name or forgot to load it. If registering a module ensure that you " + + "specify the dependencies as the second argument.", name); + } + + /** @type {!Array.>} */ + var invokeQueue = []; + + /** @type {!Array.} */ + var configBlocks = []; + + /** @type {!Array.} */ + var runBlocks = []; + + var config = invokeLater('$injector', 'invoke', 'push', configBlocks); + + /** @type {angular.Module} */ + var moduleInstance = { + // Private state + _invokeQueue: invokeQueue, + _configBlocks: configBlocks, + _runBlocks: runBlocks, + + /** + * @ngdoc property + * @name angular.Module#requires + * @module ng + * + * @description + * Holds the list of modules which the injector will load before the current module is + * loaded. + */ + requires: requires, + + /** + * @ngdoc property + * @name angular.Module#name + * @module ng + * + * @description + * Name of the module. + */ + name: name, + + + /** + * @ngdoc method + * @name angular.Module#provider + * @module ng + * @param {string} name service name + * @param {Function} providerType Construction function for creating new instance of the + * service. + * @description + * See {@link auto.$provide#provider $provide.provider()}. + */ + provider: invokeLater('$provide', 'provider'), + + /** + * @ngdoc method + * @name angular.Module#factory + * @module ng + * @param {string} name service name + * @param {Function} providerFunction Function for creating new instance of the service. + * @description + * See {@link auto.$provide#factory $provide.factory()}. + */ + factory: invokeLater('$provide', 'factory'), + + /** + * @ngdoc method + * @name angular.Module#service + * @module ng + * @param {string} name service name + * @param {Function} constructor A constructor function that will be instantiated. + * @description + * See {@link auto.$provide#service $provide.service()}. + */ + service: invokeLater('$provide', 'service'), + + /** + * @ngdoc method + * @name angular.Module#value + * @module ng + * @param {string} name service name + * @param {*} object Service instance object. + * @description + * See {@link auto.$provide#value $provide.value()}. + */ + value: invokeLater('$provide', 'value'), + + /** + * @ngdoc method + * @name angular.Module#constant + * @module ng + * @param {string} name constant name + * @param {*} object Constant value. + * @description + * Because the constant are fixed, they get applied before other provide methods. + * See {@link auto.$provide#constant $provide.constant()}. + */ + constant: invokeLater('$provide', 'constant', 'unshift'), + + /** + * @ngdoc method + * @name angular.Module#animation + * @module ng + * @param {string} name animation name + * @param {Function} animationFactory Factory function for creating new instance of an + * animation. + * @description + * + * **NOTE**: animations take effect only if the **ngAnimate** module is loaded. + * + * + * Defines an animation hook that can be later used with + * {@link ngAnimate.$animate $animate} service and directives that use this service. + * + * ```js + * module.animation('.animation-name', function($inject1, $inject2) { + * return { + * eventName : function(element, done) { + * //code to run the animation + * //once complete, then run done() + * return function cancellationFunction(element) { + * //code to cancel the animation + * } + * } + * } + * }) + * ``` + * + * See {@link ngAnimate.$animateProvider#register $animateProvider.register()} and + * {@link ngAnimate ngAnimate module} for more information. + */ + animation: invokeLater('$animateProvider', 'register'), + + /** + * @ngdoc method + * @name angular.Module#filter + * @module ng + * @param {string} name Filter name. + * @param {Function} filterFactory Factory function for creating new instance of filter. + * @description + * See {@link ng.$filterProvider#register $filterProvider.register()}. + */ + filter: invokeLater('$filterProvider', 'register'), + + /** + * @ngdoc method + * @name angular.Module#controller + * @module ng + * @param {string|Object} name Controller name, or an object map of controllers where the + * keys are the names and the values are the constructors. + * @param {Function} constructor Controller constructor function. + * @description + * See {@link ng.$controllerProvider#register $controllerProvider.register()}. + */ + controller: invokeLater('$controllerProvider', 'register'), + + /** + * @ngdoc method + * @name angular.Module#directive + * @module ng + * @param {string|Object} name Directive name, or an object map of directives where the + * keys are the names and the values are the factories. + * @param {Function} directiveFactory Factory function for creating new instance of + * directives. + * @description + * See {@link ng.$compileProvider#directive $compileProvider.directive()}. + */ + directive: invokeLater('$compileProvider', 'directive'), + + /** + * @ngdoc method + * @name angular.Module#config + * @module ng + * @param {Function} configFn Execute this function on module load. Useful for service + * configuration. + * @description + * Use this method to register work which needs to be performed on module loading. + * For more about how to configure services, see + * {@link providers#providers_provider-recipe Provider Recipe}. + */ + config: config, + + /** + * @ngdoc method + * @name angular.Module#run + * @module ng + * @param {Function} initializationFn Execute this function after injector creation. + * Useful for application initialization. + * @description + * Use this method to register work which should be performed when the injector is done + * loading all modules. + */ + run: function(block) { + runBlocks.push(block); + return this; + } + }; + + if (configFn) { + config(configFn); + } + + return moduleInstance; + + /** + * @param {string} provider + * @param {string} method + * @param {String=} insertMethod + * @returns {angular.Module} + */ + function invokeLater(provider, method, insertMethod, queue) { + if (!queue) queue = invokeQueue; + return function() { + queue[insertMethod || 'push']([provider, method, arguments]); + return moduleInstance; + }; + } + }); + }; + }); + +} + +setupModuleLoader(window); +})(window); + +/** + * Closure compiler type information + * + * @typedef { { + * requires: !Array., + * invokeQueue: !Array.>, + * + * service: function(string, Function):angular.Module, + * factory: function(string, Function):angular.Module, + * value: function(string, *):angular.Module, + * + * filter: function(string, Function):angular.Module, + * + * init: function(Function):angular.Module + * } } + */ +angular.Module; + diff --git a/1.3.0-rc.2/angular-loader.min.js b/1.3.0-rc.2/angular-loader.min.js new file mode 100644 index 0000000000..3aa1b4823a --- /dev/null +++ b/1.3.0-rc.2/angular-loader.min.js @@ -0,0 +1,9 @@ +/* + AngularJS v1.3.0-rc.2 + (c) 2010-2014 Google, Inc. http://angularjs.org + License: MIT +*/ +(function(){'use strict';function d(b){return function(){var c=arguments[0],e;e="["+(b?b+":":"")+c+"] http://errors.angularjs.org/1.3.0-rc.2/"+(b?b+"/":"")+c;for(c=1;c + * + *
+ *
You did not enter a field
+ *
The value entered is too short
+ *
+ * + * ``` + * + * Now whatever key/value entries are present within the provided object (in this case `$error`) then + * the ngMessages directive will render the inner first ngMessage directive (depending if the key values + * match the attribute value present on each ngMessage directive). In other words, if your errors + * object contains the following data: + * + * ```javascript + * + * myField.$error = { minlength : true, required : false }; + * ``` + * + * Then the `required` message will be displayed first. When required is false then the `minlength` message + * will be displayed right after (since these messages are ordered this way in the template HTML code). + * The prioritization of each message is determined by what order they're present in the DOM. + * Therefore, instead of having custom JavaScript code determine the priority of what errors are + * present before others, the presentation of the errors are handled within the template. + * + * By default, ngMessages will only display one error at a time. However, if you wish to display all + * messages then the `ng-messages-multiple` attribute flag can be used on the element containing the + * ngMessages directive to make this happen. + * + * ```html + *
...
+ * ``` + * + * ## Reusing and Overriding Messages + * In addition to prioritization, ngMessages also allows for including messages from a remote or an inline + * template. This allows for generic collection of messages to be reused across multiple parts of an + * application. + * + * ```html + * + *
+ * ``` + * + * However, including generic messages may not be useful enough to match all input fields, therefore, + * `ngMessages` provides the ability to override messages defined in the remote template by redefining + * then within the directive container. + * + * ```html + * + * + * + *
+ * + * + *
+ * + *
You did not enter your email address
+ * + * + *
Your email address is invalid
+ *
+ *
+ * ``` + * + * In the example HTML code above the message that is set on required will override the corresponding + * required message defined within the remote template. Therefore, with particular input fields (such + * email addresses, date fields, autocomplete inputs, etc...), specialized error messages can be applied + * while more generic messages can be used to handle other, more general input errors. + * + * ## Animations + * If the `ngAnimate` module is active within the application then both the `ngMessages` and + * `ngMessage` directives will trigger animations whenever any messages are added and removed + * from the DOM by the `ngMessages` directive. + * + * Whenever the `ngMessages` directive contains one or more visible messages then the `.ng-active` CSS + * class will be added to the element. The `.ng-inactive` CSS class will be applied when there are no + * animations present. Therefore, CSS transitions and keyframes as well as JavaScript animations can + * hook into the animations whenever these classes are added/removed. + * + * Let's say that our HTML code for our messages container looks like so: + * + * ```html + *
+ *
...
+ *
...
+ *
+ * ``` + * + * Then the CSS animation code for the message container looks like so: + * + * ```css + * .my-messages { + * transition:1s linear all; + * } + * .my-messages.ng-active { + * // messages are visible + * } + * .my-messages.ng-inactive { + * // messages are hidden + * } + * ``` + * + * Whenever an inner message is attached (becomes visible) or removed (becomes hidden) then the enter + * and leave animation is triggered for each particular element bound to the `ngMessage` directive. + * + * Therefore, the CSS code for the inner messages looks like so: + * + * ```css + * .some-message { + * transition:1s linear all; + * } + * + * .some-message.ng-enter {} + * .some-message.ng-enter.ng-enter-active {} + * + * .some-message.ng-leave {} + * .some-message.ng-leave.ng-leave-active {} + * ``` + * + * {@link ngAnimate Click here} to learn how to use JavaScript animations or to learn more about ngAnimate. + */ +angular.module('ngMessages', []) + + /** + * @ngdoc directive + * @module ngMessages + * @name ngMessages + * @restrict AE + * + * @description + * `ngMessages` is a directive that is designed to show and hide messages based on the state + * of a key/value object that it listens on. The directive itself compliments error message + * reporting with the `ngModel` $error object (which stores a key/value state of validation errors). + * + * `ngMessages` manages the state of internal messages within its container element. The internal + * messages use the `ngMessage` directive and will be inserted/removed from the page depending + * on if they're present within the key/value object. By default, only one message will be displayed + * at a time and this depends on the prioritization of the messages within the template. (This can + * be changed by using the ng-messages-multiple on the directive container.) + * + * A remote template can also be used to promote message reuseability and messages can also be + * overridden. + * + * {@link module:ngMessages Click here} to learn more about `ngMessages` and `ngMessage`. + * + * @usage + * ```html + * + * + * ... + * ... + * ... + * + * + * + * + * ... + * ... + * ... + * + * ``` + * + * @param {string} ngMessages an angular expression evaluating to a key/value object + * (this is typically the $error object on an ngModel instance). + * @param {string=} ngMessagesMultiple|multiple when set, all messages will be displayed with true + * @param {string=} ngMessagesInclude|include when set, the specified template will be included into the ng-messages container + * + * @example + * + * + *
+ * + * + * + *
myForm.myName.$error = {{ myForm.myName.$error | json }}
+ * + *
+ *
You did not enter a field
+ *
Your field is too short
+ *
Your field is too long
+ *
+ *
+ *
+ * + * angular.module('ngMessagesExample', ['ngMessages']); + * + *
+ */ + .directive('ngMessages', ['$compile', '$animate', '$templateRequest', + function($compile, $animate, $templateRequest) { + var ACTIVE_CLASS = 'ng-active'; + var INACTIVE_CLASS = 'ng-inactive'; + + return { + restrict: 'AE', + controller: ['$scope', function($scope) { + this.$renderNgMessageClasses = angular.noop; + + var messages = []; + this.registerMessage = function(index, message) { + for(var i = 0; i < messages.length; i++) { + if(messages[i].type == message.type) { + if(index != i) { + var temp = messages[index]; + messages[index] = messages[i]; + if(index < messages.length) { + messages[i] = temp; + } else { + messages.splice(0, i); //remove the old one (and shift left) + } + } + return; + } + } + messages.splice(index, 0, message); //add the new one (and shift right) + }; + + this.renderMessages = function(values, multiple) { + values = values || {}; + + var found; + angular.forEach(messages, function(message) { + if((!found || multiple) && truthyVal(values[message.type])) { + message.attach(); + found = true; + } else { + message.detach(); + } + }); + + this.renderElementClasses(found); + + function truthyVal(value) { + return value !== null && value !== false && value; + } + }; + }], + require: 'ngMessages', + link: function($scope, element, $attrs, ctrl) { + ctrl.renderElementClasses = function(bool) { + bool ? $animate.setClass(element, ACTIVE_CLASS, INACTIVE_CLASS) + : $animate.setClass(element, INACTIVE_CLASS, ACTIVE_CLASS); + }; + + //JavaScript treats empty strings as false, but ng-message-multiple by itself is an empty string + var multiple = angular.isString($attrs.ngMessagesMultiple) || + angular.isString($attrs.multiple); + + var cachedValues, watchAttr = $attrs.ngMessages || $attrs['for']; //for is a reserved keyword + $scope.$watchCollection(watchAttr, function(values) { + cachedValues = values; + ctrl.renderMessages(values, multiple); + }); + + var tpl = $attrs.ngMessagesInclude || $attrs.include; + if(tpl) { + $templateRequest(tpl) + .then(function processTemplate(html) { + var after, container = angular.element('
').html(html); + angular.forEach(container.children(), function(elm) { + elm = angular.element(elm); + after ? after.after(elm) + : element.prepend(elm); //start of the container + after = elm; + $compile(elm)($scope); + }); + ctrl.renderMessages(cachedValues, multiple); + }); + } + } + }; + }]) + + + /** + * @ngdoc directive + * @name ngMessage + * @restrict AE + * @scope + * + * @description + * `ngMessage` is a directive with the purpose to show and hide a particular message. + * For `ngMessage` to operate, a parent `ngMessages` directive on a parent DOM element + * must be situated since it determines which messages are visible based on the state + * of the provided key/value map that `ngMessages` listens on. + * + * @usage + * ```html + * + * + * ... + * ... + * ... + * + * + * + * + * ... + * ... + * ... + * + * ``` + * + * {@link module:ngMessages Click here} to learn more about `ngMessages` and `ngMessage`. + * + * @param {string} ngMessage a string value corresponding to the message key. + */ + .directive('ngMessage', ['$animate', function($animate) { + var COMMENT_NODE = 8; + return { + require: '^ngMessages', + transclude: 'element', + terminal: true, + restrict: 'AE', + link: function($scope, $element, $attrs, ngMessages, $transclude) { + var index, element; + + var commentNode = $element[0]; + var parentNode = commentNode.parentNode; + for(var i = 0, j = 0; i < parentNode.childNodes.length; i++) { + var node = parentNode.childNodes[i]; + if(node.nodeType == COMMENT_NODE && node.nodeValue.indexOf('ngMessage') >= 0) { + if(node === commentNode) { + index = j; + break; + } + j++; + } + } + + ngMessages.registerMessage(index, { + type : $attrs.ngMessage || $attrs.when, + attach : function() { + if(!element) { + $transclude($scope, function(clone) { + $animate.enter(clone, null, $element); + element = clone; + }); + } + }, + detach : function(now) { + if(element) { + $animate.leave(element); + element = null; + } + } + }); + } + }; + }]); + + +})(window, window.angular); diff --git a/1.3.0-rc.2/angular-messages.min.js b/1.3.0-rc.2/angular-messages.min.js new file mode 100644 index 0000000000..c5c8cec180 --- /dev/null +++ b/1.3.0-rc.2/angular-messages.min.js @@ -0,0 +1,10 @@ +/* + AngularJS v1.3.0-rc.2 + (c) 2010-2014 Google, Inc. http://angularjs.org + License: MIT +*/ +(function(r,d,s){'use strict';d.module("ngMessages",[]).directive("ngMessages",["$compile","$animate","$templateRequest",function(q,l,m){return{restrict:"AE",controller:["$scope",function(k){this.$renderNgMessageClasses=d.noop;var b=[];this.registerMessage=function(a,e){for(var c=0;c").html(a);d.forEach(a.children(), +function(a){a=d.element(a);h?h.after(a):b.prepend(a);h=a;q(a)(k)});e.renderMessages(g,c)})}}}]).directive("ngMessage",["$animate",function(d){return{require:"^ngMessages",transclude:"element",terminal:!0,restrict:"AE",link:function(l,m,k,b,a){for(var e,c,g=m[0],f=g.parentNode,h=0,p=0;h 0 && iteration >= count) { + var fnIndex; + deferred.resolve(iteration); + + angular.forEach(repeatFns, function(fn, index) { + if (fn.id === promise.$$intervalId) fnIndex = index; + }); + + if (fnIndex !== undefined) { + repeatFns.splice(fnIndex, 1); + } + } + + if (!skipApply) $rootScope.$apply(); + } + + repeatFns.push({ + nextTime:(now + delay), + delay: delay, + fn: tick, + id: nextRepeatId, + deferred: deferred + }); + repeatFns.sort(function(a,b){ return a.nextTime - b.nextTime;}); + + nextRepeatId++; + return promise; + }; + /** + * @ngdoc method + * @name $interval#cancel + * + * @description + * Cancels a task associated with the `promise`. + * + * @param {promise} promise A promise from calling the `$interval` function. + * @returns {boolean} Returns `true` if the task was successfully cancelled. + */ + $interval.cancel = function(promise) { + if(!promise) return false; + var fnIndex; + + angular.forEach(repeatFns, function(fn, index) { + if (fn.id === promise.$$intervalId) fnIndex = index; + }); + + if (fnIndex !== undefined) { + repeatFns[fnIndex].deferred.reject('canceled'); + repeatFns.splice(fnIndex, 1); + return true; + } + + return false; + }; + + /** + * @ngdoc method + * @name $interval#flush + * @description + * + * Runs interval tasks scheduled to be run in the next `millis` milliseconds. + * + * @param {number=} millis maximum timeout amount to flush up until. + * + * @return {number} The amount of time moved forward. + */ + $interval.flush = function(millis) { + now += millis; + while (repeatFns.length && repeatFns[0].nextTime <= now) { + var task = repeatFns[0]; + task.fn(); + task.nextTime += task.delay; + repeatFns.sort(function(a,b){ return a.nextTime - b.nextTime;}); + } + return millis; + }; + + return $interval; + }]; +}; + + +/* jshint -W101 */ +/* The R_ISO8061_STR regex is never going to fit into the 100 char limit! + * This directive should go inside the anonymous function but a bug in JSHint means that it would + * not be enacted early enough to prevent the warning. + */ +var R_ISO8061_STR = /^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?:\:?(\d\d)(?:\:?(\d\d)(?:\.(\d{3}))?)?)?(Z|([+-])(\d\d):?(\d\d)))?$/; + +function jsonStringToDate(string) { + var match; + if (match = string.match(R_ISO8061_STR)) { + var date = new Date(0), + tzHour = 0, + tzMin = 0; + if (match[9]) { + tzHour = int(match[9] + match[10]); + tzMin = int(match[9] + match[11]); + } + date.setUTCFullYear(int(match[1]), int(match[2]) - 1, int(match[3])); + date.setUTCHours(int(match[4]||0) - tzHour, + int(match[5]||0) - tzMin, + int(match[6]||0), + int(match[7]||0)); + return date; + } + return string; +} + +function int(str) { + return parseInt(str, 10); +} + +function padNumber(num, digits, trim) { + var neg = ''; + if (num < 0) { + neg = '-'; + num = -num; + } + num = '' + num; + while(num.length < digits) num = '0' + num; + if (trim) + num = num.substr(num.length - digits); + return neg + num; +} + + +/** + * @ngdoc type + * @name angular.mock.TzDate + * @description + * + * *NOTE*: this is not an injectable instance, just a globally available mock class of `Date`. + * + * Mock of the Date type which has its timezone specified via constructor arg. + * + * The main purpose is to create Date-like instances with timezone fixed to the specified timezone + * offset, so that we can test code that depends on local timezone settings without dependency on + * the time zone settings of the machine where the code is running. + * + * @param {number} offset Offset of the *desired* timezone in hours (fractions will be honored) + * @param {(number|string)} timestamp Timestamp representing the desired time in *UTC* + * + * @example + * !!!! WARNING !!!!! + * This is not a complete Date object so only methods that were implemented can be called safely. + * To make matters worse, TzDate instances inherit stuff from Date via a prototype. + * + * We do our best to intercept calls to "unimplemented" methods, but since the list of methods is + * incomplete we might be missing some non-standard methods. This can result in errors like: + * "Date.prototype.foo called on incompatible Object". + * + * ```js + * var newYearInBratislava = new TzDate(-1, '2009-12-31T23:00:00Z'); + * newYearInBratislava.getTimezoneOffset() => -60; + * newYearInBratislava.getFullYear() => 2010; + * newYearInBratislava.getMonth() => 0; + * newYearInBratislava.getDate() => 1; + * newYearInBratislava.getHours() => 0; + * newYearInBratislava.getMinutes() => 0; + * newYearInBratislava.getSeconds() => 0; + * ``` + * + */ +angular.mock.TzDate = function (offset, timestamp) { + var self = new Date(0); + if (angular.isString(timestamp)) { + var tsStr = timestamp; + + self.origDate = jsonStringToDate(timestamp); + + timestamp = self.origDate.getTime(); + if (isNaN(timestamp)) + throw { + name: "Illegal Argument", + message: "Arg '" + tsStr + "' passed into TzDate constructor is not a valid date string" + }; + } else { + self.origDate = new Date(timestamp); + } + + var localOffset = new Date(timestamp).getTimezoneOffset(); + self.offsetDiff = localOffset*60*1000 - offset*1000*60*60; + self.date = new Date(timestamp + self.offsetDiff); + + self.getTime = function() { + return self.date.getTime() - self.offsetDiff; + }; + + self.toLocaleDateString = function() { + return self.date.toLocaleDateString(); + }; + + self.getFullYear = function() { + return self.date.getFullYear(); + }; + + self.getMonth = function() { + return self.date.getMonth(); + }; + + self.getDate = function() { + return self.date.getDate(); + }; + + self.getHours = function() { + return self.date.getHours(); + }; + + self.getMinutes = function() { + return self.date.getMinutes(); + }; + + self.getSeconds = function() { + return self.date.getSeconds(); + }; + + self.getMilliseconds = function() { + return self.date.getMilliseconds(); + }; + + self.getTimezoneOffset = function() { + return offset * 60; + }; + + self.getUTCFullYear = function() { + return self.origDate.getUTCFullYear(); + }; + + self.getUTCMonth = function() { + return self.origDate.getUTCMonth(); + }; + + self.getUTCDate = function() { + return self.origDate.getUTCDate(); + }; + + self.getUTCHours = function() { + return self.origDate.getUTCHours(); + }; + + self.getUTCMinutes = function() { + return self.origDate.getUTCMinutes(); + }; + + self.getUTCSeconds = function() { + return self.origDate.getUTCSeconds(); + }; + + self.getUTCMilliseconds = function() { + return self.origDate.getUTCMilliseconds(); + }; + + self.getDay = function() { + return self.date.getDay(); + }; + + // provide this method only on browsers that already have it + if (self.toISOString) { + self.toISOString = function() { + return padNumber(self.origDate.getUTCFullYear(), 4) + '-' + + padNumber(self.origDate.getUTCMonth() + 1, 2) + '-' + + padNumber(self.origDate.getUTCDate(), 2) + 'T' + + padNumber(self.origDate.getUTCHours(), 2) + ':' + + padNumber(self.origDate.getUTCMinutes(), 2) + ':' + + padNumber(self.origDate.getUTCSeconds(), 2) + '.' + + padNumber(self.origDate.getUTCMilliseconds(), 3) + 'Z'; + }; + } + + //hide all methods not implemented in this mock that the Date prototype exposes + var unimplementedMethods = ['getUTCDay', + 'getYear', 'setDate', 'setFullYear', 'setHours', 'setMilliseconds', + 'setMinutes', 'setMonth', 'setSeconds', 'setTime', 'setUTCDate', 'setUTCFullYear', + 'setUTCHours', 'setUTCMilliseconds', 'setUTCMinutes', 'setUTCMonth', 'setUTCSeconds', + 'setYear', 'toDateString', 'toGMTString', 'toJSON', 'toLocaleFormat', 'toLocaleString', + 'toLocaleTimeString', 'toSource', 'toString', 'toTimeString', 'toUTCString', 'valueOf']; + + angular.forEach(unimplementedMethods, function(methodName) { + self[methodName] = function() { + throw new Error("Method '" + methodName + "' is not implemented in the TzDate mock"); + }; + }); + + return self; +}; + +//make "tzDateInstance instanceof Date" return true +angular.mock.TzDate.prototype = Date.prototype; +/* jshint +W101 */ + +angular.mock.animate = angular.module('ngAnimateMock', ['ng']) + + .config(['$provide', function($provide) { + + var reflowQueue = []; + $provide.value('$$animateReflow', function(fn) { + var index = reflowQueue.length; + reflowQueue.push(fn); + return function cancel() { + reflowQueue.splice(index, 1); + }; + }); + + $provide.decorator('$animate', ['$delegate', '$$asyncCallback', '$timeout', '$browser', + function($delegate, $$asyncCallback, $timeout, $browser) { + var animate = { + queue : [], + cancel : $delegate.cancel, + enabled : $delegate.enabled, + triggerCallbackEvents : function() { + $$asyncCallback.flush(); + }, + triggerCallbackPromise : function() { + $timeout.flush(0); + }, + triggerCallbacks : function() { + this.triggerCallbackEvents(); + this.triggerCallbackPromise(); + }, + triggerReflow : function() { + angular.forEach(reflowQueue, function(fn) { + fn(); + }); + reflowQueue = []; + } + }; + + angular.forEach( + ['enter','leave','move','addClass','removeClass','setClass'], function(method) { + animate[method] = function() { + animate.queue.push({ + event : method, + element : arguments[0], + args : arguments + }); + return $delegate[method].apply($delegate, arguments); + }; + }); + + return animate; + }]); + + }]); + + +/** + * @ngdoc function + * @name angular.mock.dump + * @description + * + * *NOTE*: this is not an injectable instance, just a globally available function. + * + * Method for serializing common angular objects (scope, elements, etc..) into strings, useful for + * debugging. + * + * This method is also available on window, where it can be used to display objects on debug + * console. + * + * @param {*} object - any object to turn into string. + * @return {string} a serialized string of the argument + */ +angular.mock.dump = function(object) { + return serialize(object); + + function serialize(object) { + var out; + + if (angular.isElement(object)) { + object = angular.element(object); + out = angular.element('
'); + angular.forEach(object, function(element) { + out.append(angular.element(element).clone()); + }); + out = out.html(); + } else if (angular.isArray(object)) { + out = []; + angular.forEach(object, function(o) { + out.push(serialize(o)); + }); + out = '[ ' + out.join(', ') + ' ]'; + } else if (angular.isObject(object)) { + if (angular.isFunction(object.$eval) && angular.isFunction(object.$apply)) { + out = serializeScope(object); + } else if (object instanceof Error) { + out = object.stack || ('' + object.name + ': ' + object.message); + } else { + // TODO(i): this prevents methods being logged, + // we should have a better way to serialize objects + out = angular.toJson(object, true); + } + } else { + out = String(object); + } + + return out; + } + + function serializeScope(scope, offset) { + offset = offset || ' '; + var log = [offset + 'Scope(' + scope.$id + '): {']; + for ( var key in scope ) { + if (Object.prototype.hasOwnProperty.call(scope, key) && !key.match(/^(\$|this)/)) { + log.push(' ' + key + ': ' + angular.toJson(scope[key])); + } + } + var child = scope.$$childHead; + while(child) { + log.push(serializeScope(child, offset + ' ')); + child = child.$$nextSibling; + } + log.push('}'); + return log.join('\n' + offset); + } +}; + +/** + * @ngdoc service + * @name $httpBackend + * @description + * Fake HTTP backend implementation suitable for unit testing applications that use the + * {@link ng.$http $http service}. + * + * *Note*: For fake HTTP backend implementation suitable for end-to-end testing or backend-less + * development please see {@link ngMockE2E.$httpBackend e2e $httpBackend mock}. + * + * During unit testing, we want our unit tests to run quickly and have no external dependencies so + * we don’t want to send [XHR](https://developer.mozilla.org/en/xmlhttprequest) or + * [JSONP](http://en.wikipedia.org/wiki/JSONP) requests to a real server. All we really need is + * to verify whether a certain request has been sent or not, or alternatively just let the + * application make requests, respond with pre-trained responses and assert that the end result is + * what we expect it to be. + * + * This mock implementation can be used to respond with static or dynamic responses via the + * `expect` and `when` apis and their shortcuts (`expectGET`, `whenPOST`, etc). + * + * When an Angular application needs some data from a server, it calls the $http service, which + * sends the request to a real server using $httpBackend service. With dependency injection, it is + * easy to inject $httpBackend mock (which has the same API as $httpBackend) and use it to verify + * the requests and respond with some testing data without sending a request to a real server. + * + * There are two ways to specify what test data should be returned as http responses by the mock + * backend when the code under test makes http requests: + * + * - `$httpBackend.expect` - specifies a request expectation + * - `$httpBackend.when` - specifies a backend definition + * + * + * # Request Expectations vs Backend Definitions + * + * Request expectations provide a way to make assertions about requests made by the application and + * to define responses for those requests. The test will fail if the expected requests are not made + * or they are made in the wrong order. + * + * Backend definitions allow you to define a fake backend for your application which doesn't assert + * if a particular request was made or not, it just returns a trained response if a request is made. + * The test will pass whether or not the request gets made during testing. + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Request expectationsBackend definitions
Syntax.expect(...).respond(...).when(...).respond(...)
Typical usagestrict unit testsloose (black-box) unit testing
Fulfills multiple requestsNOYES
Order of requests mattersYESNO
Request requiredYESNO
Response requiredoptional (see below)YES
+ * + * In cases where both backend definitions and request expectations are specified during unit + * testing, the request expectations are evaluated first. + * + * If a request expectation has no response specified, the algorithm will search your backend + * definitions for an appropriate response. + * + * If a request didn't match any expectation or if the expectation doesn't have the response + * defined, the backend definitions are evaluated in sequential order to see if any of them match + * the request. The response from the first matched definition is returned. + * + * + * # Flushing HTTP requests + * + * The $httpBackend used in production always responds to requests asynchronously. If we preserved + * this behavior in unit testing, we'd have to create async unit tests, which are hard to write, + * to follow and to maintain. But neither can the testing mock respond synchronously; that would + * change the execution of the code under test. For this reason, the mock $httpBackend has a + * `flush()` method, which allows the test to explicitly flush pending requests. This preserves + * the async api of the backend, while allowing the test to execute synchronously. + * + * + * # Unit testing with mock $httpBackend + * The following code shows how to setup and use the mock backend when unit testing a controller. + * First we create the controller under test: + * + ```js + // The controller code + function MyController($scope, $http) { + var authToken; + + $http.get('/auth.py').success(function(data, status, headers) { + authToken = headers('A-Token'); + $scope.user = data; + }); + + $scope.saveMessage = function(message) { + var headers = { 'Authorization': authToken }; + $scope.status = 'Saving...'; + + $http.post('/add-msg.py', message, { headers: headers } ).success(function(response) { + $scope.status = ''; + }).error(function() { + $scope.status = 'ERROR!'; + }); + }; + } + ``` + * + * Now we setup the mock backend and create the test specs: + * + ```js + // testing controller + describe('MyController', function() { + var $httpBackend, $rootScope, createController, authRequestHandler; + + beforeEach(inject(function($injector) { + // Set up the mock http service responses + $httpBackend = $injector.get('$httpBackend'); + // backend definition common for all tests + authRequestHandler = $httpBackend.when('GET', '/auth.py') + .respond({userId: 'userX'}, {'A-Token': 'xxx'}); + + // Get hold of a scope (i.e. the root scope) + $rootScope = $injector.get('$rootScope'); + // The $controller service is used to create instances of controllers + var $controller = $injector.get('$controller'); + + createController = function() { + return $controller('MyController', {'$scope' : $rootScope }); + }; + })); + + + afterEach(function() { + $httpBackend.verifyNoOutstandingExpectation(); + $httpBackend.verifyNoOutstandingRequest(); + }); + + + it('should fetch authentication token', function() { + $httpBackend.expectGET('/auth.py'); + var controller = createController(); + $httpBackend.flush(); + }); + + + it('should fail authentication', function() { + + // Notice how you can change the response even after it was set + authRequestHandler.respond(401, ''); + + $httpBackend.expectGET('/auth.py'); + var controller = createController(); + $httpBackend.flush(); + expect($rootScope.status).toBe('Failed...'); + }); + + + it('should send msg to server', function() { + var controller = createController(); + $httpBackend.flush(); + + // now you don’t care about the authentication, but + // the controller will still send the request and + // $httpBackend will respond without you having to + // specify the expectation and response for this request + + $httpBackend.expectPOST('/add-msg.py', 'message content').respond(201, ''); + $rootScope.saveMessage('message content'); + expect($rootScope.status).toBe('Saving...'); + $httpBackend.flush(); + expect($rootScope.status).toBe(''); + }); + + + it('should send auth header', function() { + var controller = createController(); + $httpBackend.flush(); + + $httpBackend.expectPOST('/add-msg.py', undefined, function(headers) { + // check if the header was send, if it wasn't the expectation won't + // match the request and the test will fail + return headers['Authorization'] == 'xxx'; + }).respond(201, ''); + + $rootScope.saveMessage('whatever'); + $httpBackend.flush(); + }); + }); + ``` + */ +angular.mock.$HttpBackendProvider = function() { + this.$get = ['$rootScope', createHttpBackendMock]; +}; + +/** + * General factory function for $httpBackend mock. + * Returns instance for unit testing (when no arguments specified): + * - passing through is disabled + * - auto flushing is disabled + * + * Returns instance for e2e testing (when `$delegate` and `$browser` specified): + * - passing through (delegating request to real backend) is enabled + * - auto flushing is enabled + * + * @param {Object=} $delegate Real $httpBackend instance (allow passing through if specified) + * @param {Object=} $browser Auto-flushing enabled if specified + * @return {Object} Instance of $httpBackend mock + */ +function createHttpBackendMock($rootScope, $delegate, $browser) { + var definitions = [], + expectations = [], + responses = [], + responsesPush = angular.bind(responses, responses.push), + copy = angular.copy; + + function createResponse(status, data, headers, statusText) { + if (angular.isFunction(status)) return status; + + return function() { + return angular.isNumber(status) + ? [status, data, headers, statusText] + : [200, status, data]; + }; + } + + // TODO(vojta): change params to: method, url, data, headers, callback + function $httpBackend(method, url, data, callback, headers, timeout, withCredentials) { + var xhr = new MockXhr(), + expectation = expectations[0], + wasExpected = false; + + function prettyPrint(data) { + return (angular.isString(data) || angular.isFunction(data) || data instanceof RegExp) + ? data + : angular.toJson(data); + } + + function wrapResponse(wrapped) { + if (!$browser && timeout && timeout.then) timeout.then(handleTimeout); + + return handleResponse; + + function handleResponse() { + var response = wrapped.response(method, url, data, headers); + xhr.$$respHeaders = response[2]; + callback(copy(response[0]), copy(response[1]), xhr.getAllResponseHeaders(), + copy(response[3] || '')); + } + + function handleTimeout() { + for (var i = 0, ii = responses.length; i < ii; i++) { + if (responses[i] === handleResponse) { + responses.splice(i, 1); + callback(-1, undefined, ''); + break; + } + } + } + } + + if (expectation && expectation.match(method, url)) { + if (!expectation.matchData(data)) + throw new Error('Expected ' + expectation + ' with different data\n' + + 'EXPECTED: ' + prettyPrint(expectation.data) + '\nGOT: ' + data); + + if (!expectation.matchHeaders(headers)) + throw new Error('Expected ' + expectation + ' with different headers\n' + + 'EXPECTED: ' + prettyPrint(expectation.headers) + '\nGOT: ' + + prettyPrint(headers)); + + expectations.shift(); + + if (expectation.response) { + responses.push(wrapResponse(expectation)); + return; + } + wasExpected = true; + } + + var i = -1, definition; + while ((definition = definitions[++i])) { + if (definition.match(method, url, data, headers || {})) { + if (definition.response) { + // if $browser specified, we do auto flush all requests + ($browser ? $browser.defer : responsesPush)(wrapResponse(definition)); + } else if (definition.passThrough) { + $delegate(method, url, data, callback, headers, timeout, withCredentials); + } else throw new Error('No response defined !'); + return; + } + } + throw wasExpected ? + new Error('No response defined !') : + new Error('Unexpected request: ' + method + ' ' + url + '\n' + + (expectation ? 'Expected ' + expectation : 'No more request expected')); + } + + /** + * @ngdoc method + * @name $httpBackend#when + * @description + * Creates a new backend definition. + * + * @param {string} method HTTP method. + * @param {string|RegExp|function(string)} url HTTP url or function that receives the url + * and returns true if the url match the current definition. + * @param {(string|RegExp|function(string))=} data HTTP request body or function that receives + * data string and returns true if the data is as expected. + * @param {(Object|function(Object))=} headers HTTP headers or function that receives http header + * object and returns true if the headers match the current definition. + * @returns {requestHandler} Returns an object with `respond` method that controls how a matched + * request is handled. You can save this object for later use and invoke `respond` again in + * order to change how a matched request is handled. + * + * - respond – + * `{function([status,] data[, headers, statusText]) + * | function(function(method, url, data, headers)}` + * – The respond method takes a set of static data to be returned or a function that can + * return an array containing response status (number), response data (string), response + * headers (Object), and the text for the status (string). The respond method returns the + * `requestHandler` object for possible overrides. + */ + $httpBackend.when = function(method, url, data, headers) { + var definition = new MockHttpExpectation(method, url, data, headers), + chain = { + respond: function(status, data, headers, statusText) { + definition.passThrough = undefined; + definition.response = createResponse(status, data, headers, statusText); + return chain; + } + }; + + if ($browser) { + chain.passThrough = function() { + definition.response = undefined; + definition.passThrough = true; + return chain; + }; + } + + definitions.push(definition); + return chain; + }; + + /** + * @ngdoc method + * @name $httpBackend#whenGET + * @description + * Creates a new backend definition for GET requests. For more info see `when()`. + * + * @param {string|RegExp|function(string)} url HTTP url or function that receives the url + * and returns true if the url match the current definition. + * @param {(Object|function(Object))=} headers HTTP headers. + * @returns {requestHandler} Returns an object with `respond` method that control how a matched + * request is handled. You can save this object for later use and invoke `respond` again in + * order to change how a matched request is handled. + */ + + /** + * @ngdoc method + * @name $httpBackend#whenHEAD + * @description + * Creates a new backend definition for HEAD requests. For more info see `when()`. + * + * @param {string|RegExp|function(string)} url HTTP url or function that receives the url + * and returns true if the url match the current definition. + * @param {(Object|function(Object))=} headers HTTP headers. + * @returns {requestHandler} Returns an object with `respond` method that control how a matched + * request is handled. You can save this object for later use and invoke `respond` again in + * order to change how a matched request is handled. + */ + + /** + * @ngdoc method + * @name $httpBackend#whenDELETE + * @description + * Creates a new backend definition for DELETE requests. For more info see `when()`. + * + * @param {string|RegExp|function(string)} url HTTP url or function that receives the url + * and returns true if the url match the current definition. + * @param {(Object|function(Object))=} headers HTTP headers. + * @returns {requestHandler} Returns an object with `respond` method that control how a matched + * request is handled. You can save this object for later use and invoke `respond` again in + * order to change how a matched request is handled. + */ + + /** + * @ngdoc method + * @name $httpBackend#whenPOST + * @description + * Creates a new backend definition for POST requests. For more info see `when()`. + * + * @param {string|RegExp|function(string)} url HTTP url or function that receives the url + * and returns true if the url match the current definition. + * @param {(string|RegExp|function(string))=} data HTTP request body or function that receives + * data string and returns true if the data is as expected. + * @param {(Object|function(Object))=} headers HTTP headers. + * @returns {requestHandler} Returns an object with `respond` method that control how a matched + * request is handled. You can save this object for later use and invoke `respond` again in + * order to change how a matched request is handled. + */ + + /** + * @ngdoc method + * @name $httpBackend#whenPUT + * @description + * Creates a new backend definition for PUT requests. For more info see `when()`. + * + * @param {string|RegExp|function(string)} url HTTP url or function that receives the url + * and returns true if the url match the current definition. + * @param {(string|RegExp|function(string))=} data HTTP request body or function that receives + * data string and returns true if the data is as expected. + * @param {(Object|function(Object))=} headers HTTP headers. + * @returns {requestHandler} Returns an object with `respond` method that control how a matched + * request is handled. You can save this object for later use and invoke `respond` again in + * order to change how a matched request is handled. + */ + + /** + * @ngdoc method + * @name $httpBackend#whenJSONP + * @description + * Creates a new backend definition for JSONP requests. For more info see `when()`. + * + * @param {string|RegExp|function(string)} url HTTP url or function that receives the url + * and returns true if the url match the current definition. + * @returns {requestHandler} Returns an object with `respond` method that control how a matched + * request is handled. You can save this object for later use and invoke `respond` again in + * order to change how a matched request is handled. + */ + createShortMethods('when'); + + + /** + * @ngdoc method + * @name $httpBackend#expect + * @description + * Creates a new request expectation. + * + * @param {string} method HTTP method. + * @param {string|RegExp|function(string)} url HTTP url or function that receives the url + * and returns true if the url match the current definition. + * @param {(string|RegExp|function(string)|Object)=} data HTTP request body or function that + * receives data string and returns true if the data is as expected, or Object if request body + * is in JSON format. + * @param {(Object|function(Object))=} headers HTTP headers or function that receives http header + * object and returns true if the headers match the current expectation. + * @returns {requestHandler} Returns an object with `respond` method that control how a matched + * request is handled. You can save this object for later use and invoke `respond` again in + * order to change how a matched request is handled. + * + * - respond – + * `{function([status,] data[, headers, statusText]) + * | function(function(method, url, data, headers)}` + * – The respond method takes a set of static data to be returned or a function that can + * return an array containing response status (number), response data (string), response + * headers (Object), and the text for the status (string). The respond method returns the + * `requestHandler` object for possible overrides. + */ + $httpBackend.expect = function(method, url, data, headers) { + var expectation = new MockHttpExpectation(method, url, data, headers), + chain = { + respond: function (status, data, headers, statusText) { + expectation.response = createResponse(status, data, headers, statusText); + return chain; + } + }; + + expectations.push(expectation); + return chain; + }; + + + /** + * @ngdoc method + * @name $httpBackend#expectGET + * @description + * Creates a new request expectation for GET requests. For more info see `expect()`. + * + * @param {string|RegExp|function(string)} url HTTP url or function that receives the url + * and returns true if the url match the current definition. + * @param {Object=} headers HTTP headers. + * @returns {requestHandler} Returns an object with `respond` method that control how a matched + * request is handled. You can save this object for later use and invoke `respond` again in + * order to change how a matched request is handled. See #expect for more info. + */ + + /** + * @ngdoc method + * @name $httpBackend#expectHEAD + * @description + * Creates a new request expectation for HEAD requests. For more info see `expect()`. + * + * @param {string|RegExp|function(string)} url HTTP url or function that receives the url + * and returns true if the url match the current definition. + * @param {Object=} headers HTTP headers. + * @returns {requestHandler} Returns an object with `respond` method that control how a matched + * request is handled. You can save this object for later use and invoke `respond` again in + * order to change how a matched request is handled. + */ + + /** + * @ngdoc method + * @name $httpBackend#expectDELETE + * @description + * Creates a new request expectation for DELETE requests. For more info see `expect()`. + * + * @param {string|RegExp|function(string)} url HTTP url or function that receives the url + * and returns true if the url match the current definition. + * @param {Object=} headers HTTP headers. + * @returns {requestHandler} Returns an object with `respond` method that control how a matched + * request is handled. You can save this object for later use and invoke `respond` again in + * order to change how a matched request is handled. + */ + + /** + * @ngdoc method + * @name $httpBackend#expectPOST + * @description + * Creates a new request expectation for POST requests. For more info see `expect()`. + * + * @param {string|RegExp|function(string)} url HTTP url or function that receives the url + * and returns true if the url match the current definition. + * @param {(string|RegExp|function(string)|Object)=} data HTTP request body or function that + * receives data string and returns true if the data is as expected, or Object if request body + * is in JSON format. + * @param {Object=} headers HTTP headers. + * @returns {requestHandler} Returns an object with `respond` method that control how a matched + * request is handled. You can save this object for later use and invoke `respond` again in + * order to change how a matched request is handled. + */ + + /** + * @ngdoc method + * @name $httpBackend#expectPUT + * @description + * Creates a new request expectation for PUT requests. For more info see `expect()`. + * + * @param {string|RegExp|function(string)} url HTTP url or function that receives the url + * and returns true if the url match the current definition. + * @param {(string|RegExp|function(string)|Object)=} data HTTP request body or function that + * receives data string and returns true if the data is as expected, or Object if request body + * is in JSON format. + * @param {Object=} headers HTTP headers. + * @returns {requestHandler} Returns an object with `respond` method that control how a matched + * request is handled. You can save this object for later use and invoke `respond` again in + * order to change how a matched request is handled. + */ + + /** + * @ngdoc method + * @name $httpBackend#expectPATCH + * @description + * Creates a new request expectation for PATCH requests. For more info see `expect()`. + * + * @param {string|RegExp|function(string)} url HTTP url or function that receives the url + * and returns true if the url match the current definition. + * @param {(string|RegExp|function(string)|Object)=} data HTTP request body or function that + * receives data string and returns true if the data is as expected, or Object if request body + * is in JSON format. + * @param {Object=} headers HTTP headers. + * @returns {requestHandler} Returns an object with `respond` method that control how a matched + * request is handled. You can save this object for later use and invoke `respond` again in + * order to change how a matched request is handled. + */ + + /** + * @ngdoc method + * @name $httpBackend#expectJSONP + * @description + * Creates a new request expectation for JSONP requests. For more info see `expect()`. + * + * @param {string|RegExp|function(string)} url HTTP url or function that receives the url + * and returns true if the url match the current definition. + * @returns {requestHandler} Returns an object with `respond` method that control how a matched + * request is handled. You can save this object for later use and invoke `respond` again in + * order to change how a matched request is handled. + */ + createShortMethods('expect'); + + + /** + * @ngdoc method + * @name $httpBackend#flush + * @description + * Flushes all pending requests using the trained responses. + * + * @param {number=} count Number of responses to flush (in the order they arrived). If undefined, + * all pending requests will be flushed. If there are no pending requests when the flush method + * is called an exception is thrown (as this typically a sign of programming error). + */ + $httpBackend.flush = function(count, digest) { + if (digest !== false) $rootScope.$digest(); + if (!responses.length) throw new Error('No pending request to flush !'); + + if (angular.isDefined(count) && count !== null) { + while (count--) { + if (!responses.length) throw new Error('No more pending request to flush !'); + responses.shift()(); + } + } else { + while (responses.length) { + responses.shift()(); + } + } + $httpBackend.verifyNoOutstandingExpectation(digest); + }; + + + /** + * @ngdoc method + * @name $httpBackend#verifyNoOutstandingExpectation + * @description + * Verifies that all of the requests defined via the `expect` api were made. If any of the + * requests were not made, verifyNoOutstandingExpectation throws an exception. + * + * Typically, you would call this method following each test case that asserts requests using an + * "afterEach" clause. + * + * ```js + * afterEach($httpBackend.verifyNoOutstandingExpectation); + * ``` + */ + $httpBackend.verifyNoOutstandingExpectation = function(digest) { + if (digest !== false) $rootScope.$digest(); + if (expectations.length) { + throw new Error('Unsatisfied requests: ' + expectations.join(', ')); + } + }; + + + /** + * @ngdoc method + * @name $httpBackend#verifyNoOutstandingRequest + * @description + * Verifies that there are no outstanding requests that need to be flushed. + * + * Typically, you would call this method following each test case that asserts requests using an + * "afterEach" clause. + * + * ```js + * afterEach($httpBackend.verifyNoOutstandingRequest); + * ``` + */ + $httpBackend.verifyNoOutstandingRequest = function() { + if (responses.length) { + throw new Error('Unflushed requests: ' + responses.length); + } + }; + + + /** + * @ngdoc method + * @name $httpBackend#resetExpectations + * @description + * Resets all request expectations, but preserves all backend definitions. Typically, you would + * call resetExpectations during a multiple-phase test when you want to reuse the same instance of + * $httpBackend mock. + */ + $httpBackend.resetExpectations = function() { + expectations.length = 0; + responses.length = 0; + }; + + return $httpBackend; + + + function createShortMethods(prefix) { + angular.forEach(['GET', 'DELETE', 'JSONP', 'HEAD'], function(method) { + $httpBackend[prefix + method] = function(url, headers) { + return $httpBackend[prefix](method, url, undefined, headers); + }; + }); + + angular.forEach(['PUT', 'POST', 'PATCH'], function(method) { + $httpBackend[prefix + method] = function(url, data, headers) { + return $httpBackend[prefix](method, url, data, headers); + }; + }); + } +} + +function MockHttpExpectation(method, url, data, headers) { + + this.data = data; + this.headers = headers; + + this.match = function(m, u, d, h) { + if (method != m) return false; + if (!this.matchUrl(u)) return false; + if (angular.isDefined(d) && !this.matchData(d)) return false; + if (angular.isDefined(h) && !this.matchHeaders(h)) return false; + return true; + }; + + this.matchUrl = function(u) { + if (!url) return true; + if (angular.isFunction(url.test)) return url.test(u); + if (angular.isFunction(url)) return url(u); + return url == u; + }; + + this.matchHeaders = function(h) { + if (angular.isUndefined(headers)) return true; + if (angular.isFunction(headers)) return headers(h); + return angular.equals(headers, h); + }; + + this.matchData = function(d) { + if (angular.isUndefined(data)) return true; + if (data && angular.isFunction(data.test)) return data.test(d); + if (data && angular.isFunction(data)) return data(d); + if (data && !angular.isString(data)) return angular.equals(data, angular.fromJson(d)); + return data == d; + }; + + this.toString = function() { + return method + ' ' + url; + }; +} + +function createMockXhr() { + return new MockXhr(); +} + +function MockXhr() { + + // hack for testing $http, $httpBackend + MockXhr.$$lastInstance = this; + + this.open = function(method, url, async) { + this.$$method = method; + this.$$url = url; + this.$$async = async; + this.$$reqHeaders = {}; + this.$$respHeaders = {}; + }; + + this.send = function(data) { + this.$$data = data; + }; + + this.setRequestHeader = function(key, value) { + this.$$reqHeaders[key] = value; + }; + + this.getResponseHeader = function(name) { + // the lookup must be case insensitive, + // that's why we try two quick lookups first and full scan last + var header = this.$$respHeaders[name]; + if (header) return header; + + name = angular.lowercase(name); + header = this.$$respHeaders[name]; + if (header) return header; + + header = undefined; + angular.forEach(this.$$respHeaders, function(headerVal, headerName) { + if (!header && angular.lowercase(headerName) == name) header = headerVal; + }); + return header; + }; + + this.getAllResponseHeaders = function() { + var lines = []; + + angular.forEach(this.$$respHeaders, function(value, key) { + lines.push(key + ': ' + value); + }); + return lines.join('\n'); + }; + + this.abort = angular.noop; +} + + +/** + * @ngdoc service + * @name $timeout + * @description + * + * This service is just a simple decorator for {@link ng.$timeout $timeout} service + * that adds a "flush" and "verifyNoPendingTasks" methods. + */ + +angular.mock.$TimeoutDecorator = ['$delegate', '$browser', function ($delegate, $browser) { + + /** + * @ngdoc method + * @name $timeout#flush + * @description + * + * Flushes the queue of pending tasks. + * + * @param {number=} delay maximum timeout amount to flush up until + */ + $delegate.flush = function(delay) { + $browser.defer.flush(delay); + }; + + /** + * @ngdoc method + * @name $timeout#verifyNoPendingTasks + * @description + * + * Verifies that there are no pending tasks that need to be flushed. + */ + $delegate.verifyNoPendingTasks = function() { + if ($browser.deferredFns.length) { + throw new Error('Deferred tasks to flush (' + $browser.deferredFns.length + '): ' + + formatPendingTasksAsString($browser.deferredFns)); + } + }; + + function formatPendingTasksAsString(tasks) { + var result = []; + angular.forEach(tasks, function(task) { + result.push('{id: ' + task.id + ', ' + 'time: ' + task.time + '}'); + }); + + return result.join(', '); + } + + return $delegate; +}]; + +angular.mock.$RAFDecorator = ['$delegate', function($delegate) { + var queue = []; + var rafFn = function(fn) { + var index = queue.length; + queue.push(fn); + return function() { + queue.splice(index, 1); + }; + }; + + rafFn.supported = $delegate.supported; + + rafFn.flush = function() { + if(queue.length === 0) { + throw new Error('No rAF callbacks present'); + } + + var length = queue.length; + for(var i=0;i
'); + }; +}; + +/** + * @ngdoc module + * @name ngMock + * @packageName angular-mocks + * @description + * + * # ngMock + * + * The `ngMock` module provides support to inject and mock Angular services into unit tests. + * In addition, ngMock also extends various core ng services such that they can be + * inspected and controlled in a synchronous manner within test code. + * + * + *
+ * + */ +angular.module('ngMock', ['ng']).provider({ + $browser: angular.mock.$BrowserProvider, + $exceptionHandler: angular.mock.$ExceptionHandlerProvider, + $log: angular.mock.$LogProvider, + $interval: angular.mock.$IntervalProvider, + $httpBackend: angular.mock.$HttpBackendProvider, + $rootElement: angular.mock.$RootElementProvider +}).config(['$provide', function($provide) { + $provide.decorator('$timeout', angular.mock.$TimeoutDecorator); + $provide.decorator('$$rAF', angular.mock.$RAFDecorator); + $provide.decorator('$$asyncCallback', angular.mock.$AsyncCallbackDecorator); +}]); + +/** + * @ngdoc module + * @name ngMockE2E + * @module ngMockE2E + * @packageName angular-mocks + * @description + * + * The `ngMockE2E` is an angular module which contains mocks suitable for end-to-end testing. + * Currently there is only one mock present in this module - + * the {@link ngMockE2E.$httpBackend e2e $httpBackend} mock. + */ +angular.module('ngMockE2E', ['ng']).config(['$provide', function($provide) { + $provide.decorator('$httpBackend', angular.mock.e2e.$httpBackendDecorator); +}]); + +/** + * @ngdoc service + * @name $httpBackend + * @module ngMockE2E + * @description + * Fake HTTP backend implementation suitable for end-to-end testing or backend-less development of + * applications that use the {@link ng.$http $http service}. + * + * *Note*: For fake http backend implementation suitable for unit testing please see + * {@link ngMock.$httpBackend unit-testing $httpBackend mock}. + * + * This implementation can be used to respond with static or dynamic responses via the `when` api + * and its shortcuts (`whenGET`, `whenPOST`, etc) and optionally pass through requests to the + * real $httpBackend for specific requests (e.g. to interact with certain remote apis or to fetch + * templates from a webserver). + * + * As opposed to unit-testing, in an end-to-end testing scenario or in scenario when an application + * is being developed with the real backend api replaced with a mock, it is often desirable for + * certain category of requests to bypass the mock and issue a real http request (e.g. to fetch + * templates or static files from the webserver). To configure the backend with this behavior + * use the `passThrough` request handler of `when` instead of `respond`. + * + * Additionally, we don't want to manually have to flush mocked out requests like we do during unit + * testing. For this reason the e2e $httpBackend flushes mocked out requests + * automatically, closely simulating the behavior of the XMLHttpRequest object. + * + * To setup the application to run with this http backend, you have to create a module that depends + * on the `ngMockE2E` and your application modules and defines the fake backend: + * + * ```js + * myAppDev = angular.module('myAppDev', ['myApp', 'ngMockE2E']); + * myAppDev.run(function($httpBackend) { + * phones = [{name: 'phone1'}, {name: 'phone2'}]; + * + * // returns the current list of phones + * $httpBackend.whenGET('/phones').respond(phones); + * + * // adds a new phone to the phones array + * $httpBackend.whenPOST('/phones').respond(function(method, url, data) { + * var phone = angular.fromJson(data); + * phones.push(phone); + * return [200, phone, {}]; + * }); + * $httpBackend.whenGET(/^\/templates\//).passThrough(); + * //... + * }); + * ``` + * + * Afterwards, bootstrap your app with this new module. + */ + +/** + * @ngdoc method + * @name $httpBackend#when + * @module ngMockE2E + * @description + * Creates a new backend definition. + * + * @param {string} method HTTP method. + * @param {string|RegExp|function(string)} url HTTP url or function that receives the url + * and returns true if the url match the current definition. + * @param {(string|RegExp)=} data HTTP request body. + * @param {(Object|function(Object))=} headers HTTP headers or function that receives http header + * object and returns true if the headers match the current definition. + * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that + * control how a matched request is handled. You can save this object for later use and invoke + * `respond` or `passThrough` again in order to change how a matched request is handled. + * + * - respond – + * `{function([status,] data[, headers, statusText]) + * | function(function(method, url, data, headers)}` + * – The respond method takes a set of static data to be returned or a function that can return + * an array containing response status (number), response data (string), response headers + * (Object), and the text for the status (string). + * - passThrough – `{function()}` – Any request matching a backend definition with + * `passThrough` handler will be passed through to the real backend (an XHR request will be made + * to the server.) + * - Both methods return the `requestHandler` object for possible overrides. + */ + +/** + * @ngdoc method + * @name $httpBackend#whenGET + * @module ngMockE2E + * @description + * Creates a new backend definition for GET requests. For more info see `when()`. + * + * @param {string|RegExp|function(string)} url HTTP url or function that receives the url + * and returns true if the url match the current definition. + * @param {(Object|function(Object))=} headers HTTP headers. + * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that + * control how a matched request is handled. You can save this object for later use and invoke + * `respond` or `passThrough` again in order to change how a matched request is handled. + */ + +/** + * @ngdoc method + * @name $httpBackend#whenHEAD + * @module ngMockE2E + * @description + * Creates a new backend definition for HEAD requests. For more info see `when()`. + * + * @param {string|RegExp|function(string)} url HTTP url or function that receives the url + * and returns true if the url match the current definition. + * @param {(Object|function(Object))=} headers HTTP headers. + * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that + * control how a matched request is handled. You can save this object for later use and invoke + * `respond` or `passThrough` again in order to change how a matched request is handled. + */ + +/** + * @ngdoc method + * @name $httpBackend#whenDELETE + * @module ngMockE2E + * @description + * Creates a new backend definition for DELETE requests. For more info see `when()`. + * + * @param {string|RegExp|function(string)} url HTTP url or function that receives the url + * and returns true if the url match the current definition. + * @param {(Object|function(Object))=} headers HTTP headers. + * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that + * control how a matched request is handled. You can save this object for later use and invoke + * `respond` or `passThrough` again in order to change how a matched request is handled. + */ + +/** + * @ngdoc method + * @name $httpBackend#whenPOST + * @module ngMockE2E + * @description + * Creates a new backend definition for POST requests. For more info see `when()`. + * + * @param {string|RegExp|function(string)} url HTTP url or function that receives the url + * and returns true if the url match the current definition. + * @param {(string|RegExp)=} data HTTP request body. + * @param {(Object|function(Object))=} headers HTTP headers. + * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that + * control how a matched request is handled. You can save this object for later use and invoke + * `respond` or `passThrough` again in order to change how a matched request is handled. + */ + +/** + * @ngdoc method + * @name $httpBackend#whenPUT + * @module ngMockE2E + * @description + * Creates a new backend definition for PUT requests. For more info see `when()`. + * + * @param {string|RegExp|function(string)} url HTTP url or function that receives the url + * and returns true if the url match the current definition. + * @param {(string|RegExp)=} data HTTP request body. + * @param {(Object|function(Object))=} headers HTTP headers. + * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that + * control how a matched request is handled. You can save this object for later use and invoke + * `respond` or `passThrough` again in order to change how a matched request is handled. + */ + +/** + * @ngdoc method + * @name $httpBackend#whenPATCH + * @module ngMockE2E + * @description + * Creates a new backend definition for PATCH requests. For more info see `when()`. + * + * @param {string|RegExp|function(string)} url HTTP url or function that receives the url + * and returns true if the url match the current definition. + * @param {(string|RegExp)=} data HTTP request body. + * @param {(Object|function(Object))=} headers HTTP headers. + * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that + * control how a matched request is handled. You can save this object for later use and invoke + * `respond` or `passThrough` again in order to change how a matched request is handled. + */ + +/** + * @ngdoc method + * @name $httpBackend#whenJSONP + * @module ngMockE2E + * @description + * Creates a new backend definition for JSONP requests. For more info see `when()`. + * + * @param {string|RegExp|function(string)} url HTTP url or function that receives the url + * and returns true if the url match the current definition. + * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that + * control how a matched request is handled. You can save this object for later use and invoke + * `respond` or `passThrough` again in order to change how a matched request is handled. + */ +angular.mock.e2e = {}; +angular.mock.e2e.$httpBackendDecorator = + ['$rootScope', '$delegate', '$browser', createHttpBackendMock]; + + +if(window.jasmine || window.mocha) { + + var currentSpec = null, + isSpecRunning = function() { + return !!currentSpec; + }; + + + (window.beforeEach || window.setup)(function() { + currentSpec = this; + }); + + (window.afterEach || window.teardown)(function() { + var injector = currentSpec.$injector; + + angular.forEach(currentSpec.$modules, function(module) { + if (module && module.$$hashKey) { + module.$$hashKey = undefined; + } + }); + + currentSpec.$injector = null; + currentSpec.$modules = null; + currentSpec = null; + + if (injector) { + injector.get('$rootElement').off(); + injector.get('$browser').pollFns.length = 0; + } + + // clean up jquery's fragment cache + angular.forEach(angular.element.fragments, function(val, key) { + delete angular.element.fragments[key]; + }); + + MockXhr.$$lastInstance = null; + + angular.forEach(angular.callbacks, function(val, key) { + delete angular.callbacks[key]; + }); + angular.callbacks.counter = 0; + }); + + /** + * @ngdoc function + * @name angular.mock.module + * @description + * + * *NOTE*: This function is also published on window for easy access.
+ * *NOTE*: This function is declared ONLY WHEN running tests with jasmine or mocha + * + * This function registers a module configuration code. It collects the configuration information + * which will be used when the injector is created by {@link angular.mock.inject inject}. + * + * See {@link angular.mock.inject inject} for usage example + * + * @param {...(string|Function|Object)} fns any number of modules which are represented as string + * aliases or as anonymous module initialization functions. The modules are used to + * configure the injector. The 'ng' and 'ngMock' modules are automatically loaded. If an + * object literal is passed they will be registered as values in the module, the key being + * the module name and the value being what is returned. + */ + window.module = angular.mock.module = function() { + var moduleFns = Array.prototype.slice.call(arguments, 0); + return isSpecRunning() ? workFn() : workFn; + ///////////////////// + function workFn() { + if (currentSpec.$injector) { + throw new Error('Injector already created, can not register a module!'); + } else { + var modules = currentSpec.$modules || (currentSpec.$modules = []); + angular.forEach(moduleFns, function(module) { + if (angular.isObject(module) && !angular.isArray(module)) { + modules.push(function($provide) { + angular.forEach(module, function(value, key) { + $provide.value(key, value); + }); + }); + } else { + modules.push(module); + } + }); + } + } + }; + + /** + * @ngdoc function + * @name angular.mock.inject + * @description + * + * *NOTE*: This function is also published on window for easy access.
+ * *NOTE*: This function is declared ONLY WHEN running tests with jasmine or mocha + * + * The inject function wraps a function into an injectable function. The inject() creates new + * instance of {@link auto.$injector $injector} per test, which is then used for + * resolving references. + * + * + * ## Resolving References (Underscore Wrapping) + * Often, we would like to inject a reference once, in a `beforeEach()` block and reuse this + * in multiple `it()` clauses. To be able to do this we must assign the reference to a variable + * that is declared in the scope of the `describe()` block. Since we would, most likely, want + * the variable to have the same name of the reference we have a problem, since the parameter + * to the `inject()` function would hide the outer variable. + * + * To help with this, the injected parameters can, optionally, be enclosed with underscores. + * These are ignored by the injector when the reference name is resolved. + * + * For example, the parameter `_myService_` would be resolved as the reference `myService`. + * Since it is available in the function body as _myService_, we can then assign it to a variable + * defined in an outer scope. + * + * ``` + * // Defined out reference variable outside + * var myService; + * + * // Wrap the parameter in underscores + * beforeEach( inject( function(_myService_){ + * myService = _myService_; + * })); + * + * // Use myService in a series of tests. + * it('makes use of myService', function() { + * myService.doStuff(); + * }); + * + * ``` + * + * See also {@link angular.mock.module angular.mock.module} + * + * ## Example + * Example of what a typical jasmine tests looks like with the inject method. + * ```js + * + * angular.module('myApplicationModule', []) + * .value('mode', 'app') + * .value('version', 'v1.0.1'); + * + * + * describe('MyApp', function() { + * + * // You need to load modules that you want to test, + * // it loads only the "ng" module by default. + * beforeEach(module('myApplicationModule')); + * + * + * // inject() is used to inject arguments of all given functions + * it('should provide a version', inject(function(mode, version) { + * expect(version).toEqual('v1.0.1'); + * expect(mode).toEqual('app'); + * })); + * + * + * // The inject and module method can also be used inside of the it or beforeEach + * it('should override a version and test the new version is injected', function() { + * // module() takes functions or strings (module aliases) + * module(function($provide) { + * $provide.value('version', 'overridden'); // override version here + * }); + * + * inject(function(version) { + * expect(version).toEqual('overridden'); + * }); + * }); + * }); + * + * ``` + * + * @param {...Function} fns any number of functions which will be injected using the injector. + */ + + + + var ErrorAddingDeclarationLocationStack = function(e, errorForStack) { + this.message = e.message; + this.name = e.name; + if (e.line) this.line = e.line; + if (e.sourceId) this.sourceId = e.sourceId; + if (e.stack && errorForStack) + this.stack = e.stack + '\n' + errorForStack.stack; + if (e.stackArray) this.stackArray = e.stackArray; + }; + ErrorAddingDeclarationLocationStack.prototype.toString = Error.prototype.toString; + + window.inject = angular.mock.inject = function() { + var blockFns = Array.prototype.slice.call(arguments, 0); + var errorForStack = new Error('Declaration Location'); + return isSpecRunning() ? workFn.call(currentSpec) : workFn; + ///////////////////// + function workFn() { + var modules = currentSpec.$modules || []; + var strictDi = !!currentSpec.$injectorStrict; + modules.unshift('ngMock'); + modules.unshift('ng'); + var injector = currentSpec.$injector; + if (!injector) { + if (strictDi) { + // If strictDi is enabled, annotate the providerInjector blocks + angular.forEach(modules, function(moduleFn) { + if (typeof moduleFn === "function") { + angular.injector.$$annotate(moduleFn); + } + }); + } + injector = currentSpec.$injector = angular.injector(modules, strictDi); + currentSpec.$injectorStrict = strictDi; + } + for(var i = 0, ii = blockFns.length; i < ii; i++) { + if (currentSpec.$injectorStrict) { + // If the injector is strict / strictDi, and the spec wants to inject using automatic + // annotation, then annotate the function here. + injector.annotate(blockFns[i]); + } + try { + /* jshint -W040 *//* Jasmine explicitly provides a `this` object when calling functions */ + injector.invoke(blockFns[i] || angular.noop, this); + /* jshint +W040 */ + } catch (e) { + if (e.stack && errorForStack) { + throw new ErrorAddingDeclarationLocationStack(e, errorForStack); + } + throw e; + } finally { + errorForStack = null; + } + } + } + }; + + + angular.mock.inject.strictDi = function(value) { + value = arguments.length ? !!value : true; + return isSpecRunning() ? workFn() : workFn; + + function workFn() { + if (value !== currentSpec.$injectorStrict) { + if (currentSpec.$injector) { + throw new Error('Injector already created, can not modify strict annotations'); + } else { + currentSpec.$injectorStrict = value; + } + } + } + }; +} + + +})(window, window.angular); diff --git a/1.3.0-rc.2/angular-resource.js b/1.3.0-rc.2/angular-resource.js new file mode 100644 index 0000000000..1082c76901 --- /dev/null +++ b/1.3.0-rc.2/angular-resource.js @@ -0,0 +1,667 @@ +/** + * @license AngularJS v1.3.0-rc.2 + * (c) 2010-2014 Google, Inc. http://angularjs.org + * License: MIT + */ +(function(window, angular, undefined) {'use strict'; + +var $resourceMinErr = angular.$$minErr('$resource'); + +// Helper functions and regex to lookup a dotted path on an object +// stopping at undefined/null. The path must be composed of ASCII +// identifiers (just like $parse) +var MEMBER_NAME_REGEX = /^(\.[a-zA-Z_$][0-9a-zA-Z_$]*)+$/; + +function isValidDottedPath(path) { + return (path != null && path !== '' && path !== 'hasOwnProperty' && + MEMBER_NAME_REGEX.test('.' + path)); +} + +function lookupDottedPath(obj, path) { + if (!isValidDottedPath(path)) { + throw $resourceMinErr('badmember', 'Dotted member path "@{0}" is invalid.', path); + } + var keys = path.split('.'); + for (var i = 0, ii = keys.length; i < ii && obj !== undefined; i++) { + var key = keys[i]; + obj = (obj !== null) ? obj[key] : undefined; + } + return obj; +} + +/** + * Create a shallow copy of an object and clear other fields from the destination + */ +function shallowClearAndCopy(src, dst) { + dst = dst || {}; + + angular.forEach(dst, function(value, key){ + delete dst[key]; + }); + + for (var key in src) { + if (src.hasOwnProperty(key) && !(key.charAt(0) === '$' && key.charAt(1) === '$')) { + dst[key] = src[key]; + } + } + + return dst; +} + +/** + * @ngdoc module + * @name ngResource + * @description + * + * # ngResource + * + * The `ngResource` module provides interaction support with RESTful services + * via the $resource service. + * + * + *
+ * + * See {@link ngResource.$resource `$resource`} for usage. + */ + +/** + * @ngdoc service + * @name $resource + * @requires $http + * + * @description + * A factory which creates a resource object that lets you interact with + * [RESTful](http://en.wikipedia.org/wiki/Representational_State_Transfer) server-side data sources. + * + * The returned resource object has action methods which provide high-level behaviors without + * the need to interact with the low level {@link ng.$http $http} service. + * + * Requires the {@link ngResource `ngResource`} module to be installed. + * + * By default, trailing slashes will be stripped from the calculated URLs, + * which can pose problems with server backends that do not expect that + * behavior. This can be disabled by configuring the `$resourceProvider` like + * this: + * + * ```js + app.config(['$resourceProvider', function ($resourceProvider) { + // Don't strip trailing slashes from calculated URLs + $resourceProvider.defaults.stripTrailingSlashes = false; + }]); + * ``` + * + * @param {string} url A parametrized URL template with parameters prefixed by `:` as in + * `/user/:username`. If you are using a URL with a port number (e.g. + * `http://example.com:8080/api`), it will be respected. + * + * If you are using a url with a suffix, just add the suffix, like this: + * `$resource('http://example.com/resource.json')` or `$resource('http://example.com/:id.json')` + * or even `$resource('http://example.com/resource/:resource_id.:format')` + * If the parameter before the suffix is empty, :resource_id in this case, then the `/.` will be + * collapsed down to a single `.`. If you need this sequence to appear and not collapse then you + * can escape it with `/\.`. + * + * @param {Object=} paramDefaults Default values for `url` parameters. These can be overridden in + * `actions` methods. If any of the parameter value is a function, it will be executed every time + * when a param value needs to be obtained for a request (unless the param was overridden). + * + * Each key value in the parameter object is first bound to url template if present and then any + * excess keys are appended to the url search query after the `?`. + * + * Given a template `/path/:verb` and parameter `{verb:'greet', salutation:'Hello'}` results in + * URL `/path/greet?salutation=Hello`. + * + * If the parameter value is prefixed with `@` then the value for that parameter will be extracted + * from the corresponding property on the `data` object (provided when calling an action method). For + * example, if the `defaultParam` object is `{someParam: '@someProp'}` then the value of `someParam` + * will be `data.someProp`. + * + * @param {Object.=} actions Hash with declaration of custom action that should extend + * the default set of resource actions. The declaration should be created in the format of {@link + * ng.$http#usage_parameters $http.config}: + * + * {action1: {method:?, params:?, isArray:?, headers:?, ...}, + * action2: {method:?, params:?, isArray:?, headers:?, ...}, + * ...} + * + * Where: + * + * - **`action`** – {string} – The name of action. This name becomes the name of the method on + * your resource object. + * - **`method`** – {string} – Case insensitive HTTP method (e.g. `GET`, `POST`, `PUT`, + * `DELETE`, `JSONP`, etc). + * - **`params`** – {Object=} – Optional set of pre-bound parameters for this action. If any of + * the parameter value is a function, it will be executed every time when a param value needs to + * be obtained for a request (unless the param was overridden). + * - **`url`** – {string} – action specific `url` override. The url templating is supported just + * like for the resource-level urls. + * - **`isArray`** – {boolean=} – If true then the returned object for this action is an array, + * see `returns` section. + * - **`transformRequest`** – + * `{function(data, headersGetter)|Array.}` – + * transform function or an array of such functions. The transform function takes the http + * request body and headers and returns its transformed (typically serialized) version. + * By default, transformRequest will contain one function that checks if the request data is + * an object and serializes to using `angular.toJson`. To prevent this behavior, set + * `transformRequest` to an empty array: `transformRequest: []` + * - **`transformResponse`** – + * `{function(data, headersGetter)|Array.}` – + * transform function or an array of such functions. The transform function takes the http + * response body and headers and returns its transformed (typically deserialized) version. + * By default, transformResponse will contain one function that checks if the response looks like + * a JSON string and deserializes it using `angular.fromJson`. To prevent this behavior, set + * `transformResponse` to an empty array: `transformResponse: []` + * - **`cache`** – `{boolean|Cache}` – If true, a default $http cache will be used to cache the + * GET request, otherwise if a cache instance built with + * {@link ng.$cacheFactory $cacheFactory}, this cache will be used for + * caching. + * - **`timeout`** – `{number|Promise}` – timeout in milliseconds, or {@link ng.$q promise} that + * should abort the request when resolved. + * - **`withCredentials`** - `{boolean}` - whether to set the `withCredentials` flag on the + * XHR object. See + * [requests with credentials](https://developer.mozilla.org/en/http_access_control#section_5) + * for more information. + * - **`responseType`** - `{string}` - see + * [requestType](https://developer.mozilla.org/en-US/docs/DOM/XMLHttpRequest#responseType). + * - **`interceptor`** - `{Object=}` - The interceptor object has two optional methods - + * `response` and `responseError`. Both `response` and `responseError` interceptors get called + * with `http response` object. See {@link ng.$http $http interceptors}. + * + * @param {Object} options Hash with custom settings that should extend the + * default `$resourceProvider` behavior. The only supported option is + * + * Where: + * + * - **`stripTrailingSlashes`** – {boolean} – If true then the trailing + * slashes from any calculated URL will be stripped. (Defaults to true.) + * + * @returns {Object} A resource "class" object with methods for the default set of resource actions + * optionally extended with custom `actions`. The default set contains these actions: + * ```js + * { 'get': {method:'GET'}, + * 'save': {method:'POST'}, + * 'query': {method:'GET', isArray:true}, + * 'remove': {method:'DELETE'}, + * 'delete': {method:'DELETE'} }; + * ``` + * + * Calling these methods invoke an {@link ng.$http} with the specified http method, + * destination and parameters. When the data is returned from the server then the object is an + * instance of the resource class. The actions `save`, `remove` and `delete` are available on it + * as methods with the `$` prefix. This allows you to easily perform CRUD operations (create, + * read, update, delete) on server-side data like this: + * ```js + * var User = $resource('/user/:userId', {userId:'@id'}); + * var user = User.get({id:123}, function() { + * user.abc = true; + * user.$save(); + * }); + * ``` + * + * It is important to realize that invoking a $resource object method immediately returns an + * empty reference (object or array depending on `isArray`). Once the data is returned from the + * server the existing reference is populated with the actual data. This is a useful trick since + * usually the resource is assigned to a model which is then rendered by the view. Having an empty + * object results in no rendering, once the data arrives from the server then the object is + * populated with the data and the view automatically re-renders itself showing the new data. This + * means that in most cases one never has to write a callback function for the action methods. + * + * The action methods on the class object or instance object can be invoked with the following + * parameters: + * + * - HTTP GET "class" actions: `Resource.action([parameters], [success], [error])` + * - non-GET "class" actions: `Resource.action([parameters], postData, [success], [error])` + * - non-GET instance actions: `instance.$action([parameters], [success], [error])` + * + * Success callback is called with (value, responseHeaders) arguments. Error callback is called + * with (httpResponse) argument. + * + * Class actions return empty instance (with additional properties below). + * Instance actions return promise of the action. + * + * The Resource instances and collection have these additional properties: + * + * - `$promise`: the {@link ng.$q promise} of the original server interaction that created this + * instance or collection. + * + * On success, the promise is resolved with the same resource instance or collection object, + * updated with data from server. This makes it easy to use in + * {@link ngRoute.$routeProvider resolve section of $routeProvider.when()} to defer view + * rendering until the resource(s) are loaded. + * + * On failure, the promise is resolved with the {@link ng.$http http response} object, without + * the `resource` property. + * + * If an interceptor object was provided, the promise will instead be resolved with the value + * returned by the interceptor. + * + * - `$resolved`: `true` after first server interaction is completed (either with success or + * rejection), `false` before that. Knowing if the Resource has been resolved is useful in + * data-binding. + * + * @example + * + * # Credit card resource + * + * ```js + // Define CreditCard class + var CreditCard = $resource('/user/:userId/card/:cardId', + {userId:123, cardId:'@id'}, { + charge: {method:'POST', params:{charge:true}} + }); + + // We can retrieve a collection from the server + var cards = CreditCard.query(function() { + // GET: /user/123/card + // server returns: [ {id:456, number:'1234', name:'Smith'} ]; + + var card = cards[0]; + // each item is an instance of CreditCard + expect(card instanceof CreditCard).toEqual(true); + card.name = "J. Smith"; + // non GET methods are mapped onto the instances + card.$save(); + // POST: /user/123/card/456 {id:456, number:'1234', name:'J. Smith'} + // server returns: {id:456, number:'1234', name: 'J. Smith'}; + + // our custom method is mapped as well. + card.$charge({amount:9.99}); + // POST: /user/123/card/456?amount=9.99&charge=true {id:456, number:'1234', name:'J. Smith'} + }); + + // we can create an instance as well + var newCard = new CreditCard({number:'0123'}); + newCard.name = "Mike Smith"; + newCard.$save(); + // POST: /user/123/card {number:'0123', name:'Mike Smith'} + // server returns: {id:789, number:'0123', name: 'Mike Smith'}; + expect(newCard.id).toEqual(789); + * ``` + * + * The object returned from this function execution is a resource "class" which has "static" method + * for each action in the definition. + * + * Calling these methods invoke `$http` on the `url` template with the given `method`, `params` and + * `headers`. + * When the data is returned from the server then the object is an instance of the resource type and + * all of the non-GET methods are available with `$` prefix. This allows you to easily support CRUD + * operations (create, read, update, delete) on server-side data. + + ```js + var User = $resource('/user/:userId', {userId:'@id'}); + User.get({userId:123}, function(user) { + user.abc = true; + user.$save(); + }); + ``` + * + * It's worth noting that the success callback for `get`, `query` and other methods gets passed + * in the response that came from the server as well as $http header getter function, so one + * could rewrite the above example and get access to http headers as: + * + ```js + var User = $resource('/user/:userId', {userId:'@id'}); + User.get({userId:123}, function(u, getResponseHeaders){ + u.abc = true; + u.$save(function(u, putResponseHeaders) { + //u => saved user object + //putResponseHeaders => $http header getter + }); + }); + ``` + * + * You can also access the raw `$http` promise via the `$promise` property on the object returned + * + ``` + var User = $resource('/user/:userId', {userId:'@id'}); + User.get({userId:123}) + .$promise.then(function(user) { + $scope.user = user; + }); + ``` + + * # Creating a custom 'PUT' request + * In this example we create a custom method on our resource to make a PUT request + * ```js + * var app = angular.module('app', ['ngResource', 'ngRoute']); + * + * // Some APIs expect a PUT request in the format URL/object/ID + * // Here we are creating an 'update' method + * app.factory('Notes', ['$resource', function($resource) { + * return $resource('/notes/:id', null, + * { + * 'update': { method:'PUT' } + * }); + * }]); + * + * // In our controller we get the ID from the URL using ngRoute and $routeParams + * // We pass in $routeParams and our Notes factory along with $scope + * app.controller('NotesCtrl', ['$scope', '$routeParams', 'Notes', + function($scope, $routeParams, Notes) { + * // First get a note object from the factory + * var note = Notes.get({ id:$routeParams.id }); + * $id = note.id; + * + * // Now call update passing in the ID first then the object you are updating + * Notes.update({ id:$id }, note); + * + * // This will PUT /notes/ID with the note object in the request payload + * }]); + * ``` + */ +angular.module('ngResource', ['ng']). + provider('$resource', function () { + var provider = this; + + this.defaults = { + // Strip slashes by default + stripTrailingSlashes: true, + + // Default actions configuration + actions: { + 'get': {method: 'GET'}, + 'save': {method: 'POST'}, + 'query': {method: 'GET', isArray: true}, + 'remove': {method: 'DELETE'}, + 'delete': {method: 'DELETE'} + } + }; + + this.$get = ['$http', '$q', function ($http, $q) { + + var noop = angular.noop, + forEach = angular.forEach, + extend = angular.extend, + copy = angular.copy, + isFunction = angular.isFunction; + + /** + * We need our custom method because encodeURIComponent is too aggressive and doesn't follow + * http://www.ietf.org/rfc/rfc3986.txt with regards to the character set + * (pchar) allowed in path segments: + * segment = *pchar + * pchar = unreserved / pct-encoded / sub-delims / ":" / "@" + * pct-encoded = "%" HEXDIG HEXDIG + * unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~" + * sub-delims = "!" / "$" / "&" / "'" / "(" / ")" + * / "*" / "+" / "," / ";" / "=" + */ + function encodeUriSegment(val) { + return encodeUriQuery(val, true). + replace(/%26/gi, '&'). + replace(/%3D/gi, '='). + replace(/%2B/gi, '+'); + } + + + /** + * This method is intended for encoding *key* or *value* parts of query component. We need a + * custom method because encodeURIComponent is too aggressive and encodes stuff that doesn't + * have to be encoded per http://tools.ietf.org/html/rfc3986: + * query = *( pchar / "/" / "?" ) + * pchar = unreserved / pct-encoded / sub-delims / ":" / "@" + * unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~" + * pct-encoded = "%" HEXDIG HEXDIG + * sub-delims = "!" / "$" / "&" / "'" / "(" / ")" + * / "*" / "+" / "," / ";" / "=" + */ + function encodeUriQuery(val, pctEncodeSpaces) { + return encodeURIComponent(val). + replace(/%40/gi, '@'). + replace(/%3A/gi, ':'). + replace(/%24/g, '$'). + replace(/%2C/gi, ','). + replace(/%20/g, (pctEncodeSpaces ? '%20' : '+')); + } + + function Route(template, defaults) { + this.template = template; + this.defaults = extend({}, provider.defaults, defaults); + this.urlParams = {}; + } + + Route.prototype = { + setUrlParams: function (config, params, actionUrl) { + var self = this, + url = actionUrl || self.template, + val, + encodedVal; + + var urlParams = self.urlParams = {}; + forEach(url.split(/\W/), function (param) { + if (param === 'hasOwnProperty') { + throw $resourceMinErr('badname', "hasOwnProperty is not a valid parameter name."); + } + if (!(new RegExp("^\\d+$").test(param)) && param && + (new RegExp("(^|[^\\\\]):" + param + "(\\W|$)").test(url))) { + urlParams[param] = true; + } + }); + url = url.replace(/\\:/g, ':'); + + params = params || {}; + forEach(self.urlParams, function (_, urlParam) { + val = params.hasOwnProperty(urlParam) ? params[urlParam] : self.defaults[urlParam]; + if (angular.isDefined(val) && val !== null) { + encodedVal = encodeUriSegment(val); + url = url.replace(new RegExp(":" + urlParam + "(\\W|$)", "g"), function (match, p1) { + return encodedVal + p1; + }); + } else { + url = url.replace(new RegExp("(\/?):" + urlParam + "(\\W|$)", "g"), function (match, + leadingSlashes, tail) { + if (tail.charAt(0) == '/') { + return tail; + } else { + return leadingSlashes + tail; + } + }); + } + }); + + // strip trailing slashes and set the url (unless this behavior is specifically disabled) + if (self.defaults.stripTrailingSlashes) { + url = url.replace(/\/+$/, '') || '/'; + } + + // then replace collapse `/.` if found in the last URL path segment before the query + // E.g. `http://url.com/id./format?q=x` becomes `http://url.com/id.format?q=x` + url = url.replace(/\/\.(?=\w+($|\?))/, '.'); + // replace escaped `/\.` with `/.` + config.url = url.replace(/\/\\\./, '/.'); + + + // set params - delegate param encoding to $http + forEach(params, function (value, key) { + if (!self.urlParams[key]) { + config.params = config.params || {}; + config.params[key] = value; + } + }); + } + }; + + + function resourceFactory(url, paramDefaults, actions, options) { + var route = new Route(url, options); + + actions = extend({}, provider.defaults.actions, actions); + + function extractParams(data, actionParams) { + var ids = {}; + actionParams = extend({}, paramDefaults, actionParams); + forEach(actionParams, function (value, key) { + if (isFunction(value)) { value = value(); } + ids[key] = value && value.charAt && value.charAt(0) == '@' ? + lookupDottedPath(data, value.substr(1)) : value; + }); + return ids; + } + + function defaultResponseInterceptor(response) { + return response.resource; + } + + function Resource(value) { + shallowClearAndCopy(value || {}, this); + } + + Resource.prototype.toJSON = function () { + var data = extend({}, this); + delete data.$promise; + delete data.$resolved; + return data; + }; + + forEach(actions, function (action, name) { + var hasBody = /^(POST|PUT|PATCH)$/i.test(action.method); + + Resource[name] = function (a1, a2, a3, a4) { + var params = {}, data, success, error; + + /* jshint -W086 */ /* (purposefully fall through case statements) */ + switch (arguments.length) { + case 4: + error = a4; + success = a3; + //fallthrough + case 3: + case 2: + if (isFunction(a2)) { + if (isFunction(a1)) { + success = a1; + error = a2; + break; + } + + success = a2; + error = a3; + //fallthrough + } else { + params = a1; + data = a2; + success = a3; + break; + } + case 1: + if (isFunction(a1)) success = a1; + else if (hasBody) data = a1; + else params = a1; + break; + case 0: break; + default: + throw $resourceMinErr('badargs', + "Expected up to 4 arguments [params, data, success, error], got {0} arguments", + arguments.length); + } + /* jshint +W086 */ /* (purposefully fall through case statements) */ + + var isInstanceCall = this instanceof Resource; + var value = isInstanceCall ? data : (action.isArray ? [] : new Resource(data)); + var httpConfig = {}; + var responseInterceptor = action.interceptor && action.interceptor.response || + defaultResponseInterceptor; + var responseErrorInterceptor = action.interceptor && action.interceptor.responseError || + undefined; + + forEach(action, function (value, key) { + if (key != 'params' && key != 'isArray' && key != 'interceptor') { + httpConfig[key] = copy(value); + } + }); + + if (hasBody) httpConfig.data = data; + route.setUrlParams(httpConfig, + extend({}, extractParams(data, action.params || {}), params), + action.url); + + var promise = $http(httpConfig).then(function (response) { + var data = response.data, + promise = value.$promise; + + if (data) { + // Need to convert action.isArray to boolean in case it is undefined + // jshint -W018 + if (angular.isArray(data) !== (!!action.isArray)) { + throw $resourceMinErr('badcfg', + 'Error in resource configuration for action `{0}`. Expected response to ' + + 'contain an {1} but got an {2}', name, action.isArray ? 'array' : 'object', + angular.isArray(data) ? 'array' : 'object'); + } + // jshint +W018 + if (action.isArray) { + value.length = 0; + forEach(data, function (item) { + if (typeof item === "object") { + value.push(new Resource(item)); + } else { + // Valid JSON values may be string literals, and these should not be converted + // into objects. These items will not have access to the Resource prototype + // methods, but unfortunately there + value.push(item); + } + }); + } else { + shallowClearAndCopy(data, value); + value.$promise = promise; + } + } + + value.$resolved = true; + + response.resource = value; + + return response; + }, function (response) { + value.$resolved = true; + + (error || noop)(response); + + return $q.reject(response); + }); + + promise = promise.then( + function (response) { + var value = responseInterceptor(response); + (success || noop)(value, response.headers); + return value; + }, + responseErrorInterceptor); + + if (!isInstanceCall) { + // we are creating instance / collection + // - set the initial promise + // - return the instance / collection + value.$promise = promise; + value.$resolved = false; + + return value; + } + + // instance call + return promise; + }; + + + Resource.prototype['$' + name] = function (params, success, error) { + if (isFunction(params)) { + error = success; success = params; params = {}; + } + var result = Resource[name].call(this, params, this, success, error); + return result.$promise || result; + }; + }); + + Resource.bind = function (additionalParamDefaults) { + return resourceFactory(url, extend({}, paramDefaults, additionalParamDefaults), actions); + }; + + return Resource; + } + + return resourceFactory; + }]; + }); + + +})(window, window.angular); diff --git a/1.3.0-rc.2/angular-resource.min.js b/1.3.0-rc.2/angular-resource.min.js new file mode 100644 index 0000000000..e6623ead4c --- /dev/null +++ b/1.3.0-rc.2/angular-resource.min.js @@ -0,0 +1,13 @@ +/* + AngularJS v1.3.0-rc.2 + (c) 2010-2014 Google, Inc. http://angularjs.org + License: MIT +*/ +(function(I,d,B){'use strict';function D(f,q){q=q||{};d.forEach(q,function(d,h){delete q[h]});for(var h in f)!f.hasOwnProperty(h)||"$"===h.charAt(0)&&"$"===h.charAt(1)||(q[h]=f[h]);return q}var w=d.$$minErr("$resource"),C=/^(\.[a-zA-Z_$][0-9a-zA-Z_$]*)+$/;d.module("ngResource",["ng"]).provider("$resource",function(){var f=this;this.defaults={stripTrailingSlashes:!0,actions:{get:{method:"GET"},save:{method:"POST"},query:{method:"GET",isArray:!0},remove:{method:"DELETE"},"delete":{method:"DELETE"}}}; +this.$get=["$http","$q",function(q,h){function t(d,g){this.template=d;this.defaults=s({},f.defaults,g);this.urlParams={}}function v(x,g,l,m){function c(b,k){var c={};k=s({},g,k);r(k,function(a,k){u(a)&&(a=a());var d;if(a&&a.charAt&&"@"==a.charAt(0)){d=b;var e=a.substr(1);if(null==e||""===e||"hasOwnProperty"===e||!C.test("."+e))throw w("badmember",e);for(var e=e.split("."),n=0,g=e.length;n + */ + /* global -ngRouteModule */ +var ngRouteModule = angular.module('ngRoute', ['ng']). + provider('$route', $RouteProvider), + $routeMinErr = angular.$$minErr('ngRoute'); + +/** + * @ngdoc provider + * @name $routeProvider + * + * @description + * + * Used for configuring routes. + * + * ## Example + * See {@link ngRoute.$route#example $route} for an example of configuring and using `ngRoute`. + * + * ## Dependencies + * Requires the {@link ngRoute `ngRoute`} module to be installed. + */ +function $RouteProvider(){ + function inherit(parent, extra) { + return angular.extend(new (angular.extend(function() {}, {prototype:parent}))(), extra); + } + + var routes = {}; + + /** + * @ngdoc method + * @name $routeProvider#when + * + * @param {string} path Route path (matched against `$location.path`). If `$location.path` + * contains redundant trailing slash or is missing one, the route will still match and the + * `$location.path` will be updated to add or drop the trailing slash to exactly match the + * route definition. + * + * * `path` can contain named groups starting with a colon: e.g. `:name`. All characters up + * to the next slash are matched and stored in `$routeParams` under the given `name` + * when the route matches. + * * `path` can contain named groups starting with a colon and ending with a star: + * e.g.`:name*`. All characters are eagerly stored in `$routeParams` under the given `name` + * when the route matches. + * * `path` can contain optional named groups with a question mark: e.g.`:name?`. + * + * For example, routes like `/color/:color/largecode/:largecode*\/edit` will match + * `/color/brown/largecode/code/with/slashes/edit` and extract: + * + * * `color: brown` + * * `largecode: code/with/slashes`. + * + * + * @param {Object} route Mapping information to be assigned to `$route.current` on route + * match. + * + * Object properties: + * + * - `controller` – `{(string|function()=}` – Controller fn that should be associated with + * newly created scope or the name of a {@link angular.Module#controller registered + * controller} if passed as a string. + * - `controllerAs` – `{string=}` – A controller alias name. If present the controller will be + * published to scope under the `controllerAs` name. + * - `template` – `{string=|function()=}` – html template as a string or a function that + * returns an html template as a string which should be used by {@link + * ngRoute.directive:ngView ngView} or {@link ng.directive:ngInclude ngInclude} directives. + * This property takes precedence over `templateUrl`. + * + * If `template` is a function, it will be called with the following parameters: + * + * - `{Array.}` - route parameters extracted from the current + * `$location.path()` by applying the current route + * + * - `templateUrl` – `{string=|function()=}` – path or function that returns a path to an html + * template that should be used by {@link ngRoute.directive:ngView ngView}. + * + * If `templateUrl` is a function, it will be called with the following parameters: + * + * - `{Array.}` - route parameters extracted from the current + * `$location.path()` by applying the current route + * + * - `resolve` - `{Object.=}` - An optional map of dependencies which should + * be injected into the controller. If any of these dependencies are promises, the router + * will wait for them all to be resolved or one to be rejected before the controller is + * instantiated. + * If all the promises are resolved successfully, the values of the resolved promises are + * injected and {@link ngRoute.$route#$routeChangeSuccess $routeChangeSuccess} event is + * fired. If any of the promises are rejected the + * {@link ngRoute.$route#$routeChangeError $routeChangeError} event is fired. The map object + * is: + * + * - `key` – `{string}`: a name of a dependency to be injected into the controller. + * - `factory` - `{string|function}`: If `string` then it is an alias for a service. + * Otherwise if function, then it is {@link auto.$injector#invoke injected} + * and the return value is treated as the dependency. If the result is a promise, it is + * resolved before its value is injected into the controller. Be aware that + * `ngRoute.$routeParams` will still refer to the previous route within these resolve + * functions. Use `$route.current.params` to access the new route parameters, instead. + * + * - `redirectTo` – {(string|function())=} – value to update + * {@link ng.$location $location} path with and trigger route redirection. + * + * If `redirectTo` is a function, it will be called with the following parameters: + * + * - `{Object.}` - route parameters extracted from the current + * `$location.path()` by applying the current route templateUrl. + * - `{string}` - current `$location.path()` + * - `{Object}` - current `$location.search()` + * + * The custom `redirectTo` function is expected to return a string which will be used + * to update `$location.path()` and `$location.search()`. + * + * - `[reloadOnSearch=true]` - {boolean=} - reload route when only `$location.search()` + * or `$location.hash()` changes. + * + * If the option is set to `false` and url in the browser changes, then + * `$routeUpdate` event is broadcasted on the root scope. + * + * - `[caseInsensitiveMatch=false]` - {boolean=} - match routes without being case sensitive + * + * If the option is set to `true`, then the particular route can be matched without being + * case sensitive + * + * @returns {Object} self + * + * @description + * Adds a new route definition to the `$route` service. + */ + this.when = function(path, route) { + routes[path] = angular.extend( + {reloadOnSearch: true}, + route, + path && pathRegExp(path, route) + ); + + // create redirection for trailing slashes + if (path) { + var redirectPath = (path[path.length-1] == '/') + ? path.substr(0, path.length-1) + : path +'/'; + + routes[redirectPath] = angular.extend( + {redirectTo: path}, + pathRegExp(redirectPath, route) + ); + } + + return this; + }; + + /** + * @param path {string} path + * @param opts {Object} options + * @return {?Object} + * + * @description + * Normalizes the given path, returning a regular expression + * and the original path. + * + * Inspired by pathRexp in visionmedia/express/lib/utils.js. + */ + function pathRegExp(path, opts) { + var insensitive = opts.caseInsensitiveMatch, + ret = { + originalPath: path, + regexp: path + }, + keys = ret.keys = []; + + path = path + .replace(/([().])/g, '\\$1') + .replace(/(\/)?:(\w+)([\?\*])?/g, function(_, slash, key, option){ + var optional = option === '?' ? option : null; + var star = option === '*' ? option : null; + keys.push({ name: key, optional: !!optional }); + slash = slash || ''; + return '' + + (optional ? '' : slash) + + '(?:' + + (optional ? slash : '') + + (star && '(.+?)' || '([^/]+)') + + (optional || '') + + ')' + + (optional || ''); + }) + .replace(/([\/$\*])/g, '\\$1'); + + ret.regexp = new RegExp('^' + path + '$', insensitive ? 'i' : ''); + return ret; + } + + /** + * @ngdoc method + * @name $routeProvider#otherwise + * + * @description + * Sets route definition that will be used on route change when no other route definition + * is matched. + * + * @param {Object|string} params Mapping information to be assigned to `$route.current`. + * If called with a string, the value maps to `redirectTo`. + * @returns {Object} self + */ + this.otherwise = function(params) { + if (typeof params === 'string') { + params = {redirectTo: params}; + } + this.when(null, params); + return this; + }; + + + this.$get = ['$rootScope', + '$location', + '$routeParams', + '$q', + '$injector', + '$templateRequest', + '$sce', + function($rootScope, $location, $routeParams, $q, $injector, $templateRequest, $sce) { + + /** + * @ngdoc service + * @name $route + * @requires $location + * @requires $routeParams + * + * @property {Object} current Reference to the current route definition. + * The route definition contains: + * + * - `controller`: The controller constructor as define in route definition. + * - `locals`: A map of locals which is used by {@link ng.$controller $controller} service for + * controller instantiation. The `locals` contain + * the resolved values of the `resolve` map. Additionally the `locals` also contain: + * + * - `$scope` - The current route scope. + * - `$template` - The current route template HTML. + * + * @property {Object} routes Object with all route configuration Objects as its properties. + * + * @description + * `$route` is used for deep-linking URLs to controllers and views (HTML partials). + * It watches `$location.url()` and tries to map the path to an existing route definition. + * + * Requires the {@link ngRoute `ngRoute`} module to be installed. + * + * You can define routes through {@link ngRoute.$routeProvider $routeProvider}'s API. + * + * The `$route` service is typically used in conjunction with the + * {@link ngRoute.directive:ngView `ngView`} directive and the + * {@link ngRoute.$routeParams `$routeParams`} service. + * + * @example + * This example shows how changing the URL hash causes the `$route` to match a route against the + * URL, and the `ngView` pulls in the partial. + * + * Note that this example is using {@link ng.directive:script inlined templates} + * to get it working on jsfiddle as well. + * + * + * + *
+ * Choose: + * Moby | + * Moby: Ch1 | + * Gatsby | + * Gatsby: Ch4 | + * Scarlet Letter
+ * + *
+ * + *
+ * + *
$location.path() = {{$location.path()}}
+ *
$route.current.templateUrl = {{$route.current.templateUrl}}
+ *
$route.current.params = {{$route.current.params}}
+ *
$route.current.scope.name = {{$route.current.scope.name}}
+ *
$routeParams = {{$routeParams}}
+ *
+ *
+ * + * + * controller: {{name}}
+ * Book Id: {{params.bookId}}
+ *
+ * + * + * controller: {{name}}
+ * Book Id: {{params.bookId}}
+ * Chapter Id: {{params.chapterId}} + *
+ * + * + * angular.module('ngRouteExample', ['ngRoute']) + * + * .controller('MainController', function($scope, $route, $routeParams, $location) { + * $scope.$route = $route; + * $scope.$location = $location; + * $scope.$routeParams = $routeParams; + * }) + * + * .controller('BookController', function($scope, $routeParams) { + * $scope.name = "BookController"; + * $scope.params = $routeParams; + * }) + * + * .controller('ChapterController', function($scope, $routeParams) { + * $scope.name = "ChapterController"; + * $scope.params = $routeParams; + * }) + * + * .config(function($routeProvider, $locationProvider) { + * $routeProvider + * .when('/Book/:bookId', { + * templateUrl: 'book.html', + * controller: 'BookController', + * resolve: { + * // I will cause a 1 second delay + * delay: function($q, $timeout) { + * var delay = $q.defer(); + * $timeout(delay.resolve, 1000); + * return delay.promise; + * } + * } + * }) + * .when('/Book/:bookId/ch/:chapterId', { + * templateUrl: 'chapter.html', + * controller: 'ChapterController' + * }); + * + * // configure html5 to get links working on jsfiddle + * $locationProvider.html5Mode(true); + * }); + * + * + * + * + * it('should load and compile correct template', function() { + * element(by.linkText('Moby: Ch1')).click(); + * var content = element(by.css('[ng-view]')).getText(); + * expect(content).toMatch(/controller\: ChapterController/); + * expect(content).toMatch(/Book Id\: Moby/); + * expect(content).toMatch(/Chapter Id\: 1/); + * + * element(by.partialLinkText('Scarlet')).click(); + * + * content = element(by.css('[ng-view]')).getText(); + * expect(content).toMatch(/controller\: BookController/); + * expect(content).toMatch(/Book Id\: Scarlet/); + * }); + * + *
+ */ + + /** + * @ngdoc event + * @name $route#$routeChangeStart + * @eventType broadcast on root scope + * @description + * Broadcasted before a route change. At this point the route services starts + * resolving all of the dependencies needed for the route change to occur. + * Typically this involves fetching the view template as well as any dependencies + * defined in `resolve` route property. Once all of the dependencies are resolved + * `$routeChangeSuccess` is fired. + * + * @param {Object} angularEvent Synthetic event object. + * @param {Route} next Future route information. + * @param {Route} current Current route information. + */ + + /** + * @ngdoc event + * @name $route#$routeChangeSuccess + * @eventType broadcast on root scope + * @description + * Broadcasted after a route dependencies are resolved. + * {@link ngRoute.directive:ngView ngView} listens for the directive + * to instantiate the controller and render the view. + * + * @param {Object} angularEvent Synthetic event object. + * @param {Route} current Current route information. + * @param {Route|Undefined} previous Previous route information, or undefined if current is + * first route entered. + */ + + /** + * @ngdoc event + * @name $route#$routeChangeError + * @eventType broadcast on root scope + * @description + * Broadcasted if any of the resolve promises are rejected. + * + * @param {Object} angularEvent Synthetic event object + * @param {Route} current Current route information. + * @param {Route} previous Previous route information. + * @param {Route} rejection Rejection of the promise. Usually the error of the failed promise. + */ + + /** + * @ngdoc event + * @name $route#$routeUpdate + * @eventType broadcast on root scope + * @description + * + * The `reloadOnSearch` property has been set to false, and we are reusing the same + * instance of the Controller. + */ + + var forceReload = false, + $route = { + routes: routes, + + /** + * @ngdoc method + * @name $route#reload + * + * @description + * Causes `$route` service to reload the current route even if + * {@link ng.$location $location} hasn't changed. + * + * As a result of that, {@link ngRoute.directive:ngView ngView} + * creates new scope, reinstantiates the controller. + */ + reload: function() { + forceReload = true; + $rootScope.$evalAsync(updateRoute); + }, + + /** + * @ngdoc method + * @name $route#updateParams + * + * @description + * Causes `$route` service to update the current URL, replacing + * current route parameters with those specified in `newParams`. + * Provided property names that match the route's path segment + * definitions will be interpolated into the location's path, while + * remaining properties will be treated as query params. + * + * @param {Object} newParams mapping of URL parameter names to values + */ + updateParams: function(newParams) { + if (this.current && this.current.$$route) { + var searchParams = {}, self=this; + + angular.forEach(Object.keys(newParams), function(key) { + if (!self.current.pathParams[key]) searchParams[key] = newParams[key]; + }); + + newParams = angular.extend({}, this.current.params, newParams); + $location.path(interpolate(this.current.$$route.originalPath, newParams)); + $location.search(angular.extend({}, $location.search(), searchParams)); + } + else { + throw $routeMinErr('norout', 'Tried updating route when with no current route'); + } + } + }; + + $rootScope.$on('$locationChangeSuccess', updateRoute); + + return $route; + + ///////////////////////////////////////////////////// + + /** + * @param on {string} current url + * @param route {Object} route regexp to match the url against + * @return {?Object} + * + * @description + * Check if the route matches the current url. + * + * Inspired by match in + * visionmedia/express/lib/router/router.js. + */ + function switchRouteMatcher(on, route) { + var keys = route.keys, + params = {}; + + if (!route.regexp) return null; + + var m = route.regexp.exec(on); + if (!m) return null; + + for (var i = 1, len = m.length; i < len; ++i) { + var key = keys[i - 1]; + + var val = m[i]; + + if (key && val) { + params[key.name] = val; + } + } + return params; + } + + function updateRoute() { + var next = parseRoute(), + last = $route.current; + + if (next && last && next.$$route === last.$$route + && angular.equals(next.pathParams, last.pathParams) + && !next.reloadOnSearch && !forceReload) { + last.params = next.params; + angular.copy(last.params, $routeParams); + $rootScope.$broadcast('$routeUpdate', last); + } else if (next || last) { + forceReload = false; + $rootScope.$broadcast('$routeChangeStart', next, last); + $route.current = next; + if (next) { + if (next.redirectTo) { + if (angular.isString(next.redirectTo)) { + $location.path(interpolate(next.redirectTo, next.params)).search(next.params) + .replace(); + } else { + $location.url(next.redirectTo(next.pathParams, $location.path(), $location.search())) + .replace(); + } + } + } + + $q.when(next). + then(function() { + if (next) { + var locals = angular.extend({}, next.resolve), + template, templateUrl; + + angular.forEach(locals, function(value, key) { + locals[key] = angular.isString(value) ? + $injector.get(value) : $injector.invoke(value, null, null, key); + }); + + if (angular.isDefined(template = next.template)) { + if (angular.isFunction(template)) { + template = template(next.params); + } + } else if (angular.isDefined(templateUrl = next.templateUrl)) { + if (angular.isFunction(templateUrl)) { + templateUrl = templateUrl(next.params); + } + templateUrl = $sce.getTrustedResourceUrl(templateUrl); + if (angular.isDefined(templateUrl)) { + next.loadedTemplateUrl = templateUrl; + template = $templateRequest(templateUrl); + } + } + if (angular.isDefined(template)) { + locals['$template'] = template; + } + return $q.all(locals); + } + }). + // after route change + then(function(locals) { + if (next == $route.current) { + if (next) { + next.locals = locals; + angular.copy(next.params, $routeParams); + } + $rootScope.$broadcast('$routeChangeSuccess', next, last); + } + }, function(error) { + if (next == $route.current) { + $rootScope.$broadcast('$routeChangeError', next, last, error); + } + }); + } + } + + + /** + * @returns {Object} the current active route, by matching it against the URL + */ + function parseRoute() { + // Match a route + var params, match; + angular.forEach(routes, function(route, path) { + if (!match && (params = switchRouteMatcher($location.path(), route))) { + match = inherit(route, { + params: angular.extend({}, $location.search(), params), + pathParams: params}); + match.$$route = route; + } + }); + // No route matched; fallback to "otherwise" route + return match || routes[null] && inherit(routes[null], {params: {}, pathParams:{}}); + } + + /** + * @returns {string} interpolation of the redirect path with the parameters + */ + function interpolate(string, params) { + var result = []; + angular.forEach((string||'').split(':'), function(segment, i) { + if (i === 0) { + result.push(segment); + } else { + var segmentMatch = segment.match(/(\w+)(.*)/); + var key = segmentMatch[1]; + result.push(params[key]); + result.push(segmentMatch[2] || ''); + delete params[key]; + } + }); + return result.join(''); + } + }]; +} + +ngRouteModule.provider('$routeParams', $RouteParamsProvider); + + +/** + * @ngdoc service + * @name $routeParams + * @requires $route + * + * @description + * The `$routeParams` service allows you to retrieve the current set of route parameters. + * + * Requires the {@link ngRoute `ngRoute`} module to be installed. + * + * The route parameters are a combination of {@link ng.$location `$location`}'s + * {@link ng.$location#search `search()`} and {@link ng.$location#path `path()`}. + * The `path` parameters are extracted when the {@link ngRoute.$route `$route`} path is matched. + * + * In case of parameter name collision, `path` params take precedence over `search` params. + * + * The service guarantees that the identity of the `$routeParams` object will remain unchanged + * (but its properties will likely change) even when a route change occurs. + * + * Note that the `$routeParams` are only updated *after* a route change completes successfully. + * This means that you cannot rely on `$routeParams` being correct in route resolve functions. + * Instead you can use `$route.current.params` to access the new route's parameters. + * + * @example + * ```js + * // Given: + * // URL: http://server.com/index.html#/Chapter/1/Section/2?search=moby + * // Route: /Chapter/:chapterId/Section/:sectionId + * // + * // Then + * $routeParams ==> {chapterId:'1', sectionId:'2', search:'moby'} + * ``` + */ +function $RouteParamsProvider() { + this.$get = function() { return {}; }; +} + +ngRouteModule.directive('ngView', ngViewFactory); +ngRouteModule.directive('ngView', ngViewFillContentFactory); + + +/** + * @ngdoc directive + * @name ngView + * @restrict ECA + * + * @description + * # Overview + * `ngView` is a directive that complements the {@link ngRoute.$route $route} service by + * including the rendered template of the current route into the main layout (`index.html`) file. + * Every time the current route changes, the included view changes with it according to the + * configuration of the `$route` service. + * + * Requires the {@link ngRoute `ngRoute`} module to be installed. + * + * @animations + * enter - animation is used to bring new content into the browser. + * leave - animation is used to animate existing content away. + * + * The enter and leave animation occur concurrently. + * + * @scope + * @priority 400 + * @param {string=} onload Expression to evaluate whenever the view updates. + * + * @param {string=} autoscroll Whether `ngView` should call {@link ng.$anchorScroll + * $anchorScroll} to scroll the viewport after the view is updated. + * + * - If the attribute is not set, disable scrolling. + * - If the attribute is set without value, enable scrolling. + * - Otherwise enable scrolling only if the `autoscroll` attribute value evaluated + * as an expression yields a truthy value. + * @example + + +
+ Choose: + Moby | + Moby: Ch1 | + Gatsby | + Gatsby: Ch4 | + Scarlet Letter
+ +
+
+
+
+ +
$location.path() = {{main.$location.path()}}
+
$route.current.templateUrl = {{main.$route.current.templateUrl}}
+
$route.current.params = {{main.$route.current.params}}
+
$routeParams = {{main.$routeParams}}
+
+
+ + +
+ controller: {{book.name}}
+ Book Id: {{book.params.bookId}}
+
+
+ + +
+ controller: {{chapter.name}}
+ Book Id: {{chapter.params.bookId}}
+ Chapter Id: {{chapter.params.chapterId}} +
+
+ + + .view-animate-container { + position:relative; + height:100px!important; + position:relative; + background:white; + border:1px solid black; + height:40px; + overflow:hidden; + } + + .view-animate { + padding:10px; + } + + .view-animate.ng-enter, .view-animate.ng-leave { + -webkit-transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 1.5s; + transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 1.5s; + + display:block; + width:100%; + border-left:1px solid black; + + position:absolute; + top:0; + left:0; + right:0; + bottom:0; + padding:10px; + } + + .view-animate.ng-enter { + left:100%; + } + .view-animate.ng-enter.ng-enter-active { + left:0; + } + .view-animate.ng-leave.ng-leave-active { + left:-100%; + } + + + + angular.module('ngViewExample', ['ngRoute', 'ngAnimate']) + .config(['$routeProvider', '$locationProvider', + function($routeProvider, $locationProvider) { + $routeProvider + .when('/Book/:bookId', { + templateUrl: 'book.html', + controller: 'BookCtrl', + controllerAs: 'book' + }) + .when('/Book/:bookId/ch/:chapterId', { + templateUrl: 'chapter.html', + controller: 'ChapterCtrl', + controllerAs: 'chapter' + }); + + $locationProvider.html5Mode(true); + }]) + .controller('MainCtrl', ['$route', '$routeParams', '$location', + function($route, $routeParams, $location) { + this.$route = $route; + this.$location = $location; + this.$routeParams = $routeParams; + }]) + .controller('BookCtrl', ['$routeParams', function($routeParams) { + this.name = "BookCtrl"; + this.params = $routeParams; + }]) + .controller('ChapterCtrl', ['$routeParams', function($routeParams) { + this.name = "ChapterCtrl"; + this.params = $routeParams; + }]); + + + + + it('should load and compile correct template', function() { + element(by.linkText('Moby: Ch1')).click(); + var content = element(by.css('[ng-view]')).getText(); + expect(content).toMatch(/controller\: ChapterCtrl/); + expect(content).toMatch(/Book Id\: Moby/); + expect(content).toMatch(/Chapter Id\: 1/); + + element(by.partialLinkText('Scarlet')).click(); + + content = element(by.css('[ng-view]')).getText(); + expect(content).toMatch(/controller\: BookCtrl/); + expect(content).toMatch(/Book Id\: Scarlet/); + }); + +
+ */ + + +/** + * @ngdoc event + * @name ngView#$viewContentLoaded + * @eventType emit on the current ngView scope + * @description + * Emitted every time the ngView content is reloaded. + */ +ngViewFactory.$inject = ['$route', '$anchorScroll', '$animate']; +function ngViewFactory( $route, $anchorScroll, $animate) { + return { + restrict: 'ECA', + terminal: true, + priority: 400, + transclude: 'element', + link: function(scope, $element, attr, ctrl, $transclude) { + var currentScope, + currentElement, + previousElement, + autoScrollExp = attr.autoscroll, + onloadExp = attr.onload || ''; + + scope.$on('$routeChangeSuccess', update); + update(); + + function cleanupLastView() { + if(previousElement) { + previousElement.remove(); + previousElement = null; + } + if(currentScope) { + currentScope.$destroy(); + currentScope = null; + } + if(currentElement) { + $animate.leave(currentElement).then(function() { + previousElement = null; + }); + previousElement = currentElement; + currentElement = null; + } + } + + function update() { + var locals = $route.current && $route.current.locals, + template = locals && locals.$template; + + if (angular.isDefined(template)) { + var newScope = scope.$new(); + var current = $route.current; + + // Note: This will also link all children of ng-view that were contained in the original + // html. If that content contains controllers, ... they could pollute/change the scope. + // However, using ng-view on an element with additional content does not make sense... + // Note: We can't remove them in the cloneAttchFn of $transclude as that + // function is called before linking the content, which would apply child + // directives to non existing elements. + var clone = $transclude(newScope, function(clone) { + $animate.enter(clone, null, currentElement || $element).then(function onNgViewEnter () { + if (angular.isDefined(autoScrollExp) + && (!autoScrollExp || scope.$eval(autoScrollExp))) { + $anchorScroll(); + } + }); + cleanupLastView(); + }); + + currentElement = clone; + currentScope = current.scope = newScope; + currentScope.$emit('$viewContentLoaded'); + currentScope.$eval(onloadExp); + } else { + cleanupLastView(); + } + } + } + }; +} + +// This directive is called during the $transclude call of the first `ngView` directive. +// It will replace and compile the content of the element with the loaded template. +// We need this directive so that the element content is already filled when +// the link function of another directive on the same element as ngView +// is called. +ngViewFillContentFactory.$inject = ['$compile', '$controller', '$route']; +function ngViewFillContentFactory($compile, $controller, $route) { + return { + restrict: 'ECA', + priority: -400, + link: function(scope, $element) { + var current = $route.current, + locals = current.locals; + + $element.html(locals.$template); + + var link = $compile($element.contents()); + + if (current.controller) { + locals.$scope = scope; + var controller = $controller(current.controller, locals); + if (current.controllerAs) { + scope[current.controllerAs] = controller; + } + $element.data('$ngControllerController', controller); + $element.children().data('$ngControllerController', controller); + } + + link(scope); + } + }; +} + + +})(window, window.angular); diff --git a/1.3.0-rc.2/angular-route.min.js b/1.3.0-rc.2/angular-route.min.js new file mode 100644 index 0000000000..4c035642b0 --- /dev/null +++ b/1.3.0-rc.2/angular-route.min.js @@ -0,0 +1,14 @@ +/* + AngularJS v1.3.0-rc.2 + (c) 2010-2014 Google, Inc. http://angularjs.org + License: MIT +*/ +(function(r,d,z){'use strict';function v(s,h,f){return{restrict:"ECA",terminal:!0,priority:400,transclude:"element",link:function(a,e,b,g,u){function w(){k&&(k.remove(),k=null);l&&(l.$destroy(),l=null);n&&(f.leave(n).then(function(){k=null}),k=n,n=null)}function t(){var c=s.current&&s.current.locals;if(d.isDefined(c&&c.$template)){var c=a.$new(),m=s.current;n=u(c,function(c){f.enter(c,null,n||e).then(function(){!d.isDefined(p)||p&&!a.$eval(p)||h()});w()});l=m.scope=c;l.$emit("$viewContentLoaded"); +l.$eval(q)}else w()}var l,n,k,p=b.autoscroll,q=b.onload||"";a.$on("$routeChangeSuccess",t);t()}}}function x(d,h,f){return{restrict:"ECA",priority:-400,link:function(a,e){var b=f.current,g=b.locals;e.html(g.$template);var u=d(e.contents());b.controller&&(g.$scope=a,g=h(b.controller,g),b.controllerAs&&(a[b.controllerAs]=g),e.data("$ngControllerController",g),e.children().data("$ngControllerController",g));u(a)}}}r=d.module("ngRoute",["ng"]).provider("$route",function(){function s(a,e){return d.extend(new (d.extend(function(){}, +{prototype:a})),e)}function h(a,d){var b=d.caseInsensitiveMatch,g={originalPath:a,regexp:a},f=g.keys=[];a=a.replace(/([().])/g,"\\$1").replace(/(\/)?:(\w+)([\?\*])?/g,function(a,d,e,b){a="?"===b?b:null;b="*"===b?b:null;f.push({name:e,optional:!!a});d=d||"";return""+(a?"":d)+"(?:"+(a?d:"")+(b&&"(.+?)"||"([^/]+)")+(a||"")+")"+(a||"")}).replace(/([\/$\*])/g,"\\$1");g.regexp=new RegExp("^"+a+"$",b?"i":"");return g}var f={};this.when=function(a,e){f[a]=d.extend({reloadOnSearch:!0},e,a&&h(a,e));if(a){var b= +"/"==a[a.length-1]?a.substr(0,a.length-1):a+"/";f[b]=d.extend({redirectTo:a},h(b,e))}return this};this.otherwise=function(a){"string"===typeof a&&(a={redirectTo:a});this.when(null,a);return this};this.$get=["$rootScope","$location","$routeParams","$q","$injector","$templateRequest","$sce",function(a,e,b,g,h,r,t){function l(){var c=n(),m=q.current;if(c&&m&&c.$$route===m.$$route&&d.equals(c.pathParams,m.pathParams)&&!c.reloadOnSearch&&!p)m.params=c.params,d.copy(m.params,b),a.$broadcast("$routeUpdate", +m);else if(c||m)p=!1,a.$broadcast("$routeChangeStart",c,m),(q.current=c)&&c.redirectTo&&(d.isString(c.redirectTo)?e.path(k(c.redirectTo,c.params)).search(c.params).replace():e.url(c.redirectTo(c.pathParams,e.path(),e.search())).replace()),g.when(c).then(function(){if(c){var a=d.extend({},c.resolve),e,b;d.forEach(a,function(c,b){a[b]=d.isString(c)?h.get(c):h.invoke(c,null,null,b)});d.isDefined(e=c.template)?d.isFunction(e)&&(e=e(c.params)):d.isDefined(b=c.templateUrl)&&(d.isFunction(b)&&(b=b(c.params)), +b=t.getTrustedResourceUrl(b),d.isDefined(b)&&(c.loadedTemplateUrl=b,e=r(b)));d.isDefined(e)&&(a.$template=e);return g.all(a)}}).then(function(e){c==q.current&&(c&&(c.locals=e,d.copy(c.params,b)),a.$broadcast("$routeChangeSuccess",c,m))},function(d){c==q.current&&a.$broadcast("$routeChangeError",c,m,d)})}function n(){var c,a;d.forEach(f,function(b,g){var f;if(f=!a){var h=e.path();f=b.keys;var l={};if(b.regexp)if(h=b.regexp.exec(h)){for(var k=1,n=h.length;k + * + * See {@link ngSanitize.$sanitize `$sanitize`} for usage. + */ + +/* + * HTML Parser By Misko Hevery (misko@hevery.com) + * based on: HTML Parser By John Resig (ejohn.org) + * Original code by Erik Arvidsson, Mozilla Public License + * http://erik.eae.net/simplehtmlparser/simplehtmlparser.js + * + * // Use like so: + * htmlParser(htmlString, { + * start: function(tag, attrs, unary) {}, + * end: function(tag) {}, + * chars: function(text) {}, + * comment: function(text) {} + * }); + * + */ + + +/** + * @ngdoc service + * @name $sanitize + * @kind function + * + * @description + * The input is sanitized by parsing the html into tokens. All safe tokens (from a whitelist) are + * then serialized back to properly escaped html string. This means that no unsafe input can make + * it into the returned string, however, since our parser is more strict than a typical browser + * parser, it's possible that some obscure input, which would be recognized as valid HTML by a + * browser, won't make it through the sanitizer. + * The whitelist is configured using the functions `aHrefSanitizationWhitelist` and + * `imgSrcSanitizationWhitelist` of {@link ng.$compileProvider `$compileProvider`}. + * + * @param {string} html Html input. + * @returns {string} Sanitized html. + * + * @example + + + +
+ Snippet: + + + + + + + + + + + + + + + + + + + + + + + + + +
DirectiveHowSourceRendered
ng-bind-htmlAutomatically uses $sanitize
<div ng-bind-html="snippet">
</div>
ng-bind-htmlBypass $sanitize by explicitly trusting the dangerous value +
<div ng-bind-html="deliberatelyTrustDangerousSnippet()">
+</div>
+
ng-bindAutomatically escapes
<div ng-bind="snippet">
</div>
+
+
+ + it('should sanitize the html snippet by default', function() { + expect(element(by.css('#bind-html-with-sanitize div')).getInnerHtml()). + toBe('

an html\nclick here\nsnippet

'); + }); + + it('should inline raw snippet if bound to a trusted value', function() { + expect(element(by.css('#bind-html-with-trust div')).getInnerHtml()). + toBe("

an html\n" + + "click here\n" + + "snippet

"); + }); + + it('should escape snippet without any filter', function() { + expect(element(by.css('#bind-default div')).getInnerHtml()). + toBe("<p style=\"color:blue\">an html\n" + + "<em onmouseover=\"this.textContent='PWN3D!'\">click here</em>\n" + + "snippet</p>"); + }); + + it('should update', function() { + element(by.model('snippet')).clear(); + element(by.model('snippet')).sendKeys('new text'); + expect(element(by.css('#bind-html-with-sanitize div')).getInnerHtml()). + toBe('new text'); + expect(element(by.css('#bind-html-with-trust div')).getInnerHtml()).toBe( + 'new text'); + expect(element(by.css('#bind-default div')).getInnerHtml()).toBe( + "new <b onclick=\"alert(1)\">text</b>"); + }); +
+
+ */ +function $SanitizeProvider() { + this.$get = ['$$sanitizeUri', function($$sanitizeUri) { + return function(html) { + var buf = []; + htmlParser(html, htmlSanitizeWriter(buf, function(uri, isImage) { + return !/^unsafe/.test($$sanitizeUri(uri, isImage)); + })); + return buf.join(''); + }; + }]; +} + +function sanitizeText(chars) { + var buf = []; + var writer = htmlSanitizeWriter(buf, angular.noop); + writer.chars(chars); + return buf.join(''); +} + + +// Regular Expressions for parsing tags and attributes +var START_TAG_REGEXP = + /^<((?:[a-zA-Z])[\w:-]*)((?:\s+[\w:-]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)\s*(>?)/, + END_TAG_REGEXP = /^<\/\s*([\w:-]+)[^>]*>/, + ATTR_REGEXP = /([\w:-]+)(?:\s*=\s*(?:(?:"((?:[^"])*)")|(?:'((?:[^'])*)')|([^>\s]+)))?/g, + BEGIN_TAG_REGEXP = /^/g, + DOCTYPE_REGEXP = /]*?)>/i, + CDATA_REGEXP = //g, + SURROGATE_PAIR_REGEXP = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g, + // Match everything outside of normal chars and " (quote character) + NON_ALPHANUMERIC_REGEXP = /([^\#-~| |!])/g; + + +// Good source of info about elements and attributes +// http://dev.w3.org/html5/spec/Overview.html#semantics +// http://simon.html5.org/html-elements + +// Safe Void Elements - HTML5 +// http://dev.w3.org/html5/spec/Overview.html#void-elements +var voidElements = makeMap("area,br,col,hr,img,wbr"); + +// Elements that you can, intentionally, leave open (and which close themselves) +// http://dev.w3.org/html5/spec/Overview.html#optional-tags +var optionalEndTagBlockElements = makeMap("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"), + optionalEndTagInlineElements = makeMap("rp,rt"), + optionalEndTagElements = angular.extend({}, + optionalEndTagInlineElements, + optionalEndTagBlockElements); + +// Safe Block Elements - HTML5 +var blockElements = angular.extend({}, optionalEndTagBlockElements, makeMap("address,article," + + "aside,blockquote,caption,center,del,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5," + + "h6,header,hgroup,hr,ins,map,menu,nav,ol,pre,script,section,table,ul")); + +// Inline Elements - HTML5 +var inlineElements = angular.extend({}, optionalEndTagInlineElements, makeMap("a,abbr,acronym,b," + + "bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,q,ruby,rp,rt,s," + + "samp,small,span,strike,strong,sub,sup,time,tt,u,var")); + + +// Special Elements (can contain anything) +var specialElements = makeMap("script,style"); + +var validElements = angular.extend({}, + voidElements, + blockElements, + inlineElements, + optionalEndTagElements); + +//Attributes that have href and hence need to be sanitized +var uriAttrs = makeMap("background,cite,href,longdesc,src,usemap"); +var validAttrs = angular.extend({}, uriAttrs, makeMap( + 'abbr,align,alt,axis,bgcolor,border,cellpadding,cellspacing,class,clear,'+ + 'color,cols,colspan,compact,coords,dir,face,headers,height,hreflang,hspace,'+ + 'ismap,lang,language,nohref,nowrap,rel,rev,rows,rowspan,rules,'+ + 'scope,scrolling,shape,size,span,start,summary,target,title,type,'+ + 'valign,value,vspace,width')); + +function makeMap(str) { + var obj = {}, items = str.split(','), i; + for (i = 0; i < items.length; i++) obj[items[i]] = true; + return obj; +} + + +/** + * @example + * htmlParser(htmlString, { + * start: function(tag, attrs, unary) {}, + * end: function(tag) {}, + * chars: function(text) {}, + * comment: function(text) {} + * }); + * + * @param {string} html string + * @param {object} handler + */ +function htmlParser( html, handler ) { + if (typeof html !== 'string') { + if (html === null || typeof html === 'undefined') { + html = ''; + } else { + html = '' + html; + } + } + var index, chars, match, stack = [], last = html, text; + stack.last = function() { return stack[ stack.length - 1 ]; }; + + while ( html ) { + text = ''; + chars = true; + + // Make sure we're not in a script or style element + if ( !stack.last() || !specialElements[ stack.last() ] ) { + + // Comment + if ( html.indexOf("", index) === index) { + if (handler.comment) handler.comment( html.substring( 4, index ) ); + html = html.substring( index + 3 ); + chars = false; + } + // DOCTYPE + } else if ( DOCTYPE_REGEXP.test(html) ) { + match = html.match( DOCTYPE_REGEXP ); + + if ( match ) { + html = html.replace( match[0], ''); + chars = false; + } + // end tag + } else if ( BEGING_END_TAGE_REGEXP.test(html) ) { + match = html.match( END_TAG_REGEXP ); + + if ( match ) { + html = html.substring( match[0].length ); + match[0].replace( END_TAG_REGEXP, parseEndTag ); + chars = false; + } + + // start tag + } else if ( BEGIN_TAG_REGEXP.test(html) ) { + match = html.match( START_TAG_REGEXP ); + + if ( match ) { + // We only have a valid start-tag if there is a '>'. + if ( match[4] ) { + html = html.substring( match[0].length ); + match[0].replace( START_TAG_REGEXP, parseStartTag ); + } + chars = false; + } else { + // no ending tag found --- this piece should be encoded as an entity. + text += '<'; + html = html.substring(1); + } + } + + if ( chars ) { + index = html.indexOf("<"); + + text += index < 0 ? html : html.substring( 0, index ); + html = index < 0 ? "" : html.substring( index ); + + if (handler.chars) handler.chars( decodeEntities(text) ); + } + + } else { + html = html.replace(new RegExp("(.*)<\\s*\\/\\s*" + stack.last() + "[^>]*>", 'i'), + function(all, text){ + text = text.replace(COMMENT_REGEXP, "$1").replace(CDATA_REGEXP, "$1"); + + if (handler.chars) handler.chars( decodeEntities(text) ); + + return ""; + }); + + parseEndTag( "", stack.last() ); + } + + if ( html == last ) { + throw $sanitizeMinErr('badparse', "The sanitizer was unable to parse the following block " + + "of html: {0}", html); + } + last = html; + } + + // Clean up any remaining tags + parseEndTag(); + + function parseStartTag( tag, tagName, rest, unary ) { + tagName = angular.lowercase(tagName); + if ( blockElements[ tagName ] ) { + while ( stack.last() && inlineElements[ stack.last() ] ) { + parseEndTag( "", stack.last() ); + } + } + + if ( optionalEndTagElements[ tagName ] && stack.last() == tagName ) { + parseEndTag( "", tagName ); + } + + unary = voidElements[ tagName ] || !!unary; + + if ( !unary ) + stack.push( tagName ); + + var attrs = {}; + + rest.replace(ATTR_REGEXP, + function(match, name, doubleQuotedValue, singleQuotedValue, unquotedValue) { + var value = doubleQuotedValue + || singleQuotedValue + || unquotedValue + || ''; + + attrs[name] = decodeEntities(value); + }); + if (handler.start) handler.start( tagName, attrs, unary ); + } + + function parseEndTag( tag, tagName ) { + var pos = 0, i; + tagName = angular.lowercase(tagName); + if ( tagName ) + // Find the closest opened tag of the same type + for ( pos = stack.length - 1; pos >= 0; pos-- ) + if ( stack[ pos ] == tagName ) + break; + + if ( pos >= 0 ) { + // Close all the open elements, up the stack + for ( i = stack.length - 1; i >= pos; i-- ) + if (handler.end) handler.end( stack[ i ] ); + + // Remove the open elements from the stack + stack.length = pos; + } + } +} + +var hiddenPre=document.createElement("pre"); +var spaceRe = /^(\s*)([\s\S]*?)(\s*)$/; +/** + * decodes all entities into regular string + * @param value + * @returns {string} A string with decoded entities. + */ +function decodeEntities(value) { + if (!value) { return ''; } + + // Note: IE8 does not preserve spaces at the start/end of innerHTML + // so we must capture them and reattach them afterward + var parts = spaceRe.exec(value); + var spaceBefore = parts[1]; + var spaceAfter = parts[3]; + var content = parts[2]; + if (content) { + hiddenPre.innerHTML=content.replace(//g, '>'); +} + +/** + * create an HTML/XML writer which writes to buffer + * @param {Array} buf use buf.jain('') to get out sanitized html string + * @returns {object} in the form of { + * start: function(tag, attrs, unary) {}, + * end: function(tag) {}, + * chars: function(text) {}, + * comment: function(text) {} + * } + */ +function htmlSanitizeWriter(buf, uriValidator){ + var ignore = false; + var out = angular.bind(buf, buf.push); + return { + start: function(tag, attrs, unary){ + tag = angular.lowercase(tag); + if (!ignore && specialElements[tag]) { + ignore = tag; + } + if (!ignore && validElements[tag] === true) { + out('<'); + out(tag); + angular.forEach(attrs, function(value, key){ + var lkey=angular.lowercase(key); + var isImage = (tag === 'img' && lkey === 'src') || (lkey === 'background'); + if (validAttrs[lkey] === true && + (uriAttrs[lkey] !== true || uriValidator(value, isImage))) { + out(' '); + out(key); + out('="'); + out(encodeEntities(value)); + out('"'); + } + }); + out(unary ? '/>' : '>'); + } + }, + end: function(tag){ + tag = angular.lowercase(tag); + if (!ignore && validElements[tag] === true) { + out(''); + } + if (tag == ignore) { + ignore = false; + } + }, + chars: function(chars){ + if (!ignore) { + out(encodeEntities(chars)); + } + } + }; +} + + +// define ngSanitize module and register $sanitize service +angular.module('ngSanitize', []).provider('$sanitize', $SanitizeProvider); + +/* global sanitizeText: false */ + +/** + * @ngdoc filter + * @name linky + * @kind function + * + * @description + * Finds links in text input and turns them into html links. Supports http/https/ftp/mailto and + * plain email address links. + * + * Requires the {@link ngSanitize `ngSanitize`} module to be installed. + * + * @param {string} text Input text. + * @param {string} target Window (_blank|_self|_parent|_top) or named frame to open links in. + * @returns {string} Html-linkified text. + * + * @usage + + * + * @example + + + +
+ Snippet: + + + + + + + + + + + + + + + + + + + + + +
FilterSourceRendered
linky filter +
<div ng-bind-html="snippet | linky">
</div>
+
+
+
linky target +
<div ng-bind-html="snippetWithTarget | linky:'_blank'">
</div>
+
+
+
no filter
<div ng-bind="snippet">
</div>
+ + + it('should linkify the snippet with urls', function() { + expect(element(by.id('linky-filter')).element(by.binding('snippet | linky')).getText()). + toBe('Pretty text with some links: http://angularjs.org/, us@somewhere.org, ' + + 'another@somewhere.org, and one more: ftp://127.0.0.1/.'); + expect(element.all(by.css('#linky-filter a')).count()).toEqual(4); + }); + + it('should not linkify snippet without the linky filter', function() { + expect(element(by.id('escaped-html')).element(by.binding('snippet')).getText()). + toBe('Pretty text with some links: http://angularjs.org/, mailto:us@somewhere.org, ' + + 'another@somewhere.org, and one more: ftp://127.0.0.1/.'); + expect(element.all(by.css('#escaped-html a')).count()).toEqual(0); + }); + + it('should update', function() { + element(by.model('snippet')).clear(); + element(by.model('snippet')).sendKeys('new http://link.'); + expect(element(by.id('linky-filter')).element(by.binding('snippet | linky')).getText()). + toBe('new http://link.'); + expect(element.all(by.css('#linky-filter a')).count()).toEqual(1); + expect(element(by.id('escaped-html')).element(by.binding('snippet')).getText()) + .toBe('new http://link.'); + }); + + it('should work with the target property', function() { + expect(element(by.id('linky-target')). + element(by.binding("snippetWithTarget | linky:'_blank'")).getText()). + toBe('http://angularjs.org/'); + expect(element(by.css('#linky-target a')).getAttribute('target')).toEqual('_blank'); + }); + + + */ +angular.module('ngSanitize').filter('linky', ['$sanitize', function($sanitize) { + var LINKY_URL_REGEXP = + /((ftp|https?):\/\/|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s.;,(){}<>"]/, + MAILTO_REGEXP = /^mailto:/; + + return function(text, target) { + if (!text) return text; + var match; + var raw = text; + var html = []; + var url; + var i; + while ((match = raw.match(LINKY_URL_REGEXP))) { + // We can not end in these as they are sometimes found at the end of the sentence + url = match[0]; + // if we did not match ftp/http/mailto then assume mailto + if (match[2] == match[3]) url = 'mailto:' + url; + i = match.index; + addText(raw.substr(0, i)); + addLink(url, match[0].replace(MAILTO_REGEXP, '')); + raw = raw.substring(i + match[0].length); + } + addText(raw); + return $sanitize(html.join('')); + + function addText(text) { + if (!text) { + return; + } + html.push(sanitizeText(text)); + } + + function addLink(url, text) { + html.push(''); + addText(text); + html.push(''); + } + }; +}]); + + +})(window, window.angular); diff --git a/1.3.0-rc.2/angular-sanitize.min.js b/1.3.0-rc.2/angular-sanitize.min.js new file mode 100644 index 0000000000..fa77079122 --- /dev/null +++ b/1.3.0-rc.2/angular-sanitize.min.js @@ -0,0 +1,15 @@ +/* + AngularJS v1.3.0-rc.2 + (c) 2010-2014 Google, Inc. http://angularjs.org + License: MIT +*/ +(function(q,g,r){'use strict';function F(a){var d=[];t(d,g.noop).chars(a);return d.join("")}function m(a){var d={};a=a.split(",");var c;for(c=0;c=c;e--)d.end&&d.end(f[e]);f.length=c}}"string"!==typeof a&&(a=null===a||"undefined"===typeof a?"":""+a);var b,l,f=[],n=a,h;for(f.last=function(){return f[f.length-1]};a;){h="";l=!0;if(f.last()&&y[f.last()])a=a.replace(new RegExp("(.*)<\\s*\\/\\s*"+f.last()+"[^>]*>","i"),function(a,b){b=b.replace(I,"$1").replace(J,"$1");d.chars&&d.chars(s(b));return""}),e("",f.last());else{if(0===a.indexOf("\x3c!--"))b=a.indexOf("--",4),0<=b&&a.lastIndexOf("--\x3e",b)===b&&(d.comment&&d.comment(a.substring(4, +b)),a=a.substring(b+3),l=!1);else if(z.test(a)){if(b=a.match(z))a=a.replace(b[0],""),l=!1}else if(K.test(a)){if(b=a.match(A))a=a.substring(b[0].length),b[0].replace(A,e),l=!1}else L.test(a)&&((b=a.match(B))?(b[4]&&(a=a.substring(b[0].length),b[0].replace(B,c)),l=!1):(h+="<",a=a.substring(1)));l&&(b=a.indexOf("<"),h+=0>b?a:a.substring(0,b),a=0>b?"":a.substring(b),d.chars&&d.chars(s(h)))}if(a==n)throw M("badparse",a);n=a}e()}function s(a){if(!a)return"";var d=N.exec(a);a=d[1];var c=d[3];if(d=d[2])p.innerHTML= +d.replace(//g,">")}function t(a,d){var c=!1,e=g.bind(a,a.push);return{start:function(a,l,f){a=g.lowercase(a);!c&&y[a]&&(c=a);c||!0!==D[a]||(e("<"),e(a),g.forEach(l,function(c,f){var k= +g.lowercase(f),l="img"===a&&"src"===k||"background"===k;!0!==Q[k]||!0===E[k]&&!d(c,l)||(e(" "),e(f),e('="'),e(C(c)),e('"'))}),e(f?"/>":">"))},end:function(a){a=g.lowercase(a);c||!0!==D[a]||(e(""));a==c&&(c=!1)},chars:function(a){c||e(C(a))}}}var M=g.$$minErr("$sanitize"),B=/^<((?:[a-zA-Z])[\w:-]*)((?:\s+[\w:-]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)\s*(>?)/,A=/^<\/\s*([\w:-]+)[^>]*>/,H=/([\w:-]+)(?:\s*=\s*(?:(?:"((?:[^"])*)")|(?:'((?:[^'])*)')|([^>\s]+)))?/g,L=/^]*?)>/i,J=/"]/,c=/^mailto:/;return function(e,b){function l(a){a&&k.push(F(a))}function f(a,c){k.push("');l(c);k.push("")} +if(!e)return e;for(var n,h=e,k=[],m,p;n=h.match(d);)m=n[0],n[2]==n[3]&&(m="mailto:"+m),p=n.index,l(h.substr(0,p)),f(m,n[0].replace(c,"")),h=h.substring(p+n[0].length);l(h);return a(k.join(""))}}])})(window,window.angular); +//# sourceMappingURL=angular-sanitize.min.js.map diff --git a/1.3.0-rc.2/angular-sanitize.min.js.map b/1.3.0-rc.2/angular-sanitize.min.js.map new file mode 100644 index 0000000000..d06fa28037 --- /dev/null +++ b/1.3.0-rc.2/angular-sanitize.min.js.map @@ -0,0 +1,8 @@ +{ +"version":3, +"file":"angular-sanitize.min.js", +"lineCount":14, +"mappings":"A;;;;;aAKC,SAAQ,CAACA,CAAD,CAASC,CAAT,CAAkBC,CAAlB,CAA6B,CAkJtCC,QAASA,EAAY,CAACC,CAAD,CAAQ,CAC3B,IAAIC,EAAM,EACGC,EAAAC,CAAmBF,CAAnBE,CAAwBN,CAAAO,KAAxBD,CACbH,MAAA,CAAaA,CAAb,CACA,OAAOC,EAAAI,KAAA,CAAS,EAAT,CAJoB,CAoE7BC,QAASA,EAAO,CAACC,CAAD,CAAM,CAAA,IAChBC,EAAM,EAAIC,EAAAA,CAAQF,CAAAG,MAAA,CAAU,GAAV,CAAtB,KAAsCC,CACtC,KAAKA,CAAL,CAAS,CAAT,CAAYA,CAAZ,CAAgBF,CAAAG,OAAhB,CAA8BD,CAAA,EAA9B,CAAmCH,CAAA,CAAIC,CAAA,CAAME,CAAN,CAAJ,CAAA,CAAgB,CAAA,CACnD,OAAOH,EAHa,CAmBtBK,QAASA,EAAU,CAAEC,CAAF,CAAQC,CAAR,CAAkB,CAgGnCC,QAASA,EAAa,CAAEC,CAAF,CAAOC,CAAP,CAAgBC,CAAhB,CAAsBC,CAAtB,CAA8B,CAClDF,CAAA,CAAUrB,CAAAwB,UAAA,CAAkBH,CAAlB,CACV,IAAKI,CAAA,CAAeJ,CAAf,CAAL,CACE,IAAA,CAAQK,CAAAC,KAAA,EAAR,EAAwBC,CAAA,CAAgBF,CAAAC,KAAA,EAAhB,CAAxB,CAAA,CACEE,CAAA,CAAa,EAAb,CAAiBH,CAAAC,KAAA,EAAjB,CAICG,EAAA,CAAwBT,CAAxB,CAAL,EAA0CK,CAAAC,KAAA,EAA1C,EAA0DN,CAA1D,EACEQ,CAAA,CAAa,EAAb,CAAiBR,CAAjB,CAKF,EAFAE,CAEA,CAFQQ,CAAA,CAAcV,CAAd,CAER,EAFmC,CAAEE,CAAAA,CAErC,GACEG,CAAAM,KAAA,CAAYX,CAAZ,CAEF,KAAIY,EAAQ,EAEZX,EAAAY,QAAA,CAAaC,CAAb,CACE,QAAQ,CAACC,CAAD,CAAQC,CAAR,CAAcC,CAAd,CAAiCC,CAAjC,CAAoDC,CAApD,CAAmE,CAMzEP,CAAA,CAAMI,CAAN,CAAA,CAAcI,CAAA,CALFH,CAKE,EAJTC,CAIS,EAHTC,CAGS,EAFT,EAES,CAN2D,CAD7E,CASItB,EAAAwB,MAAJ,EAAmBxB,CAAAwB,MAAA,CAAerB,CAAf,CAAwBY,CAAxB,CAA+BV,CAA/B,CA5B+B,CA+BpDM,QAASA,EAAW,CAAET,CAAF,CAAOC,CAAP,CAAiB,CAAA,IAC/BsB,EAAM,CADyB,CACtB7B,CAEb,IADAO,CACA,CADUrB,CAAAwB,UAAA,CAAkBH,CAAlB,CACV,CAEE,IAAMsB,CAAN,CAAYjB,CAAAX,OAAZ,CAA2B,CAA3B,CAAqC,CAArC,EAA8B4B,CAA9B,EACOjB,CAAA,CAAOiB,CAAP,CADP,EACuBtB,CADvB,CAAwCsB,CAAA,EAAxC;AAIF,GAAY,CAAZ,EAAKA,CAAL,CAAgB,CAEd,IAAM7B,CAAN,CAAUY,CAAAX,OAAV,CAAyB,CAAzB,CAA4BD,CAA5B,EAAiC6B,CAAjC,CAAsC7B,CAAA,EAAtC,CACMI,CAAA0B,IAAJ,EAAiB1B,CAAA0B,IAAA,CAAalB,CAAA,CAAOZ,CAAP,CAAb,CAGnBY,EAAAX,OAAA,CAAe4B,CAND,CATmB,CA9HjB,QAApB,GAAI,MAAO1B,EAAX,GAEIA,CAFJ,CACe,IAAb,GAAIA,CAAJ,EAAqC,WAArC,GAAqB,MAAOA,EAA5B,CACS,EADT,CAGS,EAHT,CAGcA,CAJhB,CADmC,KAQ/B4B,CAR+B,CAQxB1C,CARwB,CAQVuB,EAAQ,EARE,CAQEC,EAAOV,CART,CAQe6B,CAGlD,KAFApB,CAAAC,KAEA,CAFaoB,QAAQ,EAAG,CAAE,MAAOrB,EAAA,CAAOA,CAAAX,OAAP,CAAsB,CAAtB,CAAT,CAExB,CAAQE,CAAR,CAAA,CAAe,CACb6B,CAAA,CAAO,EACP3C,EAAA,CAAQ,CAAA,CAGR,IAAMuB,CAAAC,KAAA,EAAN,EAAuBqB,CAAA,CAAiBtB,CAAAC,KAAA,EAAjB,CAAvB,CA0DEV,CASA,CATOA,CAAAiB,QAAA,CAAa,IAAIe,MAAJ,CAAW,kBAAX,CAAgCvB,CAAAC,KAAA,EAAhC,CAA+C,QAA/C,CAAyD,GAAzD,CAAb,CACL,QAAQ,CAACuB,CAAD,CAAMJ,CAAN,CAAW,CACjBA,CAAA,CAAOA,CAAAZ,QAAA,CAAaiB,CAAb,CAA6B,IAA7B,CAAAjB,QAAA,CAA2CkB,CAA3C,CAAyD,IAAzD,CAEHlC,EAAAf,MAAJ,EAAmBe,CAAAf,MAAA,CAAesC,CAAA,CAAeK,CAAf,CAAf,CAEnB,OAAO,EALU,CADd,CASP,CAAAjB,CAAA,CAAa,EAAb,CAAiBH,CAAAC,KAAA,EAAjB,CAnEF,KAAyD,CAGvD,GAA8B,CAA9B,GAAKV,CAAAoC,QAAA,CAAa,SAAb,CAAL,CAEER,CAEA,CAFQ5B,CAAAoC,QAAA,CAAa,IAAb,CAAmB,CAAnB,CAER,CAAc,CAAd,EAAKR,CAAL,EAAmB5B,CAAAqC,YAAA,CAAiB,QAAjB,CAAwBT,CAAxB,CAAnB,GAAsDA,CAAtD,GACM3B,CAAAqC,QAEJ,EAFqBrC,CAAAqC,QAAA,CAAiBtC,CAAAuC,UAAA,CAAgB,CAAhB;AAAmBX,CAAnB,CAAjB,CAErB,CADA5B,CACA,CADOA,CAAAuC,UAAA,CAAgBX,CAAhB,CAAwB,CAAxB,CACP,CAAA1C,CAAA,CAAQ,CAAA,CAHV,CAJF,KAUO,IAAKsD,CAAAC,KAAA,CAAoBzC,CAApB,CAAL,CAGL,IAFAmB,CAEA,CAFQnB,CAAAmB,MAAA,CAAYqB,CAAZ,CAER,CACExC,CACA,CADOA,CAAAiB,QAAA,CAAcE,CAAA,CAAM,CAAN,CAAd,CAAwB,EAAxB,CACP,CAAAjC,CAAA,CAAQ,CAAA,CAFV,CAHK,IAQA,IAAKwD,CAAAD,KAAA,CAA4BzC,CAA5B,CAAL,CAGL,IAFAmB,CAEA,CAFQnB,CAAAmB,MAAA,CAAYwB,CAAZ,CAER,CACE3C,CAEA,CAFOA,CAAAuC,UAAA,CAAgBpB,CAAA,CAAM,CAAN,CAAArB,OAAhB,CAEP,CADAqB,CAAA,CAAM,CAAN,CAAAF,QAAA,CAAkB0B,CAAlB,CAAkC/B,CAAlC,CACA,CAAA1B,CAAA,CAAQ,CAAA,CAHV,CAHK,IAUK0D,EAAAH,KAAA,CAAsBzC,CAAtB,CAAL,GAGL,CAFAmB,CAEA,CAFQnB,CAAAmB,MAAA,CAAY0B,CAAZ,CAER,GAEO1B,CAAA,CAAM,CAAN,CAIL,GAHEnB,CACA,CADOA,CAAAuC,UAAA,CAAgBpB,CAAA,CAAM,CAAN,CAAArB,OAAhB,CACP,CAAAqB,CAAA,CAAM,CAAN,CAAAF,QAAA,CAAkB4B,CAAlB,CAAoC3C,CAApC,CAEF,EAAAhB,CAAA,CAAQ,CAAA,CANV,GASE2C,CACA,EADQ,GACR,CAAA7B,CAAA,CAAOA,CAAAuC,UAAA,CAAe,CAAf,CAVT,CAHK,CAiBFrD,EAAL,GACE0C,CAKA,CALQ5B,CAAAoC,QAAA,CAAa,GAAb,CAKR,CAHAP,CAGA,EAHgB,CAAR,CAAAD,CAAA,CAAY5B,CAAZ,CAAmBA,CAAAuC,UAAA,CAAgB,CAAhB,CAAmBX,CAAnB,CAG3B,CAFA5B,CAEA,CAFe,CAAR,CAAA4B,CAAA,CAAY,EAAZ,CAAiB5B,CAAAuC,UAAA,CAAgBX,CAAhB,CAExB,CAAI3B,CAAAf,MAAJ,EAAmBe,CAAAf,MAAA,CAAesC,CAAA,CAAeK,CAAf,CAAf,CANrB,CAhDuD,CAsEzD,GAAK7B,CAAL,EAAaU,CAAb,CACE,KAAMoC,EAAA,CAAgB,UAAhB,CAC4C9C,CAD5C,CAAN,CAGFU,CAAA,CAAOV,CA/EM,CAmFfY,CAAA,EA9FmC,CA0JrCY,QAASA,EAAc,CAACuB,CAAD,CAAQ,CAC7B,GAAKA,CAAAA,CAAL,CAAc,MAAO,EAIrB,KAAIC,EAAQC,CAAAC,KAAA,CAAaH,CAAb,CACRI,EAAAA,CAAcH,CAAA,CAAM,CAAN,CAClB,KAAII,EAAaJ,CAAA,CAAM,CAAN,CAEjB,IADIK,CACJ,CADcL,CAAA,CAAM,CAAN,CACd,CACEM,CAAAC,UAKA;AALoBF,CAAApC,QAAA,CAAgB,IAAhB,CAAqB,MAArB,CAKpB,CAAAoC,CAAA,CAAU,aAAA,EAAiBC,EAAjB,CACRA,CAAAE,YADQ,CACgBF,CAAAG,UAE5B,OAAON,EAAP,CAAqBE,CAArB,CAA+BD,CAlBF,CA4B/BM,QAASA,EAAc,CAACX,CAAD,CAAQ,CAC7B,MAAOA,EAAA9B,QAAA,CACG,IADH,CACS,OADT,CAAAA,QAAA,CAEG0C,CAFH,CAE0B,QAAS,CAACZ,CAAD,CAAQ,CAC9C,IAAIa,EAAKb,CAAAc,WAAA,CAAiB,CAAjB,CACLC,EAAAA,CAAMf,CAAAc,WAAA,CAAiB,CAAjB,CACV,OAAO,IAAP,EAAgC,IAAhC,EAAiBD,CAAjB,CAAsB,KAAtB,GAA0CE,CAA1C,CAAgD,KAAhD,EAA0D,KAA1D,EAAqE,GAHvB,CAF3C,CAAA7C,QAAA,CAOG8C,CAPH,CAO4B,QAAQ,CAAChB,CAAD,CAAO,CAC9C,MAAO,IAAP,CAAcA,CAAAc,WAAA,CAAiB,CAAjB,CAAd,CAAoC,GADU,CAP3C,CAAA5C,QAAA,CAUG,IAVH,CAUS,MAVT,CAAAA,QAAA,CAWG,IAXH,CAWS,MAXT,CADsB,CAyB/B7B,QAASA,EAAkB,CAACD,CAAD,CAAM6E,CAAN,CAAmB,CAC5C,IAAIC,EAAS,CAAA,CAAb,CACIC,EAAMnF,CAAAoF,KAAA,CAAahF,CAAb,CAAkBA,CAAA4B,KAAlB,CACV,OAAO,CACLU,MAAOA,QAAQ,CAACtB,CAAD,CAAMa,CAAN,CAAaV,CAAb,CAAmB,CAChCH,CAAA,CAAMpB,CAAAwB,UAAA,CAAkBJ,CAAlB,CACD8D,EAAAA,CAAL,EAAelC,CAAA,CAAgB5B,CAAhB,CAAf,GACE8D,CADF,CACW9D,CADX,CAGK8D,EAAL,EAAsC,CAAA,CAAtC,GAAeG,CAAA,CAAcjE,CAAd,CAAf,GACE+D,CAAA,CAAI,GAAJ,CAcA,CAbAA,CAAA,CAAI/D,CAAJ,CAaA,CAZApB,CAAAsF,QAAA,CAAgBrD,CAAhB,CAAuB,QAAQ,CAAC+B,CAAD,CAAQuB,CAAR,CAAY,CACzC,IAAIC;AAAKxF,CAAAwB,UAAA,CAAkB+D,CAAlB,CAAT,CACIE,EAAmB,KAAnBA,GAAWrE,CAAXqE,EAAqC,KAArCA,GAA4BD,CAA5BC,EAAyD,YAAzDA,GAAgDD,CAC3B,EAAA,CAAzB,GAAIE,CAAA,CAAWF,CAAX,CAAJ,EACsB,CAAA,CADtB,GACGG,CAAA,CAASH,CAAT,CADH,EAC8B,CAAAP,CAAA,CAAajB,CAAb,CAAoByB,CAApB,CAD9B,GAEEN,CAAA,CAAI,GAAJ,CAIA,CAHAA,CAAA,CAAII,CAAJ,CAGA,CAFAJ,CAAA,CAAI,IAAJ,CAEA,CADAA,CAAA,CAAIR,CAAA,CAAeX,CAAf,CAAJ,CACA,CAAAmB,CAAA,CAAI,GAAJ,CANF,CAHyC,CAA3C,CAYA,CAAAA,CAAA,CAAI5D,CAAA,CAAQ,IAAR,CAAe,GAAnB,CAfF,CALgC,CAD7B,CAwBLqB,IAAKA,QAAQ,CAACxB,CAAD,CAAK,CACdA,CAAA,CAAMpB,CAAAwB,UAAA,CAAkBJ,CAAlB,CACD8D,EAAL,EAAsC,CAAA,CAAtC,GAAeG,CAAA,CAAcjE,CAAd,CAAf,GACE+D,CAAA,CAAI,IAAJ,CAEA,CADAA,CAAA,CAAI/D,CAAJ,CACA,CAAA+D,CAAA,CAAI,GAAJ,CAHF,CAKI/D,EAAJ,EAAW8D,CAAX,GACEA,CADF,CACW,CAAA,CADX,CAPc,CAxBb,CAmCL/E,MAAOA,QAAQ,CAACA,CAAD,CAAO,CACb+E,CAAL,EACEC,CAAA,CAAIR,CAAA,CAAexE,CAAf,CAAJ,CAFgB,CAnCjB,CAHqC,CAtb9C,IAAI4D,EAAkB/D,CAAA4F,SAAA,CAAiB,WAAjB,CAAtB,CAyJI9B,EACG,wGA1JP,CA2JEF,EAAiB,wBA3JnB,CA4JEzB,EAAc,yEA5JhB,CA6JE0B,EAAmB,IA7JrB;AA8JEF,EAAyB,MA9J3B,CA+JER,EAAiB,qBA/JnB,CAgKEM,EAAiB,qBAhKnB,CAiKEL,EAAe,yBAjKjB,CAkKEwB,EAAwB,iCAlK1B,CAoKEI,EAA0B,gBApK5B,CA6KIjD,EAAetB,CAAA,CAAQ,wBAAR,CAIfoF,EAAAA,CAA8BpF,CAAA,CAAQ,gDAAR,CAC9BqF,EAAAA,CAA+BrF,CAAA,CAAQ,OAAR,CADnC,KAEIqB,EAAyB9B,CAAA+F,OAAA,CAAe,EAAf,CACeD,CADf,CAEeD,CAFf,CAF7B,CAOIpE,EAAgBzB,CAAA+F,OAAA,CAAe,EAAf,CAAmBF,CAAnB,CAAgDpF,CAAA,CAAQ,4KAAR,CAAhD,CAPpB,CAYImB,EAAiB5B,CAAA+F,OAAA,CAAe,EAAf,CAAmBD,CAAnB,CAAiDrF,CAAA,CAAQ,2JAAR,CAAjD,CAZrB;AAkBIuC,EAAkBvC,CAAA,CAAQ,cAAR,CAlBtB,CAoBI4E,EAAgBrF,CAAA+F,OAAA,CAAe,EAAf,CACehE,CADf,CAEeN,CAFf,CAGeG,CAHf,CAIeE,CAJf,CApBpB,CA2BI6D,EAAWlF,CAAA,CAAQ,0CAAR,CA3Bf,CA4BIiF,EAAa1F,CAAA+F,OAAA,CAAe,EAAf,CAAmBJ,CAAnB,CAA6BlF,CAAA,CAC1C,ySAD0C,CAA7B,CA5BjB,CAyMI8D,EAAUyB,QAAAC,cAAA,CAAuB,KAAvB,CAzMd,CA0MI/B,EAAU,wBA2GdlE,EAAAkG,OAAA,CAAe,YAAf,CAA6B,EAA7B,CAAAC,SAAA,CAA0C,WAA1C;AAlWAC,QAA0B,EAAG,CAC3B,IAAAC,KAAA,CAAY,CAAC,eAAD,CAAkB,QAAQ,CAACC,CAAD,CAAgB,CACpD,MAAO,SAAQ,CAACrF,CAAD,CAAO,CACpB,IAAIb,EAAM,EACVY,EAAA,CAAWC,CAAX,CAAiBZ,CAAA,CAAmBD,CAAnB,CAAwB,QAAQ,CAACmG,CAAD,CAAMd,CAAN,CAAe,CAC9D,MAAO,CAAC,SAAA/B,KAAA,CAAe4C,CAAA,CAAcC,CAAd,CAAmBd,CAAnB,CAAf,CADsD,CAA/C,CAAjB,CAGA,OAAOrF,EAAAI,KAAA,CAAS,EAAT,CALa,CAD8B,CAA1C,CADe,CAkW7B,CAwGAR,EAAAkG,OAAA,CAAe,YAAf,CAAAM,OAAA,CAAoC,OAApC,CAA6C,CAAC,WAAD,CAAc,QAAQ,CAACC,CAAD,CAAY,CAAA,IACzEC,EACE,oEAFuE,CAGzEC,EAAgB,UAEpB,OAAO,SAAQ,CAAC7D,CAAD,CAAO8D,CAAP,CAAe,CAoB5BC,QAASA,EAAO,CAAC/D,CAAD,CAAO,CAChBA,CAAL,EAGA7B,CAAAe,KAAA,CAAU9B,CAAA,CAAa4C,CAAb,CAAV,CAJqB,CAOvBgE,QAASA,EAAO,CAACC,CAAD,CAAMjE,CAAN,CAAY,CAC1B7B,CAAAe,KAAA,CAAU,KAAV,CACIhC,EAAAgH,UAAA,CAAkBJ,CAAlB,CAAJ,GACE3F,CAAAe,KAAA,CAAU,UAAV,CAEA,CADAf,CAAAe,KAAA,CAAU4E,CAAV,CACA,CAAA3F,CAAAe,KAAA,CAAU,IAAV,CAHF,CAKAf,EAAAe,KAAA,CAAU,QAAV,CACAf,EAAAe,KAAA,CAAU+E,CAAV,CACA9F,EAAAe,KAAA,CAAU,IAAV,CACA6E,EAAA,CAAQ/D,CAAR,CACA7B,EAAAe,KAAA,CAAU,MAAV,CAX0B,CA3BA;AAC5B,GAAKc,CAAAA,CAAL,CAAW,MAAOA,EAMlB,KALA,IAAIV,CAAJ,CACI6E,EAAMnE,CADV,CAEI7B,EAAO,EAFX,CAGI8F,CAHJ,CAIIjG,CACJ,CAAQsB,CAAR,CAAgB6E,CAAA7E,MAAA,CAAUsE,CAAV,CAAhB,CAAA,CAEEK,CAMA,CANM3E,CAAA,CAAM,CAAN,CAMN,CAJIA,CAAA,CAAM,CAAN,CAIJ,EAJgBA,CAAA,CAAM,CAAN,CAIhB,GAJ0B2E,CAI1B,CAJgC,SAIhC,CAJ4CA,CAI5C,EAHAjG,CAGA,CAHIsB,CAAAS,MAGJ,CAFAgE,CAAA,CAAQI,CAAAC,OAAA,CAAW,CAAX,CAAcpG,CAAd,CAAR,CAEA,CADAgG,CAAA,CAAQC,CAAR,CAAa3E,CAAA,CAAM,CAAN,CAAAF,QAAA,CAAiByE,CAAjB,CAAgC,EAAhC,CAAb,CACA,CAAAM,CAAA,CAAMA,CAAAzD,UAAA,CAAc1C,CAAd,CAAkBsB,CAAA,CAAM,CAAN,CAAArB,OAAlB,CAER8F,EAAA,CAAQI,CAAR,CACA,OAAOR,EAAA,CAAUxF,CAAAT,KAAA,CAAU,EAAV,CAAV,CAlBqB,CAL+C,CAAlC,CAA7C,CAhlBsC,CAArC,CAAD,CAioBGT,MAjoBH,CAioBWA,MAAAC,QAjoBX;", +"sources":["angular-sanitize.js"], +"names":["window","angular","undefined","sanitizeText","chars","buf","htmlSanitizeWriter","writer","noop","join","makeMap","str","obj","items","split","i","length","htmlParser","html","handler","parseStartTag","tag","tagName","rest","unary","lowercase","blockElements","stack","last","inlineElements","parseEndTag","optionalEndTagElements","voidElements","push","attrs","replace","ATTR_REGEXP","match","name","doubleQuotedValue","singleQuotedValue","unquotedValue","decodeEntities","start","pos","end","index","text","stack.last","specialElements","RegExp","all","COMMENT_REGEXP","CDATA_REGEXP","indexOf","lastIndexOf","comment","substring","DOCTYPE_REGEXP","test","BEGING_END_TAGE_REGEXP","END_TAG_REGEXP","BEGIN_TAG_REGEXP","START_TAG_REGEXP","$sanitizeMinErr","value","parts","spaceRe","exec","spaceBefore","spaceAfter","content","hiddenPre","innerHTML","textContent","innerText","encodeEntities","SURROGATE_PAIR_REGEXP","hi","charCodeAt","low","NON_ALPHANUMERIC_REGEXP","uriValidator","ignore","out","bind","validElements","forEach","key","lkey","isImage","validAttrs","uriAttrs","$$minErr","optionalEndTagBlockElements","optionalEndTagInlineElements","extend","document","createElement","module","provider","$SanitizeProvider","$get","$$sanitizeUri","uri","filter","$sanitize","LINKY_URL_REGEXP","MAILTO_REGEXP","target","addText","addLink","url","isDefined","raw","substr"] +} diff --git a/1.3.0-rc.2/angular-scenario.js b/1.3.0-rc.2/angular-scenario.js new file mode 100644 index 0000000000..a0fc0f46af --- /dev/null +++ b/1.3.0-rc.2/angular-scenario.js @@ -0,0 +1,36020 @@ +/*! + * jQuery JavaScript Library v2.1.1 + * http://jquery.com/ + * + * Includes Sizzle.js + * http://sizzlejs.com/ + * + * Copyright 2005, 2014 jQuery Foundation, Inc. and other contributors + * Released under the MIT license + * http://jquery.org/license + * + * Date: 2014-05-01T17:11Z + */ + +(function( global, factory ) {'use strict'; + + if ( typeof module === "object" && typeof module.exports === "object" ) { + // For CommonJS and CommonJS-like environments where a proper window is present, + // execute the factory and get jQuery + // For environments that do not inherently posses a window with a document + // (such as Node.js), expose a jQuery-making factory as module.exports + // This accentuates the need for the creation of a real window + // e.g. var jQuery = require("jquery")(window); + // See ticket #14549 for more info + module.exports = global.document ? + factory( global, true ) : + function( w ) { + if ( !w.document ) { + throw new Error( "jQuery requires a window with a document" ); + } + return factory( w ); + }; + } else { + factory( global ); + } + +// Pass this if window is not defined yet +}(typeof window !== "undefined" ? window : this, function( window, noGlobal ) { + +// Can't do this because several apps including ASP.NET trace +// the stack via arguments.caller.callee and Firefox dies if +// you try to trace through "use strict" call chains. (#13335) +// Support: Firefox 18+ +// + +var arr = []; + +var slice = arr.slice; + +var concat = arr.concat; + +var push = arr.push; + +var indexOf = arr.indexOf; + +var class2type = {}; + +var toString = class2type.toString; + +var hasOwn = class2type.hasOwnProperty; + +var support = {}; + + + +var + // Use the correct document accordingly with window argument (sandbox) + document = window.document, + + version = "2.1.1", + + // Define a local copy of jQuery + jQuery = function( selector, context ) { + // The jQuery object is actually just the init constructor 'enhanced' + // Need init if jQuery is called (just allow error to be thrown if not included) + return new jQuery.fn.init( selector, context ); + }, + + // Support: Android<4.1 + // Make sure we trim BOM and NBSP + rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, + + // Matches dashed string for camelizing + rmsPrefix = /^-ms-/, + rdashAlpha = /-([\da-z])/gi, + + // Used by jQuery.camelCase as callback to replace() + fcamelCase = function( all, letter ) { + return letter.toUpperCase(); + }; + +jQuery.fn = jQuery.prototype = { + // The current version of jQuery being used + jquery: version, + + constructor: jQuery, + + // Start with an empty selector + selector: "", + + // The default length of a jQuery object is 0 + length: 0, + + toArray: function() { + return slice.call( this ); + }, + + // Get the Nth element in the matched element set OR + // Get the whole matched element set as a clean array + get: function( num ) { + return num != null ? + + // Return just the one element from the set + ( num < 0 ? this[ num + this.length ] : this[ num ] ) : + + // Return all the elements in a clean array + slice.call( this ); + }, + + // Take an array of elements and push it onto the stack + // (returning the new matched element set) + pushStack: function( elems ) { + + // Build a new jQuery matched element set + var ret = jQuery.merge( this.constructor(), elems ); + + // Add the old object onto the stack (as a reference) + ret.prevObject = this; + ret.context = this.context; + + // Return the newly-formed element set + return ret; + }, + + // Execute a callback for every element in the matched set. + // (You can seed the arguments with an array of args, but this is + // only used internally.) + each: function( callback, args ) { + return jQuery.each( this, callback, args ); + }, + + map: function( callback ) { + return this.pushStack( jQuery.map(this, function( elem, i ) { + return callback.call( elem, i, elem ); + })); + }, + + slice: function() { + return this.pushStack( slice.apply( this, arguments ) ); + }, + + first: function() { + return this.eq( 0 ); + }, + + last: function() { + return this.eq( -1 ); + }, + + eq: function( i ) { + var len = this.length, + j = +i + ( i < 0 ? len : 0 ); + return this.pushStack( j >= 0 && j < len ? [ this[j] ] : [] ); + }, + + end: function() { + return this.prevObject || this.constructor(null); + }, + + // For internal use only. + // Behaves like an Array's method, not like a jQuery method. + push: push, + sort: arr.sort, + splice: arr.splice +}; + +jQuery.extend = jQuery.fn.extend = function() { + var options, name, src, copy, copyIsArray, clone, + target = arguments[0] || {}, + i = 1, + length = arguments.length, + deep = false; + + // Handle a deep copy situation + if ( typeof target === "boolean" ) { + deep = target; + + // skip the boolean and the target + target = arguments[ i ] || {}; + i++; + } + + // Handle case when target is a string or something (possible in deep copy) + if ( typeof target !== "object" && !jQuery.isFunction(target) ) { + target = {}; + } + + // extend jQuery itself if only one argument is passed + if ( i === length ) { + target = this; + i--; + } + + for ( ; i < length; i++ ) { + // Only deal with non-null/undefined values + if ( (options = arguments[ i ]) != null ) { + // Extend the base object + for ( name in options ) { + src = target[ name ]; + copy = options[ name ]; + + // Prevent never-ending loop + if ( target === copy ) { + continue; + } + + // Recurse if we're merging plain objects or arrays + if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) { + if ( copyIsArray ) { + copyIsArray = false; + clone = src && jQuery.isArray(src) ? src : []; + + } else { + clone = src && jQuery.isPlainObject(src) ? src : {}; + } + + // Never move original objects, clone them + target[ name ] = jQuery.extend( deep, clone, copy ); + + // Don't bring in undefined values + } else if ( copy !== undefined ) { + target[ name ] = copy; + } + } + } + } + + // Return the modified object + return target; +}; + +jQuery.extend({ + // Unique for each copy of jQuery on the page + expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ), + + // Assume jQuery is ready without the ready module + isReady: true, + + error: function( msg ) { + throw new Error( msg ); + }, + + noop: function() {}, + + // See test/unit/core.js for details concerning isFunction. + // Since version 1.3, DOM methods and functions like alert + // aren't supported. They return false on IE (#2968). + isFunction: function( obj ) { + return jQuery.type(obj) === "function"; + }, + + isArray: Array.isArray, + + isWindow: function( obj ) { + return obj != null && obj === obj.window; + }, + + isNumeric: function( obj ) { + // parseFloat NaNs numeric-cast false positives (null|true|false|"") + // ...but misinterprets leading-number strings, particularly hex literals ("0x...") + // subtraction forces infinities to NaN + return !jQuery.isArray( obj ) && obj - parseFloat( obj ) >= 0; + }, + + isPlainObject: function( obj ) { + // Not plain objects: + // - Any object or value whose internal [[Class]] property is not "[object Object]" + // - DOM nodes + // - window + if ( jQuery.type( obj ) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) { + return false; + } + + if ( obj.constructor && + !hasOwn.call( obj.constructor.prototype, "isPrototypeOf" ) ) { + return false; + } + + // If the function hasn't returned already, we're confident that + // |obj| is a plain object, created by {} or constructed with new Object + return true; + }, + + isEmptyObject: function( obj ) { + var name; + for ( name in obj ) { + return false; + } + return true; + }, + + type: function( obj ) { + if ( obj == null ) { + return obj + ""; + } + // Support: Android < 4.0, iOS < 6 (functionish RegExp) + return typeof obj === "object" || typeof obj === "function" ? + class2type[ toString.call(obj) ] || "object" : + typeof obj; + }, + + // Evaluates a script in a global context + globalEval: function( code ) { + var script, + indirect = eval; + + code = jQuery.trim( code ); + + if ( code ) { + // If the code includes a valid, prologue position + // strict mode pragma, execute code by injecting a + // script tag into the document. + if ( code.indexOf("use strict") === 1 ) { + script = document.createElement("script"); + script.text = code; + document.head.appendChild( script ).parentNode.removeChild( script ); + } else { + // Otherwise, avoid the DOM node creation, insertion + // and removal by using an indirect global eval + indirect( code ); + } + } + }, + + // Convert dashed to camelCase; used by the css and data modules + // Microsoft forgot to hump their vendor prefix (#9572) + camelCase: function( string ) { + return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); + }, + + nodeName: function( elem, name ) { + return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); + }, + + // args is for internal usage only + each: function( obj, callback, args ) { + var value, + i = 0, + length = obj.length, + isArray = isArraylike( obj ); + + if ( args ) { + if ( isArray ) { + for ( ; i < length; i++ ) { + value = callback.apply( obj[ i ], args ); + + if ( value === false ) { + break; + } + } + } else { + for ( i in obj ) { + value = callback.apply( obj[ i ], args ); + + if ( value === false ) { + break; + } + } + } + + // A special, fast, case for the most common use of each + } else { + if ( isArray ) { + for ( ; i < length; i++ ) { + value = callback.call( obj[ i ], i, obj[ i ] ); + + if ( value === false ) { + break; + } + } + } else { + for ( i in obj ) { + value = callback.call( obj[ i ], i, obj[ i ] ); + + if ( value === false ) { + break; + } + } + } + } + + return obj; + }, + + // Support: Android<4.1 + trim: function( text ) { + return text == null ? + "" : + ( text + "" ).replace( rtrim, "" ); + }, + + // results is for internal usage only + makeArray: function( arr, results ) { + var ret = results || []; + + if ( arr != null ) { + if ( isArraylike( Object(arr) ) ) { + jQuery.merge( ret, + typeof arr === "string" ? + [ arr ] : arr + ); + } else { + push.call( ret, arr ); + } + } + + return ret; + }, + + inArray: function( elem, arr, i ) { + return arr == null ? -1 : indexOf.call( arr, elem, i ); + }, + + merge: function( first, second ) { + var len = +second.length, + j = 0, + i = first.length; + + for ( ; j < len; j++ ) { + first[ i++ ] = second[ j ]; + } + + first.length = i; + + return first; + }, + + grep: function( elems, callback, invert ) { + var callbackInverse, + matches = [], + i = 0, + length = elems.length, + callbackExpect = !invert; + + // Go through the array, only saving the items + // that pass the validator function + for ( ; i < length; i++ ) { + callbackInverse = !callback( elems[ i ], i ); + if ( callbackInverse !== callbackExpect ) { + matches.push( elems[ i ] ); + } + } + + return matches; + }, + + // arg is for internal usage only + map: function( elems, callback, arg ) { + var value, + i = 0, + length = elems.length, + isArray = isArraylike( elems ), + ret = []; + + // Go through the array, translating each of the items to their new values + if ( isArray ) { + for ( ; i < length; i++ ) { + value = callback( elems[ i ], i, arg ); + + if ( value != null ) { + ret.push( value ); + } + } + + // Go through every key on the object, + } else { + for ( i in elems ) { + value = callback( elems[ i ], i, arg ); + + if ( value != null ) { + ret.push( value ); + } + } + } + + // Flatten any nested arrays + return concat.apply( [], ret ); + }, + + // A global GUID counter for objects + guid: 1, + + // Bind a function to a context, optionally partially applying any + // arguments. + proxy: function( fn, context ) { + var tmp, args, proxy; + + if ( typeof context === "string" ) { + tmp = fn[ context ]; + context = fn; + fn = tmp; + } + + // Quick check to determine if target is callable, in the spec + // this throws a TypeError, but we will just return undefined. + if ( !jQuery.isFunction( fn ) ) { + return undefined; + } + + // Simulated bind + args = slice.call( arguments, 2 ); + proxy = function() { + return fn.apply( context || this, args.concat( slice.call( arguments ) ) ); + }; + + // Set the guid of unique handler to the same of original handler, so it can be removed + proxy.guid = fn.guid = fn.guid || jQuery.guid++; + + return proxy; + }, + + now: Date.now, + + // jQuery.support is not used in Core but other projects attach their + // properties to it so it needs to exist. + support: support +}); + +// Populate the class2type map +jQuery.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(i, name) { + class2type[ "[object " + name + "]" ] = name.toLowerCase(); +}); + +function isArraylike( obj ) { + var length = obj.length, + type = jQuery.type( obj ); + + if ( type === "function" || jQuery.isWindow( obj ) ) { + return false; + } + + if ( obj.nodeType === 1 && length ) { + return true; + } + + return type === "array" || length === 0 || + typeof length === "number" && length > 0 && ( length - 1 ) in obj; +} +var Sizzle = +/*! + * Sizzle CSS Selector Engine v1.10.19 + * http://sizzlejs.com/ + * + * Copyright 2013 jQuery Foundation, Inc. and other contributors + * Released under the MIT license + * http://jquery.org/license + * + * Date: 2014-04-18 + */ +(function( window ) { + +var i, + support, + Expr, + getText, + isXML, + tokenize, + compile, + select, + outermostContext, + sortInput, + hasDuplicate, + + // Local document vars + setDocument, + document, + docElem, + documentIsHTML, + rbuggyQSA, + rbuggyMatches, + matches, + contains, + + // Instance-specific data + expando = "sizzle" + -(new Date()), + preferredDoc = window.document, + dirruns = 0, + done = 0, + classCache = createCache(), + tokenCache = createCache(), + compilerCache = createCache(), + sortOrder = function( a, b ) { + if ( a === b ) { + hasDuplicate = true; + } + return 0; + }, + + // General-purpose constants + strundefined = typeof undefined, + MAX_NEGATIVE = 1 << 31, + + // Instance methods + hasOwn = ({}).hasOwnProperty, + arr = [], + pop = arr.pop, + push_native = arr.push, + push = arr.push, + slice = arr.slice, + // Use a stripped-down indexOf if we can't use a native one + indexOf = arr.indexOf || function( elem ) { + var i = 0, + len = this.length; + for ( ; i < len; i++ ) { + if ( this[i] === elem ) { + return i; + } + } + return -1; + }, + + booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped", + + // Regular expressions + + // Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace + whitespace = "[\\x20\\t\\r\\n\\f]", + // http://www.w3.org/TR/css3-syntax/#characters + characterEncoding = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+", + + // Loosely modeled on CSS identifier characters + // An unquoted value should be a CSS identifier http://www.w3.org/TR/css3-selectors/#attribute-selectors + // Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier + identifier = characterEncoding.replace( "w", "w#" ), + + // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors + attributes = "\\[" + whitespace + "*(" + characterEncoding + ")(?:" + whitespace + + // Operator (capture 2) + "*([*^$|!~]?=)" + whitespace + + // "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]" + "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace + + "*\\]", + + pseudos = ":(" + characterEncoding + ")(?:\\((" + + // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments: + // 1. quoted (capture 3; capture 4 or capture 5) + "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" + + // 2. simple (capture 6) + "((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" + + // 3. anything else (capture 2) + ".*" + + ")\\)|)", + + // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter + rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ), + + rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ), + rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ), + + rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*?)" + whitespace + "*\\]", "g" ), + + rpseudo = new RegExp( pseudos ), + ridentifier = new RegExp( "^" + identifier + "$" ), + + matchExpr = { + "ID": new RegExp( "^#(" + characterEncoding + ")" ), + "CLASS": new RegExp( "^\\.(" + characterEncoding + ")" ), + "TAG": new RegExp( "^(" + characterEncoding.replace( "w", "w*" ) + ")" ), + "ATTR": new RegExp( "^" + attributes ), + "PSEUDO": new RegExp( "^" + pseudos ), + "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace + + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + + "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), + "bool": new RegExp( "^(?:" + booleans + ")$", "i" ), + // For use in libraries implementing .is() + // We use this for POS matching in `select` + "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + + whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" ) + }, + + rinputs = /^(?:input|select|textarea|button)$/i, + rheader = /^h\d$/i, + + rnative = /^[^{]+\{\s*\[native \w/, + + // Easily-parseable/retrievable ID or TAG or CLASS selectors + rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, + + rsibling = /[+~]/, + rescape = /'|\\/g, + + // CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters + runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ), + funescape = function( _, escaped, escapedWhitespace ) { + var high = "0x" + escaped - 0x10000; + // NaN means non-codepoint + // Support: Firefox<24 + // Workaround erroneous numeric interpretation of +"0x" + return high !== high || escapedWhitespace ? + escaped : + high < 0 ? + // BMP codepoint + String.fromCharCode( high + 0x10000 ) : + // Supplemental Plane codepoint (surrogate pair) + String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 ); + }; + +// Optimize for push.apply( _, NodeList ) +try { + push.apply( + (arr = slice.call( preferredDoc.childNodes )), + preferredDoc.childNodes + ); + // Support: Android<4.0 + // Detect silently failing push.apply + arr[ preferredDoc.childNodes.length ].nodeType; +} catch ( e ) { + push = { apply: arr.length ? + + // Leverage slice if possible + function( target, els ) { + push_native.apply( target, slice.call(els) ); + } : + + // Support: IE<9 + // Otherwise append directly + function( target, els ) { + var j = target.length, + i = 0; + // Can't trust NodeList.length + while ( (target[j++] = els[i++]) ) {} + target.length = j - 1; + } + }; +} + +function Sizzle( selector, context, results, seed ) { + var match, elem, m, nodeType, + // QSA vars + i, groups, old, nid, newContext, newSelector; + + if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) { + setDocument( context ); + } + + context = context || document; + results = results || []; + + if ( !selector || typeof selector !== "string" ) { + return results; + } + + if ( (nodeType = context.nodeType) !== 1 && nodeType !== 9 ) { + return []; + } + + if ( documentIsHTML && !seed ) { + + // Shortcuts + if ( (match = rquickExpr.exec( selector )) ) { + // Speed-up: Sizzle("#ID") + if ( (m = match[1]) ) { + if ( nodeType === 9 ) { + elem = context.getElementById( m ); + // Check parentNode to catch when Blackberry 4.6 returns + // nodes that are no longer in the document (jQuery #6963) + if ( elem && elem.parentNode ) { + // Handle the case where IE, Opera, and Webkit return items + // by name instead of ID + if ( elem.id === m ) { + results.push( elem ); + return results; + } + } else { + return results; + } + } else { + // Context is not a document + if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) && + contains( context, elem ) && elem.id === m ) { + results.push( elem ); + return results; + } + } + + // Speed-up: Sizzle("TAG") + } else if ( match[2] ) { + push.apply( results, context.getElementsByTagName( selector ) ); + return results; + + // Speed-up: Sizzle(".CLASS") + } else if ( (m = match[3]) && support.getElementsByClassName && context.getElementsByClassName ) { + push.apply( results, context.getElementsByClassName( m ) ); + return results; + } + } + + // QSA path + if ( support.qsa && (!rbuggyQSA || !rbuggyQSA.test( selector )) ) { + nid = old = expando; + newContext = context; + newSelector = nodeType === 9 && selector; + + // qSA works strangely on Element-rooted queries + // We can work around this by specifying an extra ID on the root + // and working up from there (Thanks to Andrew Dupont for the technique) + // IE 8 doesn't work on object elements + if ( nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) { + groups = tokenize( selector ); + + if ( (old = context.getAttribute("id")) ) { + nid = old.replace( rescape, "\\$&" ); + } else { + context.setAttribute( "id", nid ); + } + nid = "[id='" + nid + "'] "; + + i = groups.length; + while ( i-- ) { + groups[i] = nid + toSelector( groups[i] ); + } + newContext = rsibling.test( selector ) && testContext( context.parentNode ) || context; + newSelector = groups.join(","); + } + + if ( newSelector ) { + try { + push.apply( results, + newContext.querySelectorAll( newSelector ) + ); + return results; + } catch(qsaError) { + } finally { + if ( !old ) { + context.removeAttribute("id"); + } + } + } + } + } + + // All others + return select( selector.replace( rtrim, "$1" ), context, results, seed ); +} + +/** + * Create key-value caches of limited size + * @returns {Function(string, Object)} Returns the Object data after storing it on itself with + * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength) + * deleting the oldest entry + */ +function createCache() { + var keys = []; + + function cache( key, value ) { + // Use (key + " ") to avoid collision with native prototype properties (see Issue #157) + if ( keys.push( key + " " ) > Expr.cacheLength ) { + // Only keep the most recent entries + delete cache[ keys.shift() ]; + } + return (cache[ key + " " ] = value); + } + return cache; +} + +/** + * Mark a function for special use by Sizzle + * @param {Function} fn The function to mark + */ +function markFunction( fn ) { + fn[ expando ] = true; + return fn; +} + +/** + * Support testing using an element + * @param {Function} fn Passed the created div and expects a boolean result + */ +function assert( fn ) { + var div = document.createElement("div"); + + try { + return !!fn( div ); + } catch (e) { + return false; + } finally { + // Remove from its parent by default + if ( div.parentNode ) { + div.parentNode.removeChild( div ); + } + // release memory in IE + div = null; + } +} + +/** + * Adds the same handler for all of the specified attrs + * @param {String} attrs Pipe-separated list of attributes + * @param {Function} handler The method that will be applied + */ +function addHandle( attrs, handler ) { + var arr = attrs.split("|"), + i = attrs.length; + + while ( i-- ) { + Expr.attrHandle[ arr[i] ] = handler; + } +} + +/** + * Checks document order of two siblings + * @param {Element} a + * @param {Element} b + * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b + */ +function siblingCheck( a, b ) { + var cur = b && a, + diff = cur && a.nodeType === 1 && b.nodeType === 1 && + ( ~b.sourceIndex || MAX_NEGATIVE ) - + ( ~a.sourceIndex || MAX_NEGATIVE ); + + // Use IE sourceIndex if available on both nodes + if ( diff ) { + return diff; + } + + // Check if b follows a + if ( cur ) { + while ( (cur = cur.nextSibling) ) { + if ( cur === b ) { + return -1; + } + } + } + + return a ? 1 : -1; +} + +/** + * Returns a function to use in pseudos for input types + * @param {String} type + */ +function createInputPseudo( type ) { + return function( elem ) { + var name = elem.nodeName.toLowerCase(); + return name === "input" && elem.type === type; + }; +} + +/** + * Returns a function to use in pseudos for buttons + * @param {String} type + */ +function createButtonPseudo( type ) { + return function( elem ) { + var name = elem.nodeName.toLowerCase(); + return (name === "input" || name === "button") && elem.type === type; + }; +} + +/** + * Returns a function to use in pseudos for positionals + * @param {Function} fn + */ +function createPositionalPseudo( fn ) { + return markFunction(function( argument ) { + argument = +argument; + return markFunction(function( seed, matches ) { + var j, + matchIndexes = fn( [], seed.length, argument ), + i = matchIndexes.length; + + // Match elements found at the specified indexes + while ( i-- ) { + if ( seed[ (j = matchIndexes[i]) ] ) { + seed[j] = !(matches[j] = seed[j]); + } + } + }); + }); +} + +/** + * Checks a node for validity as a Sizzle context + * @param {Element|Object=} context + * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value + */ +function testContext( context ) { + return context && typeof context.getElementsByTagName !== strundefined && context; +} + +// Expose support vars for convenience +support = Sizzle.support = {}; + +/** + * Detects XML nodes + * @param {Element|Object} elem An element or a document + * @returns {Boolean} True iff elem is a non-HTML XML node + */ +isXML = Sizzle.isXML = function( elem ) { + // documentElement is verified for cases where it doesn't yet exist + // (such as loading iframes in IE - #4833) + var documentElement = elem && (elem.ownerDocument || elem).documentElement; + return documentElement ? documentElement.nodeName !== "HTML" : false; +}; + +/** + * Sets document-related variables once based on the current document + * @param {Element|Object} [doc] An element or document object to use to set the document + * @returns {Object} Returns the current document + */ +setDocument = Sizzle.setDocument = function( node ) { + var hasCompare, + doc = node ? node.ownerDocument || node : preferredDoc, + parent = doc.defaultView; + + // If no document and documentElement is available, return + if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) { + return document; + } + + // Set our document + document = doc; + docElem = doc.documentElement; + + // Support tests + documentIsHTML = !isXML( doc ); + + // Support: IE>8 + // If iframe document is assigned to "document" variable and if iframe has been reloaded, + // IE will throw "permission denied" error when accessing "document" variable, see jQuery #13936 + // IE6-8 do not support the defaultView property so parent will be undefined + if ( parent && parent !== parent.top ) { + // IE11 does not have attachEvent, so all must suffer + if ( parent.addEventListener ) { + parent.addEventListener( "unload", function() { + setDocument(); + }, false ); + } else if ( parent.attachEvent ) { + parent.attachEvent( "onunload", function() { + setDocument(); + }); + } + } + + /* Attributes + ---------------------------------------------------------------------- */ + + // Support: IE<8 + // Verify that getAttribute really returns attributes and not properties (excepting IE8 booleans) + support.attributes = assert(function( div ) { + div.className = "i"; + return !div.getAttribute("className"); + }); + + /* getElement(s)By* + ---------------------------------------------------------------------- */ + + // Check if getElementsByTagName("*") returns only elements + support.getElementsByTagName = assert(function( div ) { + div.appendChild( doc.createComment("") ); + return !div.getElementsByTagName("*").length; + }); + + // Check if getElementsByClassName can be trusted + support.getElementsByClassName = rnative.test( doc.getElementsByClassName ) && assert(function( div ) { + div.innerHTML = "
"; + + // Support: Safari<4 + // Catch class over-caching + div.firstChild.className = "i"; + // Support: Opera<10 + // Catch gEBCN failure to find non-leading classes + return div.getElementsByClassName("i").length === 2; + }); + + // Support: IE<10 + // Check if getElementById returns elements by name + // The broken getElementById methods don't pick up programatically-set names, + // so use a roundabout getElementsByName test + support.getById = assert(function( div ) { + docElem.appendChild( div ).id = expando; + return !doc.getElementsByName || !doc.getElementsByName( expando ).length; + }); + + // ID find and filter + if ( support.getById ) { + Expr.find["ID"] = function( id, context ) { + if ( typeof context.getElementById !== strundefined && documentIsHTML ) { + var m = context.getElementById( id ); + // Check parentNode to catch when Blackberry 4.6 returns + // nodes that are no longer in the document #6963 + return m && m.parentNode ? [ m ] : []; + } + }; + Expr.filter["ID"] = function( id ) { + var attrId = id.replace( runescape, funescape ); + return function( elem ) { + return elem.getAttribute("id") === attrId; + }; + }; + } else { + // Support: IE6/7 + // getElementById is not reliable as a find shortcut + delete Expr.find["ID"]; + + Expr.filter["ID"] = function( id ) { + var attrId = id.replace( runescape, funescape ); + return function( elem ) { + var node = typeof elem.getAttributeNode !== strundefined && elem.getAttributeNode("id"); + return node && node.value === attrId; + }; + }; + } + + // Tag + Expr.find["TAG"] = support.getElementsByTagName ? + function( tag, context ) { + if ( typeof context.getElementsByTagName !== strundefined ) { + return context.getElementsByTagName( tag ); + } + } : + function( tag, context ) { + var elem, + tmp = [], + i = 0, + results = context.getElementsByTagName( tag ); + + // Filter out possible comments + if ( tag === "*" ) { + while ( (elem = results[i++]) ) { + if ( elem.nodeType === 1 ) { + tmp.push( elem ); + } + } + + return tmp; + } + return results; + }; + + // Class + Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) { + if ( typeof context.getElementsByClassName !== strundefined && documentIsHTML ) { + return context.getElementsByClassName( className ); + } + }; + + /* QSA/matchesSelector + ---------------------------------------------------------------------- */ + + // QSA and matchesSelector support + + // matchesSelector(:active) reports false when true (IE9/Opera 11.5) + rbuggyMatches = []; + + // qSa(:focus) reports false when true (Chrome 21) + // We allow this because of a bug in IE8/9 that throws an error + // whenever `document.activeElement` is accessed on an iframe + // So, we allow :focus to pass through QSA all the time to avoid the IE error + // See http://bugs.jquery.com/ticket/13378 + rbuggyQSA = []; + + if ( (support.qsa = rnative.test( doc.querySelectorAll )) ) { + // Build QSA regex + // Regex strategy adopted from Diego Perini + assert(function( div ) { + // Select is set to empty string on purpose + // This is to test IE's treatment of not explicitly + // setting a boolean content attribute, + // since its presence should be enough + // http://bugs.jquery.com/ticket/12359 + div.innerHTML = ""; + + // Support: IE8, Opera 11-12.16 + // Nothing should be selected when empty strings follow ^= or $= or *= + // The test attribute must be unknown in Opera but "safe" for WinRT + // http://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section + if ( div.querySelectorAll("[msallowclip^='']").length ) { + rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" ); + } + + // Support: IE8 + // Boolean attributes and "value" are not treated correctly + if ( !div.querySelectorAll("[selected]").length ) { + rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" ); + } + + // Webkit/Opera - :checked should return selected option elements + // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked + // IE8 throws error here and will not see later tests + if ( !div.querySelectorAll(":checked").length ) { + rbuggyQSA.push(":checked"); + } + }); + + assert(function( div ) { + // Support: Windows 8 Native Apps + // The type and name attributes are restricted during .innerHTML assignment + var input = doc.createElement("input"); + input.setAttribute( "type", "hidden" ); + div.appendChild( input ).setAttribute( "name", "D" ); + + // Support: IE8 + // Enforce case-sensitivity of name attribute + if ( div.querySelectorAll("[name=d]").length ) { + rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" ); + } + + // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) + // IE8 throws error here and will not see later tests + if ( !div.querySelectorAll(":enabled").length ) { + rbuggyQSA.push( ":enabled", ":disabled" ); + } + + // Opera 10-11 does not throw on post-comma invalid pseudos + div.querySelectorAll("*,:x"); + rbuggyQSA.push(",.*:"); + }); + } + + if ( (support.matchesSelector = rnative.test( (matches = docElem.matches || + docElem.webkitMatchesSelector || + docElem.mozMatchesSelector || + docElem.oMatchesSelector || + docElem.msMatchesSelector) )) ) { + + assert(function( div ) { + // Check to see if it's possible to do matchesSelector + // on a disconnected node (IE 9) + support.disconnectedMatch = matches.call( div, "div" ); + + // This should fail with an exception + // Gecko does not error, returns false instead + matches.call( div, "[s!='']:x" ); + rbuggyMatches.push( "!=", pseudos ); + }); + } + + rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") ); + rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") ); + + /* Contains + ---------------------------------------------------------------------- */ + hasCompare = rnative.test( docElem.compareDocumentPosition ); + + // Element contains another + // Purposefully does not implement inclusive descendent + // As in, an element does not contain itself + contains = hasCompare || rnative.test( docElem.contains ) ? + function( a, b ) { + var adown = a.nodeType === 9 ? a.documentElement : a, + bup = b && b.parentNode; + return a === bup || !!( bup && bup.nodeType === 1 && ( + adown.contains ? + adown.contains( bup ) : + a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16 + )); + } : + function( a, b ) { + if ( b ) { + while ( (b = b.parentNode) ) { + if ( b === a ) { + return true; + } + } + } + return false; + }; + + /* Sorting + ---------------------------------------------------------------------- */ + + // Document order sorting + sortOrder = hasCompare ? + function( a, b ) { + + // Flag for duplicate removal + if ( a === b ) { + hasDuplicate = true; + return 0; + } + + // Sort on method existence if only one input has compareDocumentPosition + var compare = !a.compareDocumentPosition - !b.compareDocumentPosition; + if ( compare ) { + return compare; + } + + // Calculate position if both inputs belong to the same document + compare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ? + a.compareDocumentPosition( b ) : + + // Otherwise we know they are disconnected + 1; + + // Disconnected nodes + if ( compare & 1 || + (!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) { + + // Choose the first element that is related to our preferred document + if ( a === doc || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) { + return -1; + } + if ( b === doc || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) { + return 1; + } + + // Maintain original order + return sortInput ? + ( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) : + 0; + } + + return compare & 4 ? -1 : 1; + } : + function( a, b ) { + // Exit early if the nodes are identical + if ( a === b ) { + hasDuplicate = true; + return 0; + } + + var cur, + i = 0, + aup = a.parentNode, + bup = b.parentNode, + ap = [ a ], + bp = [ b ]; + + // Parentless nodes are either documents or disconnected + if ( !aup || !bup ) { + return a === doc ? -1 : + b === doc ? 1 : + aup ? -1 : + bup ? 1 : + sortInput ? + ( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) : + 0; + + // If the nodes are siblings, we can do a quick check + } else if ( aup === bup ) { + return siblingCheck( a, b ); + } + + // Otherwise we need full lists of their ancestors for comparison + cur = a; + while ( (cur = cur.parentNode) ) { + ap.unshift( cur ); + } + cur = b; + while ( (cur = cur.parentNode) ) { + bp.unshift( cur ); + } + + // Walk down the tree looking for a discrepancy + while ( ap[i] === bp[i] ) { + i++; + } + + return i ? + // Do a sibling check if the nodes have a common ancestor + siblingCheck( ap[i], bp[i] ) : + + // Otherwise nodes in our document sort first + ap[i] === preferredDoc ? -1 : + bp[i] === preferredDoc ? 1 : + 0; + }; + + return doc; +}; + +Sizzle.matches = function( expr, elements ) { + return Sizzle( expr, null, null, elements ); +}; + +Sizzle.matchesSelector = function( elem, expr ) { + // Set document vars if needed + if ( ( elem.ownerDocument || elem ) !== document ) { + setDocument( elem ); + } + + // Make sure that attribute selectors are quoted + expr = expr.replace( rattributeQuotes, "='$1']" ); + + if ( support.matchesSelector && documentIsHTML && + ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) && + ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) { + + try { + var ret = matches.call( elem, expr ); + + // IE 9's matchesSelector returns false on disconnected nodes + if ( ret || support.disconnectedMatch || + // As well, disconnected nodes are said to be in a document + // fragment in IE 9 + elem.document && elem.document.nodeType !== 11 ) { + return ret; + } + } catch(e) {} + } + + return Sizzle( expr, document, null, [ elem ] ).length > 0; +}; + +Sizzle.contains = function( context, elem ) { + // Set document vars if needed + if ( ( context.ownerDocument || context ) !== document ) { + setDocument( context ); + } + return contains( context, elem ); +}; + +Sizzle.attr = function( elem, name ) { + // Set document vars if needed + if ( ( elem.ownerDocument || elem ) !== document ) { + setDocument( elem ); + } + + var fn = Expr.attrHandle[ name.toLowerCase() ], + // Don't get fooled by Object.prototype properties (jQuery #13807) + val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ? + fn( elem, name, !documentIsHTML ) : + undefined; + + return val !== undefined ? + val : + support.attributes || !documentIsHTML ? + elem.getAttribute( name ) : + (val = elem.getAttributeNode(name)) && val.specified ? + val.value : + null; +}; + +Sizzle.error = function( msg ) { + throw new Error( "Syntax error, unrecognized expression: " + msg ); +}; + +/** + * Document sorting and removing duplicates + * @param {ArrayLike} results + */ +Sizzle.uniqueSort = function( results ) { + var elem, + duplicates = [], + j = 0, + i = 0; + + // Unless we *know* we can detect duplicates, assume their presence + hasDuplicate = !support.detectDuplicates; + sortInput = !support.sortStable && results.slice( 0 ); + results.sort( sortOrder ); + + if ( hasDuplicate ) { + while ( (elem = results[i++]) ) { + if ( elem === results[ i ] ) { + j = duplicates.push( i ); + } + } + while ( j-- ) { + results.splice( duplicates[ j ], 1 ); + } + } + + // Clear input after sorting to release objects + // See https://github.com/jquery/sizzle/pull/225 + sortInput = null; + + return results; +}; + +/** + * Utility function for retrieving the text value of an array of DOM nodes + * @param {Array|Element} elem + */ +getText = Sizzle.getText = function( elem ) { + var node, + ret = "", + i = 0, + nodeType = elem.nodeType; + + if ( !nodeType ) { + // If no nodeType, this is expected to be an array + while ( (node = elem[i++]) ) { + // Do not traverse comment nodes + ret += getText( node ); + } + } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { + // Use textContent for elements + // innerText usage removed for consistency of new lines (jQuery #11153) + if ( typeof elem.textContent === "string" ) { + return elem.textContent; + } else { + // Traverse its children + for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { + ret += getText( elem ); + } + } + } else if ( nodeType === 3 || nodeType === 4 ) { + return elem.nodeValue; + } + // Do not include comment or processing instruction nodes + + return ret; +}; + +Expr = Sizzle.selectors = { + + // Can be adjusted by the user + cacheLength: 50, + + createPseudo: markFunction, + + match: matchExpr, + + attrHandle: {}, + + find: {}, + + relative: { + ">": { dir: "parentNode", first: true }, + " ": { dir: "parentNode" }, + "+": { dir: "previousSibling", first: true }, + "~": { dir: "previousSibling" } + }, + + preFilter: { + "ATTR": function( match ) { + match[1] = match[1].replace( runescape, funescape ); + + // Move the given value to match[3] whether quoted or unquoted + match[3] = ( match[3] || match[4] || match[5] || "" ).replace( runescape, funescape ); + + if ( match[2] === "~=" ) { + match[3] = " " + match[3] + " "; + } + + return match.slice( 0, 4 ); + }, + + "CHILD": function( match ) { + /* matches from matchExpr["CHILD"] + 1 type (only|nth|...) + 2 what (child|of-type) + 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...) + 4 xn-component of xn+y argument ([+-]?\d*n|) + 5 sign of xn-component + 6 x of xn-component + 7 sign of y-component + 8 y of y-component + */ + match[1] = match[1].toLowerCase(); + + if ( match[1].slice( 0, 3 ) === "nth" ) { + // nth-* requires argument + if ( !match[3] ) { + Sizzle.error( match[0] ); + } + + // numeric x and y parameters for Expr.filter.CHILD + // remember that false/true cast respectively to 0/1 + match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) ); + match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" ); + + // other types prohibit arguments + } else if ( match[3] ) { + Sizzle.error( match[0] ); + } + + return match; + }, + + "PSEUDO": function( match ) { + var excess, + unquoted = !match[6] && match[2]; + + if ( matchExpr["CHILD"].test( match[0] ) ) { + return null; + } + + // Accept quoted arguments as-is + if ( match[3] ) { + match[2] = match[4] || match[5] || ""; + + // Strip excess characters from unquoted arguments + } else if ( unquoted && rpseudo.test( unquoted ) && + // Get excess from tokenize (recursively) + (excess = tokenize( unquoted, true )) && + // advance to the next closing parenthesis + (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) { + + // excess is a negative index + match[0] = match[0].slice( 0, excess ); + match[2] = unquoted.slice( 0, excess ); + } + + // Return only captures needed by the pseudo filter method (type and argument) + return match.slice( 0, 3 ); + } + }, + + filter: { + + "TAG": function( nodeNameSelector ) { + var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase(); + return nodeNameSelector === "*" ? + function() { return true; } : + function( elem ) { + return elem.nodeName && elem.nodeName.toLowerCase() === nodeName; + }; + }, + + "CLASS": function( className ) { + var pattern = classCache[ className + " " ]; + + return pattern || + (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) && + classCache( className, function( elem ) { + return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== strundefined && elem.getAttribute("class") || "" ); + }); + }, + + "ATTR": function( name, operator, check ) { + return function( elem ) { + var result = Sizzle.attr( elem, name ); + + if ( result == null ) { + return operator === "!="; + } + if ( !operator ) { + return true; + } + + result += ""; + + return operator === "=" ? result === check : + operator === "!=" ? result !== check : + operator === "^=" ? check && result.indexOf( check ) === 0 : + operator === "*=" ? check && result.indexOf( check ) > -1 : + operator === "$=" ? check && result.slice( -check.length ) === check : + operator === "~=" ? ( " " + result + " " ).indexOf( check ) > -1 : + operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" : + false; + }; + }, + + "CHILD": function( type, what, argument, first, last ) { + var simple = type.slice( 0, 3 ) !== "nth", + forward = type.slice( -4 ) !== "last", + ofType = what === "of-type"; + + return first === 1 && last === 0 ? + + // Shortcut for :nth-*(n) + function( elem ) { + return !!elem.parentNode; + } : + + function( elem, context, xml ) { + var cache, outerCache, node, diff, nodeIndex, start, + dir = simple !== forward ? "nextSibling" : "previousSibling", + parent = elem.parentNode, + name = ofType && elem.nodeName.toLowerCase(), + useCache = !xml && !ofType; + + if ( parent ) { + + // :(first|last|only)-(child|of-type) + if ( simple ) { + while ( dir ) { + node = elem; + while ( (node = node[ dir ]) ) { + if ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) { + return false; + } + } + // Reverse direction for :only-* (if we haven't yet done so) + start = dir = type === "only" && !start && "nextSibling"; + } + return true; + } + + start = [ forward ? parent.firstChild : parent.lastChild ]; + + // non-xml :nth-child(...) stores cache data on `parent` + if ( forward && useCache ) { + // Seek `elem` from a previously-cached index + outerCache = parent[ expando ] || (parent[ expando ] = {}); + cache = outerCache[ type ] || []; + nodeIndex = cache[0] === dirruns && cache[1]; + diff = cache[0] === dirruns && cache[2]; + node = nodeIndex && parent.childNodes[ nodeIndex ]; + + while ( (node = ++nodeIndex && node && node[ dir ] || + + // Fallback to seeking `elem` from the start + (diff = nodeIndex = 0) || start.pop()) ) { + + // When found, cache indexes on `parent` and break + if ( node.nodeType === 1 && ++diff && node === elem ) { + outerCache[ type ] = [ dirruns, nodeIndex, diff ]; + break; + } + } + + // Use previously-cached element index if available + } else if ( useCache && (cache = (elem[ expando ] || (elem[ expando ] = {}))[ type ]) && cache[0] === dirruns ) { + diff = cache[1]; + + // xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...) + } else { + // Use the same loop as above to seek `elem` from the start + while ( (node = ++nodeIndex && node && node[ dir ] || + (diff = nodeIndex = 0) || start.pop()) ) { + + if ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) { + // Cache the index of each encountered element + if ( useCache ) { + (node[ expando ] || (node[ expando ] = {}))[ type ] = [ dirruns, diff ]; + } + + if ( node === elem ) { + break; + } + } + } + } + + // Incorporate the offset, then check against cycle size + diff -= last; + return diff === first || ( diff % first === 0 && diff / first >= 0 ); + } + }; + }, + + "PSEUDO": function( pseudo, argument ) { + // pseudo-class names are case-insensitive + // http://www.w3.org/TR/selectors/#pseudo-classes + // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters + // Remember that setFilters inherits from pseudos + var args, + fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] || + Sizzle.error( "unsupported pseudo: " + pseudo ); + + // The user may use createPseudo to indicate that + // arguments are needed to create the filter function + // just as Sizzle does + if ( fn[ expando ] ) { + return fn( argument ); + } + + // But maintain support for old signatures + if ( fn.length > 1 ) { + args = [ pseudo, pseudo, "", argument ]; + return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ? + markFunction(function( seed, matches ) { + var idx, + matched = fn( seed, argument ), + i = matched.length; + while ( i-- ) { + idx = indexOf.call( seed, matched[i] ); + seed[ idx ] = !( matches[ idx ] = matched[i] ); + } + }) : + function( elem ) { + return fn( elem, 0, args ); + }; + } + + return fn; + } + }, + + pseudos: { + // Potentially complex pseudos + "not": markFunction(function( selector ) { + // Trim the selector passed to compile + // to avoid treating leading and trailing + // spaces as combinators + var input = [], + results = [], + matcher = compile( selector.replace( rtrim, "$1" ) ); + + return matcher[ expando ] ? + markFunction(function( seed, matches, context, xml ) { + var elem, + unmatched = matcher( seed, null, xml, [] ), + i = seed.length; + + // Match elements unmatched by `matcher` + while ( i-- ) { + if ( (elem = unmatched[i]) ) { + seed[i] = !(matches[i] = elem); + } + } + }) : + function( elem, context, xml ) { + input[0] = elem; + matcher( input, null, xml, results ); + return !results.pop(); + }; + }), + + "has": markFunction(function( selector ) { + return function( elem ) { + return Sizzle( selector, elem ).length > 0; + }; + }), + + "contains": markFunction(function( text ) { + return function( elem ) { + return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1; + }; + }), + + // "Whether an element is represented by a :lang() selector + // is based solely on the element's language value + // being equal to the identifier C, + // or beginning with the identifier C immediately followed by "-". + // The matching of C against the element's language value is performed case-insensitively. + // The identifier C does not have to be a valid language name." + // http://www.w3.org/TR/selectors/#lang-pseudo + "lang": markFunction( function( lang ) { + // lang value must be a valid identifier + if ( !ridentifier.test(lang || "") ) { + Sizzle.error( "unsupported lang: " + lang ); + } + lang = lang.replace( runescape, funescape ).toLowerCase(); + return function( elem ) { + var elemLang; + do { + if ( (elemLang = documentIsHTML ? + elem.lang : + elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) { + + elemLang = elemLang.toLowerCase(); + return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0; + } + } while ( (elem = elem.parentNode) && elem.nodeType === 1 ); + return false; + }; + }), + + // Miscellaneous + "target": function( elem ) { + var hash = window.location && window.location.hash; + return hash && hash.slice( 1 ) === elem.id; + }, + + "root": function( elem ) { + return elem === docElem; + }, + + "focus": function( elem ) { + return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex); + }, + + // Boolean properties + "enabled": function( elem ) { + return elem.disabled === false; + }, + + "disabled": function( elem ) { + return elem.disabled === true; + }, + + "checked": function( elem ) { + // In CSS3, :checked should return both checked and selected elements + // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked + var nodeName = elem.nodeName.toLowerCase(); + return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected); + }, + + "selected": function( elem ) { + // Accessing this property makes selected-by-default + // options in Safari work properly + if ( elem.parentNode ) { + elem.parentNode.selectedIndex; + } + + return elem.selected === true; + }, + + // Contents + "empty": function( elem ) { + // http://www.w3.org/TR/selectors/#empty-pseudo + // :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5), + // but not by others (comment: 8; processing instruction: 7; etc.) + // nodeType < 6 works because attributes (2) do not appear as children + for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { + if ( elem.nodeType < 6 ) { + return false; + } + } + return true; + }, + + "parent": function( elem ) { + return !Expr.pseudos["empty"]( elem ); + }, + + // Element/input types + "header": function( elem ) { + return rheader.test( elem.nodeName ); + }, + + "input": function( elem ) { + return rinputs.test( elem.nodeName ); + }, + + "button": function( elem ) { + var name = elem.nodeName.toLowerCase(); + return name === "input" && elem.type === "button" || name === "button"; + }, + + "text": function( elem ) { + var attr; + return elem.nodeName.toLowerCase() === "input" && + elem.type === "text" && + + // Support: IE<8 + // New HTML5 attribute values (e.g., "search") appear with elem.type === "text" + ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text" ); + }, + + // Position-in-collection + "first": createPositionalPseudo(function() { + return [ 0 ]; + }), + + "last": createPositionalPseudo(function( matchIndexes, length ) { + return [ length - 1 ]; + }), + + "eq": createPositionalPseudo(function( matchIndexes, length, argument ) { + return [ argument < 0 ? argument + length : argument ]; + }), + + "even": createPositionalPseudo(function( matchIndexes, length ) { + var i = 0; + for ( ; i < length; i += 2 ) { + matchIndexes.push( i ); + } + return matchIndexes; + }), + + "odd": createPositionalPseudo(function( matchIndexes, length ) { + var i = 1; + for ( ; i < length; i += 2 ) { + matchIndexes.push( i ); + } + return matchIndexes; + }), + + "lt": createPositionalPseudo(function( matchIndexes, length, argument ) { + var i = argument < 0 ? argument + length : argument; + for ( ; --i >= 0; ) { + matchIndexes.push( i ); + } + return matchIndexes; + }), + + "gt": createPositionalPseudo(function( matchIndexes, length, argument ) { + var i = argument < 0 ? argument + length : argument; + for ( ; ++i < length; ) { + matchIndexes.push( i ); + } + return matchIndexes; + }) + } +}; + +Expr.pseudos["nth"] = Expr.pseudos["eq"]; + +// Add button/input type pseudos +for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) { + Expr.pseudos[ i ] = createInputPseudo( i ); +} +for ( i in { submit: true, reset: true } ) { + Expr.pseudos[ i ] = createButtonPseudo( i ); +} + +// Easy API for creating new setFilters +function setFilters() {} +setFilters.prototype = Expr.filters = Expr.pseudos; +Expr.setFilters = new setFilters(); + +tokenize = Sizzle.tokenize = function( selector, parseOnly ) { + var matched, match, tokens, type, + soFar, groups, preFilters, + cached = tokenCache[ selector + " " ]; + + if ( cached ) { + return parseOnly ? 0 : cached.slice( 0 ); + } + + soFar = selector; + groups = []; + preFilters = Expr.preFilter; + + while ( soFar ) { + + // Comma and first run + if ( !matched || (match = rcomma.exec( soFar )) ) { + if ( match ) { + // Don't consume trailing commas as valid + soFar = soFar.slice( match[0].length ) || soFar; + } + groups.push( (tokens = []) ); + } + + matched = false; + + // Combinators + if ( (match = rcombinators.exec( soFar )) ) { + matched = match.shift(); + tokens.push({ + value: matched, + // Cast descendant combinators to space + type: match[0].replace( rtrim, " " ) + }); + soFar = soFar.slice( matched.length ); + } + + // Filters + for ( type in Expr.filter ) { + if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] || + (match = preFilters[ type ]( match ))) ) { + matched = match.shift(); + tokens.push({ + value: matched, + type: type, + matches: match + }); + soFar = soFar.slice( matched.length ); + } + } + + if ( !matched ) { + break; + } + } + + // Return the length of the invalid excess + // if we're just parsing + // Otherwise, throw an error or return tokens + return parseOnly ? + soFar.length : + soFar ? + Sizzle.error( selector ) : + // Cache the tokens + tokenCache( selector, groups ).slice( 0 ); +}; + +function toSelector( tokens ) { + var i = 0, + len = tokens.length, + selector = ""; + for ( ; i < len; i++ ) { + selector += tokens[i].value; + } + return selector; +} + +function addCombinator( matcher, combinator, base ) { + var dir = combinator.dir, + checkNonElements = base && dir === "parentNode", + doneName = done++; + + return combinator.first ? + // Check against closest ancestor/preceding element + function( elem, context, xml ) { + while ( (elem = elem[ dir ]) ) { + if ( elem.nodeType === 1 || checkNonElements ) { + return matcher( elem, context, xml ); + } + } + } : + + // Check against all ancestor/preceding elements + function( elem, context, xml ) { + var oldCache, outerCache, + newCache = [ dirruns, doneName ]; + + // We can't set arbitrary data on XML nodes, so they don't benefit from dir caching + if ( xml ) { + while ( (elem = elem[ dir ]) ) { + if ( elem.nodeType === 1 || checkNonElements ) { + if ( matcher( elem, context, xml ) ) { + return true; + } + } + } + } else { + while ( (elem = elem[ dir ]) ) { + if ( elem.nodeType === 1 || checkNonElements ) { + outerCache = elem[ expando ] || (elem[ expando ] = {}); + if ( (oldCache = outerCache[ dir ]) && + oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) { + + // Assign to newCache so results back-propagate to previous elements + return (newCache[ 2 ] = oldCache[ 2 ]); + } else { + // Reuse newcache so results back-propagate to previous elements + outerCache[ dir ] = newCache; + + // A match means we're done; a fail means we have to keep checking + if ( (newCache[ 2 ] = matcher( elem, context, xml )) ) { + return true; + } + } + } + } + } + }; +} + +function elementMatcher( matchers ) { + return matchers.length > 1 ? + function( elem, context, xml ) { + var i = matchers.length; + while ( i-- ) { + if ( !matchers[i]( elem, context, xml ) ) { + return false; + } + } + return true; + } : + matchers[0]; +} + +function multipleContexts( selector, contexts, results ) { + var i = 0, + len = contexts.length; + for ( ; i < len; i++ ) { + Sizzle( selector, contexts[i], results ); + } + return results; +} + +function condense( unmatched, map, filter, context, xml ) { + var elem, + newUnmatched = [], + i = 0, + len = unmatched.length, + mapped = map != null; + + for ( ; i < len; i++ ) { + if ( (elem = unmatched[i]) ) { + if ( !filter || filter( elem, context, xml ) ) { + newUnmatched.push( elem ); + if ( mapped ) { + map.push( i ); + } + } + } + } + + return newUnmatched; +} + +function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) { + if ( postFilter && !postFilter[ expando ] ) { + postFilter = setMatcher( postFilter ); + } + if ( postFinder && !postFinder[ expando ] ) { + postFinder = setMatcher( postFinder, postSelector ); + } + return markFunction(function( seed, results, context, xml ) { + var temp, i, elem, + preMap = [], + postMap = [], + preexisting = results.length, + + // Get initial elements from seed or context + elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ), + + // Prefilter to get matcher input, preserving a map for seed-results synchronization + matcherIn = preFilter && ( seed || !selector ) ? + condense( elems, preMap, preFilter, context, xml ) : + elems, + + matcherOut = matcher ? + // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results, + postFinder || ( seed ? preFilter : preexisting || postFilter ) ? + + // ...intermediate processing is necessary + [] : + + // ...otherwise use results directly + results : + matcherIn; + + // Find primary matches + if ( matcher ) { + matcher( matcherIn, matcherOut, context, xml ); + } + + // Apply postFilter + if ( postFilter ) { + temp = condense( matcherOut, postMap ); + postFilter( temp, [], context, xml ); + + // Un-match failing elements by moving them back to matcherIn + i = temp.length; + while ( i-- ) { + if ( (elem = temp[i]) ) { + matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem); + } + } + } + + if ( seed ) { + if ( postFinder || preFilter ) { + if ( postFinder ) { + // Get the final matcherOut by condensing this intermediate into postFinder contexts + temp = []; + i = matcherOut.length; + while ( i-- ) { + if ( (elem = matcherOut[i]) ) { + // Restore matcherIn since elem is not yet a final match + temp.push( (matcherIn[i] = elem) ); + } + } + postFinder( null, (matcherOut = []), temp, xml ); + } + + // Move matched elements from seed to results to keep them synchronized + i = matcherOut.length; + while ( i-- ) { + if ( (elem = matcherOut[i]) && + (temp = postFinder ? indexOf.call( seed, elem ) : preMap[i]) > -1 ) { + + seed[temp] = !(results[temp] = elem); + } + } + } + + // Add elements to results, through postFinder if defined + } else { + matcherOut = condense( + matcherOut === results ? + matcherOut.splice( preexisting, matcherOut.length ) : + matcherOut + ); + if ( postFinder ) { + postFinder( null, results, matcherOut, xml ); + } else { + push.apply( results, matcherOut ); + } + } + }); +} + +function matcherFromTokens( tokens ) { + var checkContext, matcher, j, + len = tokens.length, + leadingRelative = Expr.relative[ tokens[0].type ], + implicitRelative = leadingRelative || Expr.relative[" "], + i = leadingRelative ? 1 : 0, + + // The foundational matcher ensures that elements are reachable from top-level context(s) + matchContext = addCombinator( function( elem ) { + return elem === checkContext; + }, implicitRelative, true ), + matchAnyContext = addCombinator( function( elem ) { + return indexOf.call( checkContext, elem ) > -1; + }, implicitRelative, true ), + matchers = [ function( elem, context, xml ) { + return ( !leadingRelative && ( xml || context !== outermostContext ) ) || ( + (checkContext = context).nodeType ? + matchContext( elem, context, xml ) : + matchAnyContext( elem, context, xml ) ); + } ]; + + for ( ; i < len; i++ ) { + if ( (matcher = Expr.relative[ tokens[i].type ]) ) { + matchers = [ addCombinator(elementMatcher( matchers ), matcher) ]; + } else { + matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches ); + + // Return special upon seeing a positional matcher + if ( matcher[ expando ] ) { + // Find the next relative operator (if any) for proper handling + j = ++i; + for ( ; j < len; j++ ) { + if ( Expr.relative[ tokens[j].type ] ) { + break; + } + } + return setMatcher( + i > 1 && elementMatcher( matchers ), + i > 1 && toSelector( + // If the preceding token was a descendant combinator, insert an implicit any-element `*` + tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" }) + ).replace( rtrim, "$1" ), + matcher, + i < j && matcherFromTokens( tokens.slice( i, j ) ), + j < len && matcherFromTokens( (tokens = tokens.slice( j )) ), + j < len && toSelector( tokens ) + ); + } + matchers.push( matcher ); + } + } + + return elementMatcher( matchers ); +} + +function matcherFromGroupMatchers( elementMatchers, setMatchers ) { + var bySet = setMatchers.length > 0, + byElement = elementMatchers.length > 0, + superMatcher = function( seed, context, xml, results, outermost ) { + var elem, j, matcher, + matchedCount = 0, + i = "0", + unmatched = seed && [], + setMatched = [], + contextBackup = outermostContext, + // We must always have either seed elements or outermost context + elems = seed || byElement && Expr.find["TAG"]( "*", outermost ), + // Use integer dirruns iff this is the outermost matcher + dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1), + len = elems.length; + + if ( outermost ) { + outermostContext = context !== document && context; + } + + // Add elements passing elementMatchers directly to results + // Keep `i` a string if there are no elements so `matchedCount` will be "00" below + // Support: IE<9, Safari + // Tolerate NodeList properties (IE: "length"; Safari: ) matching elements by id + for ( ; i !== len && (elem = elems[i]) != null; i++ ) { + if ( byElement && elem ) { + j = 0; + while ( (matcher = elementMatchers[j++]) ) { + if ( matcher( elem, context, xml ) ) { + results.push( elem ); + break; + } + } + if ( outermost ) { + dirruns = dirrunsUnique; + } + } + + // Track unmatched elements for set filters + if ( bySet ) { + // They will have gone through all possible matchers + if ( (elem = !matcher && elem) ) { + matchedCount--; + } + + // Lengthen the array for every element, matched or not + if ( seed ) { + unmatched.push( elem ); + } + } + } + + // Apply set filters to unmatched elements + matchedCount += i; + if ( bySet && i !== matchedCount ) { + j = 0; + while ( (matcher = setMatchers[j++]) ) { + matcher( unmatched, setMatched, context, xml ); + } + + if ( seed ) { + // Reintegrate element matches to eliminate the need for sorting + if ( matchedCount > 0 ) { + while ( i-- ) { + if ( !(unmatched[i] || setMatched[i]) ) { + setMatched[i] = pop.call( results ); + } + } + } + + // Discard index placeholder values to get only actual matches + setMatched = condense( setMatched ); + } + + // Add matches to results + push.apply( results, setMatched ); + + // Seedless set matches succeeding multiple successful matchers stipulate sorting + if ( outermost && !seed && setMatched.length > 0 && + ( matchedCount + setMatchers.length ) > 1 ) { + + Sizzle.uniqueSort( results ); + } + } + + // Override manipulation of globals by nested matchers + if ( outermost ) { + dirruns = dirrunsUnique; + outermostContext = contextBackup; + } + + return unmatched; + }; + + return bySet ? + markFunction( superMatcher ) : + superMatcher; +} + +compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) { + var i, + setMatchers = [], + elementMatchers = [], + cached = compilerCache[ selector + " " ]; + + if ( !cached ) { + // Generate a function of recursive functions that can be used to check each element + if ( !match ) { + match = tokenize( selector ); + } + i = match.length; + while ( i-- ) { + cached = matcherFromTokens( match[i] ); + if ( cached[ expando ] ) { + setMatchers.push( cached ); + } else { + elementMatchers.push( cached ); + } + } + + // Cache the compiled function + cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) ); + + // Save selector and tokenization + cached.selector = selector; + } + return cached; +}; + +/** + * A low-level selection function that works with Sizzle's compiled + * selector functions + * @param {String|Function} selector A selector or a pre-compiled + * selector function built with Sizzle.compile + * @param {Element} context + * @param {Array} [results] + * @param {Array} [seed] A set of elements to match against + */ +select = Sizzle.select = function( selector, context, results, seed ) { + var i, tokens, token, type, find, + compiled = typeof selector === "function" && selector, + match = !seed && tokenize( (selector = compiled.selector || selector) ); + + results = results || []; + + // Try to minimize operations if there is no seed and only one group + if ( match.length === 1 ) { + + // Take a shortcut and set the context if the root selector is an ID + tokens = match[0] = match[0].slice( 0 ); + if ( tokens.length > 2 && (token = tokens[0]).type === "ID" && + support.getById && context.nodeType === 9 && documentIsHTML && + Expr.relative[ tokens[1].type ] ) { + + context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0]; + if ( !context ) { + return results; + + // Precompiled matchers will still verify ancestry, so step up a level + } else if ( compiled ) { + context = context.parentNode; + } + + selector = selector.slice( tokens.shift().value.length ); + } + + // Fetch a seed set for right-to-left matching + i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length; + while ( i-- ) { + token = tokens[i]; + + // Abort if we hit a combinator + if ( Expr.relative[ (type = token.type) ] ) { + break; + } + if ( (find = Expr.find[ type ]) ) { + // Search, expanding context for leading sibling combinators + if ( (seed = find( + token.matches[0].replace( runescape, funescape ), + rsibling.test( tokens[0].type ) && testContext( context.parentNode ) || context + )) ) { + + // If seed is empty or no tokens remain, we can return early + tokens.splice( i, 1 ); + selector = seed.length && toSelector( tokens ); + if ( !selector ) { + push.apply( results, seed ); + return results; + } + + break; + } + } + } + } + + // Compile and execute a filtering function if one is not provided + // Provide `match` to avoid retokenization if we modified the selector above + ( compiled || compile( selector, match ) )( + seed, + context, + !documentIsHTML, + results, + rsibling.test( selector ) && testContext( context.parentNode ) || context + ); + return results; +}; + +// One-time assignments + +// Sort stability +support.sortStable = expando.split("").sort( sortOrder ).join("") === expando; + +// Support: Chrome<14 +// Always assume duplicates if they aren't passed to the comparison function +support.detectDuplicates = !!hasDuplicate; + +// Initialize against the default document +setDocument(); + +// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27) +// Detached nodes confoundingly follow *each other* +support.sortDetached = assert(function( div1 ) { + // Should return 1, but returns 4 (following) + return div1.compareDocumentPosition( document.createElement("div") ) & 1; +}); + +// Support: IE<8 +// Prevent attribute/property "interpolation" +// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx +if ( !assert(function( div ) { + div.innerHTML = ""; + return div.firstChild.getAttribute("href") === "#" ; +}) ) { + addHandle( "type|href|height|width", function( elem, name, isXML ) { + if ( !isXML ) { + return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 ); + } + }); +} + +// Support: IE<9 +// Use defaultValue in place of getAttribute("value") +if ( !support.attributes || !assert(function( div ) { + div.innerHTML = ""; + div.firstChild.setAttribute( "value", "" ); + return div.firstChild.getAttribute( "value" ) === ""; +}) ) { + addHandle( "value", function( elem, name, isXML ) { + if ( !isXML && elem.nodeName.toLowerCase() === "input" ) { + return elem.defaultValue; + } + }); +} + +// Support: IE<9 +// Use getAttributeNode to fetch booleans when getAttribute lies +if ( !assert(function( div ) { + return div.getAttribute("disabled") == null; +}) ) { + addHandle( booleans, function( elem, name, isXML ) { + var val; + if ( !isXML ) { + return elem[ name ] === true ? name.toLowerCase() : + (val = elem.getAttributeNode( name )) && val.specified ? + val.value : + null; + } + }); +} + +return Sizzle; + +})( window ); + + + +jQuery.find = Sizzle; +jQuery.expr = Sizzle.selectors; +jQuery.expr[":"] = jQuery.expr.pseudos; +jQuery.unique = Sizzle.uniqueSort; +jQuery.text = Sizzle.getText; +jQuery.isXMLDoc = Sizzle.isXML; +jQuery.contains = Sizzle.contains; + + + +var rneedsContext = jQuery.expr.match.needsContext; + +var rsingleTag = (/^<(\w+)\s*\/?>(?:<\/\1>|)$/); + + + +var risSimple = /^.[^:#\[\.,]*$/; + +// Implement the identical functionality for filter and not +function winnow( elements, qualifier, not ) { + if ( jQuery.isFunction( qualifier ) ) { + return jQuery.grep( elements, function( elem, i ) { + /* jshint -W018 */ + return !!qualifier.call( elem, i, elem ) !== not; + }); + + } + + if ( qualifier.nodeType ) { + return jQuery.grep( elements, function( elem ) { + return ( elem === qualifier ) !== not; + }); + + } + + if ( typeof qualifier === "string" ) { + if ( risSimple.test( qualifier ) ) { + return jQuery.filter( qualifier, elements, not ); + } + + qualifier = jQuery.filter( qualifier, elements ); + } + + return jQuery.grep( elements, function( elem ) { + return ( indexOf.call( qualifier, elem ) >= 0 ) !== not; + }); +} + +jQuery.filter = function( expr, elems, not ) { + var elem = elems[ 0 ]; + + if ( not ) { + expr = ":not(" + expr + ")"; + } + + return elems.length === 1 && elem.nodeType === 1 ? + jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [] : + jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) { + return elem.nodeType === 1; + })); +}; + +jQuery.fn.extend({ + find: function( selector ) { + var i, + len = this.length, + ret = [], + self = this; + + if ( typeof selector !== "string" ) { + return this.pushStack( jQuery( selector ).filter(function() { + for ( i = 0; i < len; i++ ) { + if ( jQuery.contains( self[ i ], this ) ) { + return true; + } + } + }) ); + } + + for ( i = 0; i < len; i++ ) { + jQuery.find( selector, self[ i ], ret ); + } + + // Needed because $( selector, context ) becomes $( context ).find( selector ) + ret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret ); + ret.selector = this.selector ? this.selector + " " + selector : selector; + return ret; + }, + filter: function( selector ) { + return this.pushStack( winnow(this, selector || [], false) ); + }, + not: function( selector ) { + return this.pushStack( winnow(this, selector || [], true) ); + }, + is: function( selector ) { + return !!winnow( + this, + + // If this is a positional/relative selector, check membership in the returned set + // so $("p:first").is("p:last") won't return true for a doc with two "p". + typeof selector === "string" && rneedsContext.test( selector ) ? + jQuery( selector ) : + selector || [], + false + ).length; + } +}); + + +// Initialize a jQuery object + + +// A central reference to the root jQuery(document) +var rootjQuery, + + // A simple way to check for HTML strings + // Prioritize #id over to avoid XSS via location.hash (#9521) + // Strict HTML recognition (#11290: must start with <) + rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/, + + init = jQuery.fn.init = function( selector, context ) { + var match, elem; + + // HANDLE: $(""), $(null), $(undefined), $(false) + if ( !selector ) { + return this; + } + + // Handle HTML strings + if ( typeof selector === "string" ) { + if ( selector[0] === "<" && selector[ selector.length - 1 ] === ">" && selector.length >= 3 ) { + // Assume that strings that start and end with <> are HTML and skip the regex check + match = [ null, selector, null ]; + + } else { + match = rquickExpr.exec( selector ); + } + + // Match html or make sure no context is specified for #id + if ( match && (match[1] || !context) ) { + + // HANDLE: $(html) -> $(array) + if ( match[1] ) { + context = context instanceof jQuery ? context[0] : context; + + // scripts is true for back-compat + // Intentionally let the error be thrown if parseHTML is not present + jQuery.merge( this, jQuery.parseHTML( + match[1], + context && context.nodeType ? context.ownerDocument || context : document, + true + ) ); + + // HANDLE: $(html, props) + if ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) { + for ( match in context ) { + // Properties of context are called as methods if possible + if ( jQuery.isFunction( this[ match ] ) ) { + this[ match ]( context[ match ] ); + + // ...and otherwise set as attributes + } else { + this.attr( match, context[ match ] ); + } + } + } + + return this; + + // HANDLE: $(#id) + } else { + elem = document.getElementById( match[2] ); + + // Check parentNode to catch when Blackberry 4.6 returns + // nodes that are no longer in the document #6963 + if ( elem && elem.parentNode ) { + // Inject the element directly into the jQuery object + this.length = 1; + this[0] = elem; + } + + this.context = document; + this.selector = selector; + return this; + } + + // HANDLE: $(expr, $(...)) + } else if ( !context || context.jquery ) { + return ( context || rootjQuery ).find( selector ); + + // HANDLE: $(expr, context) + // (which is just equivalent to: $(context).find(expr) + } else { + return this.constructor( context ).find( selector ); + } + + // HANDLE: $(DOMElement) + } else if ( selector.nodeType ) { + this.context = this[0] = selector; + this.length = 1; + return this; + + // HANDLE: $(function) + // Shortcut for document ready + } else if ( jQuery.isFunction( selector ) ) { + return typeof rootjQuery.ready !== "undefined" ? + rootjQuery.ready( selector ) : + // Execute immediately if ready is not present + selector( jQuery ); + } + + if ( selector.selector !== undefined ) { + this.selector = selector.selector; + this.context = selector.context; + } + + return jQuery.makeArray( selector, this ); + }; + +// Give the init function the jQuery prototype for later instantiation +init.prototype = jQuery.fn; + +// Initialize central reference +rootjQuery = jQuery( document ); + + +var rparentsprev = /^(?:parents|prev(?:Until|All))/, + // methods guaranteed to produce a unique set when starting from a unique set + guaranteedUnique = { + children: true, + contents: true, + next: true, + prev: true + }; + +jQuery.extend({ + dir: function( elem, dir, until ) { + var matched = [], + truncate = until !== undefined; + + while ( (elem = elem[ dir ]) && elem.nodeType !== 9 ) { + if ( elem.nodeType === 1 ) { + if ( truncate && jQuery( elem ).is( until ) ) { + break; + } + matched.push( elem ); + } + } + return matched; + }, + + sibling: function( n, elem ) { + var matched = []; + + for ( ; n; n = n.nextSibling ) { + if ( n.nodeType === 1 && n !== elem ) { + matched.push( n ); + } + } + + return matched; + } +}); + +jQuery.fn.extend({ + has: function( target ) { + var targets = jQuery( target, this ), + l = targets.length; + + return this.filter(function() { + var i = 0; + for ( ; i < l; i++ ) { + if ( jQuery.contains( this, targets[i] ) ) { + return true; + } + } + }); + }, + + closest: function( selectors, context ) { + var cur, + i = 0, + l = this.length, + matched = [], + pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ? + jQuery( selectors, context || this.context ) : + 0; + + for ( ; i < l; i++ ) { + for ( cur = this[i]; cur && cur !== context; cur = cur.parentNode ) { + // Always skip document fragments + if ( cur.nodeType < 11 && (pos ? + pos.index(cur) > -1 : + + // Don't pass non-elements to Sizzle + cur.nodeType === 1 && + jQuery.find.matchesSelector(cur, selectors)) ) { + + matched.push( cur ); + break; + } + } + } + + return this.pushStack( matched.length > 1 ? jQuery.unique( matched ) : matched ); + }, + + // Determine the position of an element within + // the matched set of elements + index: function( elem ) { + + // No argument, return index in parent + if ( !elem ) { + return ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1; + } + + // index in selector + if ( typeof elem === "string" ) { + return indexOf.call( jQuery( elem ), this[ 0 ] ); + } + + // Locate the position of the desired element + return indexOf.call( this, + + // If it receives a jQuery object, the first element is used + elem.jquery ? elem[ 0 ] : elem + ); + }, + + add: function( selector, context ) { + return this.pushStack( + jQuery.unique( + jQuery.merge( this.get(), jQuery( selector, context ) ) + ) + ); + }, + + addBack: function( selector ) { + return this.add( selector == null ? + this.prevObject : this.prevObject.filter(selector) + ); + } +}); + +function sibling( cur, dir ) { + while ( (cur = cur[dir]) && cur.nodeType !== 1 ) {} + return cur; +} + +jQuery.each({ + parent: function( elem ) { + var parent = elem.parentNode; + return parent && parent.nodeType !== 11 ? parent : null; + }, + parents: function( elem ) { + return jQuery.dir( elem, "parentNode" ); + }, + parentsUntil: function( elem, i, until ) { + return jQuery.dir( elem, "parentNode", until ); + }, + next: function( elem ) { + return sibling( elem, "nextSibling" ); + }, + prev: function( elem ) { + return sibling( elem, "previousSibling" ); + }, + nextAll: function( elem ) { + return jQuery.dir( elem, "nextSibling" ); + }, + prevAll: function( elem ) { + return jQuery.dir( elem, "previousSibling" ); + }, + nextUntil: function( elem, i, until ) { + return jQuery.dir( elem, "nextSibling", until ); + }, + prevUntil: function( elem, i, until ) { + return jQuery.dir( elem, "previousSibling", until ); + }, + siblings: function( elem ) { + return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem ); + }, + children: function( elem ) { + return jQuery.sibling( elem.firstChild ); + }, + contents: function( elem ) { + return elem.contentDocument || jQuery.merge( [], elem.childNodes ); + } +}, function( name, fn ) { + jQuery.fn[ name ] = function( until, selector ) { + var matched = jQuery.map( this, fn, until ); + + if ( name.slice( -5 ) !== "Until" ) { + selector = until; + } + + if ( selector && typeof selector === "string" ) { + matched = jQuery.filter( selector, matched ); + } + + if ( this.length > 1 ) { + // Remove duplicates + if ( !guaranteedUnique[ name ] ) { + jQuery.unique( matched ); + } + + // Reverse order for parents* and prev-derivatives + if ( rparentsprev.test( name ) ) { + matched.reverse(); + } + } + + return this.pushStack( matched ); + }; +}); +var rnotwhite = (/\S+/g); + + + +// String to Object options format cache +var optionsCache = {}; + +// Convert String-formatted options into Object-formatted ones and store in cache +function createOptions( options ) { + var object = optionsCache[ options ] = {}; + jQuery.each( options.match( rnotwhite ) || [], function( _, flag ) { + object[ flag ] = true; + }); + return object; +} + +/* + * Create a callback list using the following parameters: + * + * options: an optional list of space-separated options that will change how + * the callback list behaves or a more traditional option object + * + * By default a callback list will act like an event callback list and can be + * "fired" multiple times. + * + * Possible options: + * + * once: will ensure the callback list can only be fired once (like a Deferred) + * + * memory: will keep track of previous values and will call any callback added + * after the list has been fired right away with the latest "memorized" + * values (like a Deferred) + * + * unique: will ensure a callback can only be added once (no duplicate in the list) + * + * stopOnFalse: interrupt callings when a callback returns false + * + */ +jQuery.Callbacks = function( options ) { + + // Convert options from String-formatted to Object-formatted if needed + // (we check in cache first) + options = typeof options === "string" ? + ( optionsCache[ options ] || createOptions( options ) ) : + jQuery.extend( {}, options ); + + var // Last fire value (for non-forgettable lists) + memory, + // Flag to know if list was already fired + fired, + // Flag to know if list is currently firing + firing, + // First callback to fire (used internally by add and fireWith) + firingStart, + // End of the loop when firing + firingLength, + // Index of currently firing callback (modified by remove if needed) + firingIndex, + // Actual callback list + list = [], + // Stack of fire calls for repeatable lists + stack = !options.once && [], + // Fire callbacks + fire = function( data ) { + memory = options.memory && data; + fired = true; + firingIndex = firingStart || 0; + firingStart = 0; + firingLength = list.length; + firing = true; + for ( ; list && firingIndex < firingLength; firingIndex++ ) { + if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) { + memory = false; // To prevent further calls using add + break; + } + } + firing = false; + if ( list ) { + if ( stack ) { + if ( stack.length ) { + fire( stack.shift() ); + } + } else if ( memory ) { + list = []; + } else { + self.disable(); + } + } + }, + // Actual Callbacks object + self = { + // Add a callback or a collection of callbacks to the list + add: function() { + if ( list ) { + // First, we save the current length + var start = list.length; + (function add( args ) { + jQuery.each( args, function( _, arg ) { + var type = jQuery.type( arg ); + if ( type === "function" ) { + if ( !options.unique || !self.has( arg ) ) { + list.push( arg ); + } + } else if ( arg && arg.length && type !== "string" ) { + // Inspect recursively + add( arg ); + } + }); + })( arguments ); + // Do we need to add the callbacks to the + // current firing batch? + if ( firing ) { + firingLength = list.length; + // With memory, if we're not firing then + // we should call right away + } else if ( memory ) { + firingStart = start; + fire( memory ); + } + } + return this; + }, + // Remove a callback from the list + remove: function() { + if ( list ) { + jQuery.each( arguments, function( _, arg ) { + var index; + while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) { + list.splice( index, 1 ); + // Handle firing indexes + if ( firing ) { + if ( index <= firingLength ) { + firingLength--; + } + if ( index <= firingIndex ) { + firingIndex--; + } + } + } + }); + } + return this; + }, + // Check if a given callback is in the list. + // If no argument is given, return whether or not list has callbacks attached. + has: function( fn ) { + return fn ? jQuery.inArray( fn, list ) > -1 : !!( list && list.length ); + }, + // Remove all callbacks from the list + empty: function() { + list = []; + firingLength = 0; + return this; + }, + // Have the list do nothing anymore + disable: function() { + list = stack = memory = undefined; + return this; + }, + // Is it disabled? + disabled: function() { + return !list; + }, + // Lock the list in its current state + lock: function() { + stack = undefined; + if ( !memory ) { + self.disable(); + } + return this; + }, + // Is it locked? + locked: function() { + return !stack; + }, + // Call all callbacks with the given context and arguments + fireWith: function( context, args ) { + if ( list && ( !fired || stack ) ) { + args = args || []; + args = [ context, args.slice ? args.slice() : args ]; + if ( firing ) { + stack.push( args ); + } else { + fire( args ); + } + } + return this; + }, + // Call all the callbacks with the given arguments + fire: function() { + self.fireWith( this, arguments ); + return this; + }, + // To know if the callbacks have already been called at least once + fired: function() { + return !!fired; + } + }; + + return self; +}; + + +jQuery.extend({ + + Deferred: function( func ) { + var tuples = [ + // action, add listener, listener list, final state + [ "resolve", "done", jQuery.Callbacks("once memory"), "resolved" ], + [ "reject", "fail", jQuery.Callbacks("once memory"), "rejected" ], + [ "notify", "progress", jQuery.Callbacks("memory") ] + ], + state = "pending", + promise = { + state: function() { + return state; + }, + always: function() { + deferred.done( arguments ).fail( arguments ); + return this; + }, + then: function( /* fnDone, fnFail, fnProgress */ ) { + var fns = arguments; + return jQuery.Deferred(function( newDefer ) { + jQuery.each( tuples, function( i, tuple ) { + var fn = jQuery.isFunction( fns[ i ] ) && fns[ i ]; + // deferred[ done | fail | progress ] for forwarding actions to newDefer + deferred[ tuple[1] ](function() { + var returned = fn && fn.apply( this, arguments ); + if ( returned && jQuery.isFunction( returned.promise ) ) { + returned.promise() + .done( newDefer.resolve ) + .fail( newDefer.reject ) + .progress( newDefer.notify ); + } else { + newDefer[ tuple[ 0 ] + "With" ]( this === promise ? newDefer.promise() : this, fn ? [ returned ] : arguments ); + } + }); + }); + fns = null; + }).promise(); + }, + // Get a promise for this deferred + // If obj is provided, the promise aspect is added to the object + promise: function( obj ) { + return obj != null ? jQuery.extend( obj, promise ) : promise; + } + }, + deferred = {}; + + // Keep pipe for back-compat + promise.pipe = promise.then; + + // Add list-specific methods + jQuery.each( tuples, function( i, tuple ) { + var list = tuple[ 2 ], + stateString = tuple[ 3 ]; + + // promise[ done | fail | progress ] = list.add + promise[ tuple[1] ] = list.add; + + // Handle state + if ( stateString ) { + list.add(function() { + // state = [ resolved | rejected ] + state = stateString; + + // [ reject_list | resolve_list ].disable; progress_list.lock + }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock ); + } + + // deferred[ resolve | reject | notify ] + deferred[ tuple[0] ] = function() { + deferred[ tuple[0] + "With" ]( this === deferred ? promise : this, arguments ); + return this; + }; + deferred[ tuple[0] + "With" ] = list.fireWith; + }); + + // Make the deferred a promise + promise.promise( deferred ); + + // Call given func if any + if ( func ) { + func.call( deferred, deferred ); + } + + // All done! + return deferred; + }, + + // Deferred helper + when: function( subordinate /* , ..., subordinateN */ ) { + var i = 0, + resolveValues = slice.call( arguments ), + length = resolveValues.length, + + // the count of uncompleted subordinates + remaining = length !== 1 || ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0, + + // the master Deferred. If resolveValues consist of only a single Deferred, just use that. + deferred = remaining === 1 ? subordinate : jQuery.Deferred(), + + // Update function for both resolve and progress values + updateFunc = function( i, contexts, values ) { + return function( value ) { + contexts[ i ] = this; + values[ i ] = arguments.length > 1 ? slice.call( arguments ) : value; + if ( values === progressValues ) { + deferred.notifyWith( contexts, values ); + } else if ( !( --remaining ) ) { + deferred.resolveWith( contexts, values ); + } + }; + }, + + progressValues, progressContexts, resolveContexts; + + // add listeners to Deferred subordinates; treat others as resolved + if ( length > 1 ) { + progressValues = new Array( length ); + progressContexts = new Array( length ); + resolveContexts = new Array( length ); + for ( ; i < length; i++ ) { + if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) { + resolveValues[ i ].promise() + .done( updateFunc( i, resolveContexts, resolveValues ) ) + .fail( deferred.reject ) + .progress( updateFunc( i, progressContexts, progressValues ) ); + } else { + --remaining; + } + } + } + + // if we're not waiting on anything, resolve the master + if ( !remaining ) { + deferred.resolveWith( resolveContexts, resolveValues ); + } + + return deferred.promise(); + } +}); + + +// The deferred used on DOM ready +var readyList; + +jQuery.fn.ready = function( fn ) { + // Add the callback + jQuery.ready.promise().done( fn ); + + return this; +}; + +jQuery.extend({ + // Is the DOM ready to be used? Set to true once it occurs. + isReady: false, + + // A counter to track how many items to wait for before + // the ready event fires. See #6781 + readyWait: 1, + + // Hold (or release) the ready event + holdReady: function( hold ) { + if ( hold ) { + jQuery.readyWait++; + } else { + jQuery.ready( true ); + } + }, + + // Handle when the DOM is ready + ready: function( wait ) { + + // Abort if there are pending holds or we're already ready + if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) { + return; + } + + // Remember that the DOM is ready + jQuery.isReady = true; + + // If a normal DOM Ready event fired, decrement, and wait if need be + if ( wait !== true && --jQuery.readyWait > 0 ) { + return; + } + + // If there are functions bound, to execute + readyList.resolveWith( document, [ jQuery ] ); + + // Trigger any bound ready events + if ( jQuery.fn.triggerHandler ) { + jQuery( document ).triggerHandler( "ready" ); + jQuery( document ).off( "ready" ); + } + } +}); + +/** + * The ready event handler and self cleanup method + */ +function completed() { + document.removeEventListener( "DOMContentLoaded", completed, false ); + window.removeEventListener( "load", completed, false ); + jQuery.ready(); +} + +jQuery.ready.promise = function( obj ) { + if ( !readyList ) { + + readyList = jQuery.Deferred(); + + // Catch cases where $(document).ready() is called after the browser event has already occurred. + // we once tried to use readyState "interactive" here, but it caused issues like the one + // discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15 + if ( document.readyState === "complete" ) { + // Handle it asynchronously to allow scripts the opportunity to delay ready + setTimeout( jQuery.ready ); + + } else { + + // Use the handy event callback + document.addEventListener( "DOMContentLoaded", completed, false ); + + // A fallback to window.onload, that will always work + window.addEventListener( "load", completed, false ); + } + } + return readyList.promise( obj ); +}; + +// Kick off the DOM ready check even if the user does not +jQuery.ready.promise(); + + + + +// Multifunctional method to get and set values of a collection +// The value/s can optionally be executed if it's a function +var access = jQuery.access = function( elems, fn, key, value, chainable, emptyGet, raw ) { + var i = 0, + len = elems.length, + bulk = key == null; + + // Sets many values + if ( jQuery.type( key ) === "object" ) { + chainable = true; + for ( i in key ) { + jQuery.access( elems, fn, i, key[i], true, emptyGet, raw ); + } + + // Sets one value + } else if ( value !== undefined ) { + chainable = true; + + if ( !jQuery.isFunction( value ) ) { + raw = true; + } + + if ( bulk ) { + // Bulk operations run against the entire set + if ( raw ) { + fn.call( elems, value ); + fn = null; + + // ...except when executing function values + } else { + bulk = fn; + fn = function( elem, key, value ) { + return bulk.call( jQuery( elem ), value ); + }; + } + } + + if ( fn ) { + for ( ; i < len; i++ ) { + fn( elems[i], key, raw ? value : value.call( elems[i], i, fn( elems[i], key ) ) ); + } + } + } + + return chainable ? + elems : + + // Gets + bulk ? + fn.call( elems ) : + len ? fn( elems[0], key ) : emptyGet; +}; + + +/** + * Determines whether an object can have data + */ +jQuery.acceptData = function( owner ) { + // Accepts only: + // - Node + // - Node.ELEMENT_NODE + // - Node.DOCUMENT_NODE + // - Object + // - Any + /* jshint -W018 */ + return owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType ); +}; + + +function Data() { + // Support: Android < 4, + // Old WebKit does not have Object.preventExtensions/freeze method, + // return new empty object instead with no [[set]] accessor + Object.defineProperty( this.cache = {}, 0, { + get: function() { + return {}; + } + }); + + this.expando = jQuery.expando + Math.random(); +} + +Data.uid = 1; +Data.accepts = jQuery.acceptData; + +Data.prototype = { + key: function( owner ) { + // We can accept data for non-element nodes in modern browsers, + // but we should not, see #8335. + // Always return the key for a frozen object. + if ( !Data.accepts( owner ) ) { + return 0; + } + + var descriptor = {}, + // Check if the owner object already has a cache key + unlock = owner[ this.expando ]; + + // If not, create one + if ( !unlock ) { + unlock = Data.uid++; + + // Secure it in a non-enumerable, non-writable property + try { + descriptor[ this.expando ] = { value: unlock }; + Object.defineProperties( owner, descriptor ); + + // Support: Android < 4 + // Fallback to a less secure definition + } catch ( e ) { + descriptor[ this.expando ] = unlock; + jQuery.extend( owner, descriptor ); + } + } + + // Ensure the cache object + if ( !this.cache[ unlock ] ) { + this.cache[ unlock ] = {}; + } + + return unlock; + }, + set: function( owner, data, value ) { + var prop, + // There may be an unlock assigned to this node, + // if there is no entry for this "owner", create one inline + // and set the unlock as though an owner entry had always existed + unlock = this.key( owner ), + cache = this.cache[ unlock ]; + + // Handle: [ owner, key, value ] args + if ( typeof data === "string" ) { + cache[ data ] = value; + + // Handle: [ owner, { properties } ] args + } else { + // Fresh assignments by object are shallow copied + if ( jQuery.isEmptyObject( cache ) ) { + jQuery.extend( this.cache[ unlock ], data ); + // Otherwise, copy the properties one-by-one to the cache object + } else { + for ( prop in data ) { + cache[ prop ] = data[ prop ]; + } + } + } + return cache; + }, + get: function( owner, key ) { + // Either a valid cache is found, or will be created. + // New caches will be created and the unlock returned, + // allowing direct access to the newly created + // empty data object. A valid owner object must be provided. + var cache = this.cache[ this.key( owner ) ]; + + return key === undefined ? + cache : cache[ key ]; + }, + access: function( owner, key, value ) { + var stored; + // In cases where either: + // + // 1. No key was specified + // 2. A string key was specified, but no value provided + // + // Take the "read" path and allow the get method to determine + // which value to return, respectively either: + // + // 1. The entire cache object + // 2. The data stored at the key + // + if ( key === undefined || + ((key && typeof key === "string") && value === undefined) ) { + + stored = this.get( owner, key ); + + return stored !== undefined ? + stored : this.get( owner, jQuery.camelCase(key) ); + } + + // [*]When the key is not a string, or both a key and value + // are specified, set or extend (existing objects) with either: + // + // 1. An object of properties + // 2. A key and value + // + this.set( owner, key, value ); + + // Since the "set" path can have two possible entry points + // return the expected data based on which path was taken[*] + return value !== undefined ? value : key; + }, + remove: function( owner, key ) { + var i, name, camel, + unlock = this.key( owner ), + cache = this.cache[ unlock ]; + + if ( key === undefined ) { + this.cache[ unlock ] = {}; + + } else { + // Support array or space separated string of keys + if ( jQuery.isArray( key ) ) { + // If "name" is an array of keys... + // When data is initially created, via ("key", "val") signature, + // keys will be converted to camelCase. + // Since there is no way to tell _how_ a key was added, remove + // both plain key and camelCase key. #12786 + // This will only penalize the array argument path. + name = key.concat( key.map( jQuery.camelCase ) ); + } else { + camel = jQuery.camelCase( key ); + // Try the string as a key before any manipulation + if ( key in cache ) { + name = [ key, camel ]; + } else { + // If a key with the spaces exists, use it. + // Otherwise, create an array by matching non-whitespace + name = camel; + name = name in cache ? + [ name ] : ( name.match( rnotwhite ) || [] ); + } + } + + i = name.length; + while ( i-- ) { + delete cache[ name[ i ] ]; + } + } + }, + hasData: function( owner ) { + return !jQuery.isEmptyObject( + this.cache[ owner[ this.expando ] ] || {} + ); + }, + discard: function( owner ) { + if ( owner[ this.expando ] ) { + delete this.cache[ owner[ this.expando ] ]; + } + } +}; +var data_priv = new Data(); + +var data_user = new Data(); + + + +/* + Implementation Summary + + 1. Enforce API surface and semantic compatibility with 1.9.x branch + 2. Improve the module's maintainability by reducing the storage + paths to a single mechanism. + 3. Use the same single mechanism to support "private" and "user" data. + 4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData) + 5. Avoid exposing implementation details on user objects (eg. expando properties) + 6. Provide a clear path for implementation upgrade to WeakMap in 2014 +*/ +var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/, + rmultiDash = /([A-Z])/g; + +function dataAttr( elem, key, data ) { + var name; + + // If nothing was found internally, try to fetch any + // data from the HTML5 data-* attribute + if ( data === undefined && elem.nodeType === 1 ) { + name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase(); + data = elem.getAttribute( name ); + + if ( typeof data === "string" ) { + try { + data = data === "true" ? true : + data === "false" ? false : + data === "null" ? null : + // Only convert to a number if it doesn't change the string + +data + "" === data ? +data : + rbrace.test( data ) ? jQuery.parseJSON( data ) : + data; + } catch( e ) {} + + // Make sure we set the data so it isn't changed later + data_user.set( elem, key, data ); + } else { + data = undefined; + } + } + return data; +} + +jQuery.extend({ + hasData: function( elem ) { + return data_user.hasData( elem ) || data_priv.hasData( elem ); + }, + + data: function( elem, name, data ) { + return data_user.access( elem, name, data ); + }, + + removeData: function( elem, name ) { + data_user.remove( elem, name ); + }, + + // TODO: Now that all calls to _data and _removeData have been replaced + // with direct calls to data_priv methods, these can be deprecated. + _data: function( elem, name, data ) { + return data_priv.access( elem, name, data ); + }, + + _removeData: function( elem, name ) { + data_priv.remove( elem, name ); + } +}); + +jQuery.fn.extend({ + data: function( key, value ) { + var i, name, data, + elem = this[ 0 ], + attrs = elem && elem.attributes; + + // Gets all values + if ( key === undefined ) { + if ( this.length ) { + data = data_user.get( elem ); + + if ( elem.nodeType === 1 && !data_priv.get( elem, "hasDataAttrs" ) ) { + i = attrs.length; + while ( i-- ) { + + // Support: IE11+ + // The attrs elements can be null (#14894) + if ( attrs[ i ] ) { + name = attrs[ i ].name; + if ( name.indexOf( "data-" ) === 0 ) { + name = jQuery.camelCase( name.slice(5) ); + dataAttr( elem, name, data[ name ] ); + } + } + } + data_priv.set( elem, "hasDataAttrs", true ); + } + } + + return data; + } + + // Sets multiple values + if ( typeof key === "object" ) { + return this.each(function() { + data_user.set( this, key ); + }); + } + + return access( this, function( value ) { + var data, + camelKey = jQuery.camelCase( key ); + + // The calling jQuery object (element matches) is not empty + // (and therefore has an element appears at this[ 0 ]) and the + // `value` parameter was not undefined. An empty jQuery object + // will result in `undefined` for elem = this[ 0 ] which will + // throw an exception if an attempt to read a data cache is made. + if ( elem && value === undefined ) { + // Attempt to get data from the cache + // with the key as-is + data = data_user.get( elem, key ); + if ( data !== undefined ) { + return data; + } + + // Attempt to get data from the cache + // with the key camelized + data = data_user.get( elem, camelKey ); + if ( data !== undefined ) { + return data; + } + + // Attempt to "discover" the data in + // HTML5 custom data-* attrs + data = dataAttr( elem, camelKey, undefined ); + if ( data !== undefined ) { + return data; + } + + // We tried really hard, but the data doesn't exist. + return; + } + + // Set the data... + this.each(function() { + // First, attempt to store a copy or reference of any + // data that might've been store with a camelCased key. + var data = data_user.get( this, camelKey ); + + // For HTML5 data-* attribute interop, we have to + // store property names with dashes in a camelCase form. + // This might not apply to all properties...* + data_user.set( this, camelKey, value ); + + // *... In the case of properties that might _actually_ + // have dashes, we need to also store a copy of that + // unchanged property. + if ( key.indexOf("-") !== -1 && data !== undefined ) { + data_user.set( this, key, value ); + } + }); + }, null, value, arguments.length > 1, null, true ); + }, + + removeData: function( key ) { + return this.each(function() { + data_user.remove( this, key ); + }); + } +}); + + +jQuery.extend({ + queue: function( elem, type, data ) { + var queue; + + if ( elem ) { + type = ( type || "fx" ) + "queue"; + queue = data_priv.get( elem, type ); + + // Speed up dequeue by getting out quickly if this is just a lookup + if ( data ) { + if ( !queue || jQuery.isArray( data ) ) { + queue = data_priv.access( elem, type, jQuery.makeArray(data) ); + } else { + queue.push( data ); + } + } + return queue || []; + } + }, + + dequeue: function( elem, type ) { + type = type || "fx"; + + var queue = jQuery.queue( elem, type ), + startLength = queue.length, + fn = queue.shift(), + hooks = jQuery._queueHooks( elem, type ), + next = function() { + jQuery.dequeue( elem, type ); + }; + + // If the fx queue is dequeued, always remove the progress sentinel + if ( fn === "inprogress" ) { + fn = queue.shift(); + startLength--; + } + + if ( fn ) { + + // Add a progress sentinel to prevent the fx queue from being + // automatically dequeued + if ( type === "fx" ) { + queue.unshift( "inprogress" ); + } + + // clear up the last queue stop function + delete hooks.stop; + fn.call( elem, next, hooks ); + } + + if ( !startLength && hooks ) { + hooks.empty.fire(); + } + }, + + // not intended for public consumption - generates a queueHooks object, or returns the current one + _queueHooks: function( elem, type ) { + var key = type + "queueHooks"; + return data_priv.get( elem, key ) || data_priv.access( elem, key, { + empty: jQuery.Callbacks("once memory").add(function() { + data_priv.remove( elem, [ type + "queue", key ] ); + }) + }); + } +}); + +jQuery.fn.extend({ + queue: function( type, data ) { + var setter = 2; + + if ( typeof type !== "string" ) { + data = type; + type = "fx"; + setter--; + } + + if ( arguments.length < setter ) { + return jQuery.queue( this[0], type ); + } + + return data === undefined ? + this : + this.each(function() { + var queue = jQuery.queue( this, type, data ); + + // ensure a hooks for this queue + jQuery._queueHooks( this, type ); + + if ( type === "fx" && queue[0] !== "inprogress" ) { + jQuery.dequeue( this, type ); + } + }); + }, + dequeue: function( type ) { + return this.each(function() { + jQuery.dequeue( this, type ); + }); + }, + clearQueue: function( type ) { + return this.queue( type || "fx", [] ); + }, + // Get a promise resolved when queues of a certain type + // are emptied (fx is the type by default) + promise: function( type, obj ) { + var tmp, + count = 1, + defer = jQuery.Deferred(), + elements = this, + i = this.length, + resolve = function() { + if ( !( --count ) ) { + defer.resolveWith( elements, [ elements ] ); + } + }; + + if ( typeof type !== "string" ) { + obj = type; + type = undefined; + } + type = type || "fx"; + + while ( i-- ) { + tmp = data_priv.get( elements[ i ], type + "queueHooks" ); + if ( tmp && tmp.empty ) { + count++; + tmp.empty.add( resolve ); + } + } + resolve(); + return defer.promise( obj ); + } +}); +var pnum = (/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/).source; + +var cssExpand = [ "Top", "Right", "Bottom", "Left" ]; + +var isHidden = function( elem, el ) { + // isHidden might be called from jQuery#filter function; + // in that case, element will be second argument + elem = el || elem; + return jQuery.css( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument, elem ); + }; + +var rcheckableType = (/^(?:checkbox|radio)$/i); + + + +(function() { + var fragment = document.createDocumentFragment(), + div = fragment.appendChild( document.createElement( "div" ) ), + input = document.createElement( "input" ); + + // #11217 - WebKit loses check when the name is after the checked attribute + // Support: Windows Web Apps (WWA) + // `name` and `type` need .setAttribute for WWA + input.setAttribute( "type", "radio" ); + input.setAttribute( "checked", "checked" ); + input.setAttribute( "name", "t" ); + + div.appendChild( input ); + + // Support: Safari 5.1, iOS 5.1, Android 4.x, Android 2.3 + // old WebKit doesn't clone checked state correctly in fragments + support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked; + + // Make sure textarea (and checkbox) defaultValue is properly cloned + // Support: IE9-IE11+ + div.innerHTML = ""; + support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue; +})(); +var strundefined = typeof undefined; + + + +support.focusinBubbles = "onfocusin" in window; + + +var + rkeyEvent = /^key/, + rmouseEvent = /^(?:mouse|pointer|contextmenu)|click/, + rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, + rtypenamespace = /^([^.]*)(?:\.(.+)|)$/; + +function returnTrue() { + return true; +} + +function returnFalse() { + return false; +} + +function safeActiveElement() { + try { + return document.activeElement; + } catch ( err ) { } +} + +/* + * Helper functions for managing events -- not part of the public interface. + * Props to Dean Edwards' addEvent library for many of the ideas. + */ +jQuery.event = { + + global: {}, + + add: function( elem, types, handler, data, selector ) { + + var handleObjIn, eventHandle, tmp, + events, t, handleObj, + special, handlers, type, namespaces, origType, + elemData = data_priv.get( elem ); + + // Don't attach events to noData or text/comment nodes (but allow plain objects) + if ( !elemData ) { + return; + } + + // Caller can pass in an object of custom data in lieu of the handler + if ( handler.handler ) { + handleObjIn = handler; + handler = handleObjIn.handler; + selector = handleObjIn.selector; + } + + // Make sure that the handler has a unique ID, used to find/remove it later + if ( !handler.guid ) { + handler.guid = jQuery.guid++; + } + + // Init the element's event structure and main handler, if this is the first + if ( !(events = elemData.events) ) { + events = elemData.events = {}; + } + if ( !(eventHandle = elemData.handle) ) { + eventHandle = elemData.handle = function( e ) { + // Discard the second event of a jQuery.event.trigger() and + // when an event is called after a page has unloaded + return typeof jQuery !== strundefined && jQuery.event.triggered !== e.type ? + jQuery.event.dispatch.apply( elem, arguments ) : undefined; + }; + } + + // Handle multiple events separated by a space + types = ( types || "" ).match( rnotwhite ) || [ "" ]; + t = types.length; + while ( t-- ) { + tmp = rtypenamespace.exec( types[t] ) || []; + type = origType = tmp[1]; + namespaces = ( tmp[2] || "" ).split( "." ).sort(); + + // There *must* be a type, no attaching namespace-only handlers + if ( !type ) { + continue; + } + + // If event changes its type, use the special event handlers for the changed type + special = jQuery.event.special[ type ] || {}; + + // If selector defined, determine special event api type, otherwise given type + type = ( selector ? special.delegateType : special.bindType ) || type; + + // Update special based on newly reset type + special = jQuery.event.special[ type ] || {}; + + // handleObj is passed to all event handlers + handleObj = jQuery.extend({ + type: type, + origType: origType, + data: data, + handler: handler, + guid: handler.guid, + selector: selector, + needsContext: selector && jQuery.expr.match.needsContext.test( selector ), + namespace: namespaces.join(".") + }, handleObjIn ); + + // Init the event handler queue if we're the first + if ( !(handlers = events[ type ]) ) { + handlers = events[ type ] = []; + handlers.delegateCount = 0; + + // Only use addEventListener if the special events handler returns false + if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) { + if ( elem.addEventListener ) { + elem.addEventListener( type, eventHandle, false ); + } + } + } + + if ( special.add ) { + special.add.call( elem, handleObj ); + + if ( !handleObj.handler.guid ) { + handleObj.handler.guid = handler.guid; + } + } + + // Add to the element's handler list, delegates in front + if ( selector ) { + handlers.splice( handlers.delegateCount++, 0, handleObj ); + } else { + handlers.push( handleObj ); + } + + // Keep track of which events have ever been used, for event optimization + jQuery.event.global[ type ] = true; + } + + }, + + // Detach an event or set of events from an element + remove: function( elem, types, handler, selector, mappedTypes ) { + + var j, origCount, tmp, + events, t, handleObj, + special, handlers, type, namespaces, origType, + elemData = data_priv.hasData( elem ) && data_priv.get( elem ); + + if ( !elemData || !(events = elemData.events) ) { + return; + } + + // Once for each type.namespace in types; type may be omitted + types = ( types || "" ).match( rnotwhite ) || [ "" ]; + t = types.length; + while ( t-- ) { + tmp = rtypenamespace.exec( types[t] ) || []; + type = origType = tmp[1]; + namespaces = ( tmp[2] || "" ).split( "." ).sort(); + + // Unbind all events (on this namespace, if provided) for the element + if ( !type ) { + for ( type in events ) { + jQuery.event.remove( elem, type + types[ t ], handler, selector, true ); + } + continue; + } + + special = jQuery.event.special[ type ] || {}; + type = ( selector ? special.delegateType : special.bindType ) || type; + handlers = events[ type ] || []; + tmp = tmp[2] && new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ); + + // Remove matching events + origCount = j = handlers.length; + while ( j-- ) { + handleObj = handlers[ j ]; + + if ( ( mappedTypes || origType === handleObj.origType ) && + ( !handler || handler.guid === handleObj.guid ) && + ( !tmp || tmp.test( handleObj.namespace ) ) && + ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) { + handlers.splice( j, 1 ); + + if ( handleObj.selector ) { + handlers.delegateCount--; + } + if ( special.remove ) { + special.remove.call( elem, handleObj ); + } + } + } + + // Remove generic event handler if we removed something and no more handlers exist + // (avoids potential for endless recursion during removal of special event handlers) + if ( origCount && !handlers.length ) { + if ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) { + jQuery.removeEvent( elem, type, elemData.handle ); + } + + delete events[ type ]; + } + } + + // Remove the expando if it's no longer used + if ( jQuery.isEmptyObject( events ) ) { + delete elemData.handle; + data_priv.remove( elem, "events" ); + } + }, + + trigger: function( event, data, elem, onlyHandlers ) { + + var i, cur, tmp, bubbleType, ontype, handle, special, + eventPath = [ elem || document ], + type = hasOwn.call( event, "type" ) ? event.type : event, + namespaces = hasOwn.call( event, "namespace" ) ? event.namespace.split(".") : []; + + cur = tmp = elem = elem || document; + + // Don't do events on text and comment nodes + if ( elem.nodeType === 3 || elem.nodeType === 8 ) { + return; + } + + // focus/blur morphs to focusin/out; ensure we're not firing them right now + if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { + return; + } + + if ( type.indexOf(".") >= 0 ) { + // Namespaced trigger; create a regexp to match event type in handle() + namespaces = type.split("."); + type = namespaces.shift(); + namespaces.sort(); + } + ontype = type.indexOf(":") < 0 && "on" + type; + + // Caller can pass in a jQuery.Event object, Object, or just an event type string + event = event[ jQuery.expando ] ? + event : + new jQuery.Event( type, typeof event === "object" && event ); + + // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true) + event.isTrigger = onlyHandlers ? 2 : 3; + event.namespace = namespaces.join("."); + event.namespace_re = event.namespace ? + new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ) : + null; + + // Clean up the event in case it is being reused + event.result = undefined; + if ( !event.target ) { + event.target = elem; + } + + // Clone any incoming data and prepend the event, creating the handler arg list + data = data == null ? + [ event ] : + jQuery.makeArray( data, [ event ] ); + + // Allow special events to draw outside the lines + special = jQuery.event.special[ type ] || {}; + if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) { + return; + } + + // Determine event propagation path in advance, per W3C events spec (#9951) + // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) + if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) { + + bubbleType = special.delegateType || type; + if ( !rfocusMorph.test( bubbleType + type ) ) { + cur = cur.parentNode; + } + for ( ; cur; cur = cur.parentNode ) { + eventPath.push( cur ); + tmp = cur; + } + + // Only add window if we got to document (e.g., not plain obj or detached DOM) + if ( tmp === (elem.ownerDocument || document) ) { + eventPath.push( tmp.defaultView || tmp.parentWindow || window ); + } + } + + // Fire handlers on the event path + i = 0; + while ( (cur = eventPath[i++]) && !event.isPropagationStopped() ) { + + event.type = i > 1 ? + bubbleType : + special.bindType || type; + + // jQuery handler + handle = ( data_priv.get( cur, "events" ) || {} )[ event.type ] && data_priv.get( cur, "handle" ); + if ( handle ) { + handle.apply( cur, data ); + } + + // Native handler + handle = ontype && cur[ ontype ]; + if ( handle && handle.apply && jQuery.acceptData( cur ) ) { + event.result = handle.apply( cur, data ); + if ( event.result === false ) { + event.preventDefault(); + } + } + } + event.type = type; + + // If nobody prevented the default action, do it now + if ( !onlyHandlers && !event.isDefaultPrevented() ) { + + if ( (!special._default || special._default.apply( eventPath.pop(), data ) === false) && + jQuery.acceptData( elem ) ) { + + // Call a native DOM method on the target with the same name name as the event. + // Don't do default actions on window, that's where global variables be (#6170) + if ( ontype && jQuery.isFunction( elem[ type ] ) && !jQuery.isWindow( elem ) ) { + + // Don't re-trigger an onFOO event when we call its FOO() method + tmp = elem[ ontype ]; + + if ( tmp ) { + elem[ ontype ] = null; + } + + // Prevent re-triggering of the same event, since we already bubbled it above + jQuery.event.triggered = type; + elem[ type ](); + jQuery.event.triggered = undefined; + + if ( tmp ) { + elem[ ontype ] = tmp; + } + } + } + } + + return event.result; + }, + + dispatch: function( event ) { + + // Make a writable jQuery.Event from the native event object + event = jQuery.event.fix( event ); + + var i, j, ret, matched, handleObj, + handlerQueue = [], + args = slice.call( arguments ), + handlers = ( data_priv.get( this, "events" ) || {} )[ event.type ] || [], + special = jQuery.event.special[ event.type ] || {}; + + // Use the fix-ed jQuery.Event rather than the (read-only) native event + args[0] = event; + event.delegateTarget = this; + + // Call the preDispatch hook for the mapped type, and let it bail if desired + if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) { + return; + } + + // Determine handlers + handlerQueue = jQuery.event.handlers.call( this, event, handlers ); + + // Run delegates first; they may want to stop propagation beneath us + i = 0; + while ( (matched = handlerQueue[ i++ ]) && !event.isPropagationStopped() ) { + event.currentTarget = matched.elem; + + j = 0; + while ( (handleObj = matched.handlers[ j++ ]) && !event.isImmediatePropagationStopped() ) { + + // Triggered event must either 1) have no namespace, or + // 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace). + if ( !event.namespace_re || event.namespace_re.test( handleObj.namespace ) ) { + + event.handleObj = handleObj; + event.data = handleObj.data; + + ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler ) + .apply( matched.elem, args ); + + if ( ret !== undefined ) { + if ( (event.result = ret) === false ) { + event.preventDefault(); + event.stopPropagation(); + } + } + } + } + } + + // Call the postDispatch hook for the mapped type + if ( special.postDispatch ) { + special.postDispatch.call( this, event ); + } + + return event.result; + }, + + handlers: function( event, handlers ) { + var i, matches, sel, handleObj, + handlerQueue = [], + delegateCount = handlers.delegateCount, + cur = event.target; + + // Find delegate handlers + // Black-hole SVG instance trees (#13180) + // Avoid non-left-click bubbling in Firefox (#3861) + if ( delegateCount && cur.nodeType && (!event.button || event.type !== "click") ) { + + for ( ; cur !== this; cur = cur.parentNode || this ) { + + // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764) + if ( cur.disabled !== true || event.type !== "click" ) { + matches = []; + for ( i = 0; i < delegateCount; i++ ) { + handleObj = handlers[ i ]; + + // Don't conflict with Object.prototype properties (#13203) + sel = handleObj.selector + " "; + + if ( matches[ sel ] === undefined ) { + matches[ sel ] = handleObj.needsContext ? + jQuery( sel, this ).index( cur ) >= 0 : + jQuery.find( sel, this, null, [ cur ] ).length; + } + if ( matches[ sel ] ) { + matches.push( handleObj ); + } + } + if ( matches.length ) { + handlerQueue.push({ elem: cur, handlers: matches }); + } + } + } + } + + // Add the remaining (directly-bound) handlers + if ( delegateCount < handlers.length ) { + handlerQueue.push({ elem: this, handlers: handlers.slice( delegateCount ) }); + } + + return handlerQueue; + }, + + // Includes some event props shared by KeyEvent and MouseEvent + props: "altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "), + + fixHooks: {}, + + keyHooks: { + props: "char charCode key keyCode".split(" "), + filter: function( event, original ) { + + // Add which for key events + if ( event.which == null ) { + event.which = original.charCode != null ? original.charCode : original.keyCode; + } + + return event; + } + }, + + mouseHooks: { + props: "button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "), + filter: function( event, original ) { + var eventDoc, doc, body, + button = original.button; + + // Calculate pageX/Y if missing and clientX/Y available + if ( event.pageX == null && original.clientX != null ) { + eventDoc = event.target.ownerDocument || document; + doc = eventDoc.documentElement; + body = eventDoc.body; + + event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 ); + event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 ); + } + + // Add which for click: 1 === left; 2 === middle; 3 === right + // Note: button is not normalized, so don't use it + if ( !event.which && button !== undefined ) { + event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) ); + } + + return event; + } + }, + + fix: function( event ) { + if ( event[ jQuery.expando ] ) { + return event; + } + + // Create a writable copy of the event object and normalize some properties + var i, prop, copy, + type = event.type, + originalEvent = event, + fixHook = this.fixHooks[ type ]; + + if ( !fixHook ) { + this.fixHooks[ type ] = fixHook = + rmouseEvent.test( type ) ? this.mouseHooks : + rkeyEvent.test( type ) ? this.keyHooks : + {}; + } + copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props; + + event = new jQuery.Event( originalEvent ); + + i = copy.length; + while ( i-- ) { + prop = copy[ i ]; + event[ prop ] = originalEvent[ prop ]; + } + + // Support: Cordova 2.5 (WebKit) (#13255) + // All events should have a target; Cordova deviceready doesn't + if ( !event.target ) { + event.target = document; + } + + // Support: Safari 6.0+, Chrome < 28 + // Target should not be a text node (#504, #13143) + if ( event.target.nodeType === 3 ) { + event.target = event.target.parentNode; + } + + return fixHook.filter ? fixHook.filter( event, originalEvent ) : event; + }, + + special: { + load: { + // Prevent triggered image.load events from bubbling to window.load + noBubble: true + }, + focus: { + // Fire native event if possible so blur/focus sequence is correct + trigger: function() { + if ( this !== safeActiveElement() && this.focus ) { + this.focus(); + return false; + } + }, + delegateType: "focusin" + }, + blur: { + trigger: function() { + if ( this === safeActiveElement() && this.blur ) { + this.blur(); + return false; + } + }, + delegateType: "focusout" + }, + click: { + // For checkbox, fire native event so checked state will be right + trigger: function() { + if ( this.type === "checkbox" && this.click && jQuery.nodeName( this, "input" ) ) { + this.click(); + return false; + } + }, + + // For cross-browser consistency, don't fire native .click() on links + _default: function( event ) { + return jQuery.nodeName( event.target, "a" ); + } + }, + + beforeunload: { + postDispatch: function( event ) { + + // Support: Firefox 20+ + // Firefox doesn't alert if the returnValue field is not set. + if ( event.result !== undefined && event.originalEvent ) { + event.originalEvent.returnValue = event.result; + } + } + } + }, + + simulate: function( type, elem, event, bubble ) { + // Piggyback on a donor event to simulate a different one. + // Fake originalEvent to avoid donor's stopPropagation, but if the + // simulated event prevents default then we do the same on the donor. + var e = jQuery.extend( + new jQuery.Event(), + event, + { + type: type, + isSimulated: true, + originalEvent: {} + } + ); + if ( bubble ) { + jQuery.event.trigger( e, null, elem ); + } else { + jQuery.event.dispatch.call( elem, e ); + } + if ( e.isDefaultPrevented() ) { + event.preventDefault(); + } + } +}; + +jQuery.removeEvent = function( elem, type, handle ) { + if ( elem.removeEventListener ) { + elem.removeEventListener( type, handle, false ); + } +}; + +jQuery.Event = function( src, props ) { + // Allow instantiation without the 'new' keyword + if ( !(this instanceof jQuery.Event) ) { + return new jQuery.Event( src, props ); + } + + // Event object + if ( src && src.type ) { + this.originalEvent = src; + this.type = src.type; + + // Events bubbling up the document may have been marked as prevented + // by a handler lower down the tree; reflect the correct value. + this.isDefaultPrevented = src.defaultPrevented || + src.defaultPrevented === undefined && + // Support: Android < 4.0 + src.returnValue === false ? + returnTrue : + returnFalse; + + // Event type + } else { + this.type = src; + } + + // Put explicitly provided properties onto the event object + if ( props ) { + jQuery.extend( this, props ); + } + + // Create a timestamp if incoming event doesn't have one + this.timeStamp = src && src.timeStamp || jQuery.now(); + + // Mark it as fixed + this[ jQuery.expando ] = true; +}; + +// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding +// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html +jQuery.Event.prototype = { + isDefaultPrevented: returnFalse, + isPropagationStopped: returnFalse, + isImmediatePropagationStopped: returnFalse, + + preventDefault: function() { + var e = this.originalEvent; + + this.isDefaultPrevented = returnTrue; + + if ( e && e.preventDefault ) { + e.preventDefault(); + } + }, + stopPropagation: function() { + var e = this.originalEvent; + + this.isPropagationStopped = returnTrue; + + if ( e && e.stopPropagation ) { + e.stopPropagation(); + } + }, + stopImmediatePropagation: function() { + var e = this.originalEvent; + + this.isImmediatePropagationStopped = returnTrue; + + if ( e && e.stopImmediatePropagation ) { + e.stopImmediatePropagation(); + } + + this.stopPropagation(); + } +}; + +// Create mouseenter/leave events using mouseover/out and event-time checks +// Support: Chrome 15+ +jQuery.each({ + mouseenter: "mouseover", + mouseleave: "mouseout", + pointerenter: "pointerover", + pointerleave: "pointerout" +}, function( orig, fix ) { + jQuery.event.special[ orig ] = { + delegateType: fix, + bindType: fix, + + handle: function( event ) { + var ret, + target = this, + related = event.relatedTarget, + handleObj = event.handleObj; + + // For mousenter/leave call the handler if related is outside the target. + // NB: No relatedTarget if the mouse left/entered the browser window + if ( !related || (related !== target && !jQuery.contains( target, related )) ) { + event.type = handleObj.origType; + ret = handleObj.handler.apply( this, arguments ); + event.type = fix; + } + return ret; + } + }; +}); + +// Create "bubbling" focus and blur events +// Support: Firefox, Chrome, Safari +if ( !support.focusinBubbles ) { + jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) { + + // Attach a single capturing handler on the document while someone wants focusin/focusout + var handler = function( event ) { + jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true ); + }; + + jQuery.event.special[ fix ] = { + setup: function() { + var doc = this.ownerDocument || this, + attaches = data_priv.access( doc, fix ); + + if ( !attaches ) { + doc.addEventListener( orig, handler, true ); + } + data_priv.access( doc, fix, ( attaches || 0 ) + 1 ); + }, + teardown: function() { + var doc = this.ownerDocument || this, + attaches = data_priv.access( doc, fix ) - 1; + + if ( !attaches ) { + doc.removeEventListener( orig, handler, true ); + data_priv.remove( doc, fix ); + + } else { + data_priv.access( doc, fix, attaches ); + } + } + }; + }); +} + +jQuery.fn.extend({ + + on: function( types, selector, data, fn, /*INTERNAL*/ one ) { + var origFn, type; + + // Types can be a map of types/handlers + if ( typeof types === "object" ) { + // ( types-Object, selector, data ) + if ( typeof selector !== "string" ) { + // ( types-Object, data ) + data = data || selector; + selector = undefined; + } + for ( type in types ) { + this.on( type, selector, data, types[ type ], one ); + } + return this; + } + + if ( data == null && fn == null ) { + // ( types, fn ) + fn = selector; + data = selector = undefined; + } else if ( fn == null ) { + if ( typeof selector === "string" ) { + // ( types, selector, fn ) + fn = data; + data = undefined; + } else { + // ( types, data, fn ) + fn = data; + data = selector; + selector = undefined; + } + } + if ( fn === false ) { + fn = returnFalse; + } else if ( !fn ) { + return this; + } + + if ( one === 1 ) { + origFn = fn; + fn = function( event ) { + // Can use an empty set, since event contains the info + jQuery().off( event ); + return origFn.apply( this, arguments ); + }; + // Use same guid so caller can remove using origFn + fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); + } + return this.each( function() { + jQuery.event.add( this, types, fn, data, selector ); + }); + }, + one: function( types, selector, data, fn ) { + return this.on( types, selector, data, fn, 1 ); + }, + off: function( types, selector, fn ) { + var handleObj, type; + if ( types && types.preventDefault && types.handleObj ) { + // ( event ) dispatched jQuery.Event + handleObj = types.handleObj; + jQuery( types.delegateTarget ).off( + handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType, + handleObj.selector, + handleObj.handler + ); + return this; + } + if ( typeof types === "object" ) { + // ( types-object [, selector] ) + for ( type in types ) { + this.off( type, selector, types[ type ] ); + } + return this; + } + if ( selector === false || typeof selector === "function" ) { + // ( types [, fn] ) + fn = selector; + selector = undefined; + } + if ( fn === false ) { + fn = returnFalse; + } + return this.each(function() { + jQuery.event.remove( this, types, fn, selector ); + }); + }, + + trigger: function( type, data ) { + return this.each(function() { + jQuery.event.trigger( type, data, this ); + }); + }, + triggerHandler: function( type, data ) { + var elem = this[0]; + if ( elem ) { + return jQuery.event.trigger( type, data, elem, true ); + } + } +}); + + +var + rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi, + rtagName = /<([\w:]+)/, + rhtml = /<|&#?\w+;/, + rnoInnerhtml = /<(?:script|style|link)/i, + // checked="checked" or checked + rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i, + rscriptType = /^$|\/(?:java|ecma)script/i, + rscriptTypeMasked = /^true\/(.*)/, + rcleanScript = /^\s*\s*$/g, + + // We have to close these tags to support XHTML (#13200) + wrapMap = { + + // Support: IE 9 + option: [ 1, "" ], + + thead: [ 1, "", "
" ], + col: [ 2, "", "
" ], + tr: [ 2, "", "
" ], + td: [ 3, "", "
" ], + + _default: [ 0, "", "" ] + }; + +// Support: IE 9 +wrapMap.optgroup = wrapMap.option; + +wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; +wrapMap.th = wrapMap.td; + +// Support: 1.x compatibility +// Manipulating tables requires a tbody +function manipulationTarget( elem, content ) { + return jQuery.nodeName( elem, "table" ) && + jQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ? + + elem.getElementsByTagName("tbody")[0] || + elem.appendChild( elem.ownerDocument.createElement("tbody") ) : + elem; +} + +// Replace/restore the type attribute of script elements for safe DOM manipulation +function disableScript( elem ) { + elem.type = (elem.getAttribute("type") !== null) + "/" + elem.type; + return elem; +} +function restoreScript( elem ) { + var match = rscriptTypeMasked.exec( elem.type ); + + if ( match ) { + elem.type = match[ 1 ]; + } else { + elem.removeAttribute("type"); + } + + return elem; +} + +// Mark scripts as having already been evaluated +function setGlobalEval( elems, refElements ) { + var i = 0, + l = elems.length; + + for ( ; i < l; i++ ) { + data_priv.set( + elems[ i ], "globalEval", !refElements || data_priv.get( refElements[ i ], "globalEval" ) + ); + } +} + +function cloneCopyEvent( src, dest ) { + var i, l, type, pdataOld, pdataCur, udataOld, udataCur, events; + + if ( dest.nodeType !== 1 ) { + return; + } + + // 1. Copy private data: events, handlers, etc. + if ( data_priv.hasData( src ) ) { + pdataOld = data_priv.access( src ); + pdataCur = data_priv.set( dest, pdataOld ); + events = pdataOld.events; + + if ( events ) { + delete pdataCur.handle; + pdataCur.events = {}; + + for ( type in events ) { + for ( i = 0, l = events[ type ].length; i < l; i++ ) { + jQuery.event.add( dest, type, events[ type ][ i ] ); + } + } + } + } + + // 2. Copy user data + if ( data_user.hasData( src ) ) { + udataOld = data_user.access( src ); + udataCur = jQuery.extend( {}, udataOld ); + + data_user.set( dest, udataCur ); + } +} + +function getAll( context, tag ) { + var ret = context.getElementsByTagName ? context.getElementsByTagName( tag || "*" ) : + context.querySelectorAll ? context.querySelectorAll( tag || "*" ) : + []; + + return tag === undefined || tag && jQuery.nodeName( context, tag ) ? + jQuery.merge( [ context ], ret ) : + ret; +} + +// Support: IE >= 9 +function fixInput( src, dest ) { + var nodeName = dest.nodeName.toLowerCase(); + + // Fails to persist the checked state of a cloned checkbox or radio button. + if ( nodeName === "input" && rcheckableType.test( src.type ) ) { + dest.checked = src.checked; + + // Fails to return the selected option to the default selected state when cloning options + } else if ( nodeName === "input" || nodeName === "textarea" ) { + dest.defaultValue = src.defaultValue; + } +} + +jQuery.extend({ + clone: function( elem, dataAndEvents, deepDataAndEvents ) { + var i, l, srcElements, destElements, + clone = elem.cloneNode( true ), + inPage = jQuery.contains( elem.ownerDocument, elem ); + + // Support: IE >= 9 + // Fix Cloning issues + if ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) && + !jQuery.isXMLDoc( elem ) ) { + + // We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2 + destElements = getAll( clone ); + srcElements = getAll( elem ); + + for ( i = 0, l = srcElements.length; i < l; i++ ) { + fixInput( srcElements[ i ], destElements[ i ] ); + } + } + + // Copy the events from the original to the clone + if ( dataAndEvents ) { + if ( deepDataAndEvents ) { + srcElements = srcElements || getAll( elem ); + destElements = destElements || getAll( clone ); + + for ( i = 0, l = srcElements.length; i < l; i++ ) { + cloneCopyEvent( srcElements[ i ], destElements[ i ] ); + } + } else { + cloneCopyEvent( elem, clone ); + } + } + + // Preserve script evaluation history + destElements = getAll( clone, "script" ); + if ( destElements.length > 0 ) { + setGlobalEval( destElements, !inPage && getAll( elem, "script" ) ); + } + + // Return the cloned set + return clone; + }, + + buildFragment: function( elems, context, scripts, selection ) { + var elem, tmp, tag, wrap, contains, j, + fragment = context.createDocumentFragment(), + nodes = [], + i = 0, + l = elems.length; + + for ( ; i < l; i++ ) { + elem = elems[ i ]; + + if ( elem || elem === 0 ) { + + // Add nodes directly + if ( jQuery.type( elem ) === "object" ) { + // Support: QtWebKit + // jQuery.merge because push.apply(_, arraylike) throws + jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem ); + + // Convert non-html into a text node + } else if ( !rhtml.test( elem ) ) { + nodes.push( context.createTextNode( elem ) ); + + // Convert html into DOM nodes + } else { + tmp = tmp || fragment.appendChild( context.createElement("div") ); + + // Deserialize a standard representation + tag = ( rtagName.exec( elem ) || [ "", "" ] )[ 1 ].toLowerCase(); + wrap = wrapMap[ tag ] || wrapMap._default; + tmp.innerHTML = wrap[ 1 ] + elem.replace( rxhtmlTag, "<$1>" ) + wrap[ 2 ]; + + // Descend through wrappers to the right content + j = wrap[ 0 ]; + while ( j-- ) { + tmp = tmp.lastChild; + } + + // Support: QtWebKit + // jQuery.merge because push.apply(_, arraylike) throws + jQuery.merge( nodes, tmp.childNodes ); + + // Remember the top-level container + tmp = fragment.firstChild; + + // Fixes #12346 + // Support: Webkit, IE + tmp.textContent = ""; + } + } + } + + // Remove wrapper from fragment + fragment.textContent = ""; + + i = 0; + while ( (elem = nodes[ i++ ]) ) { + + // #4087 - If origin and destination elements are the same, and this is + // that element, do not do anything + if ( selection && jQuery.inArray( elem, selection ) !== -1 ) { + continue; + } + + contains = jQuery.contains( elem.ownerDocument, elem ); + + // Append to fragment + tmp = getAll( fragment.appendChild( elem ), "script" ); + + // Preserve script evaluation history + if ( contains ) { + setGlobalEval( tmp ); + } + + // Capture executables + if ( scripts ) { + j = 0; + while ( (elem = tmp[ j++ ]) ) { + if ( rscriptType.test( elem.type || "" ) ) { + scripts.push( elem ); + } + } + } + } + + return fragment; + }, + + cleanData: function( elems ) { + var data, elem, type, key, + special = jQuery.event.special, + i = 0; + + for ( ; (elem = elems[ i ]) !== undefined; i++ ) { + if ( jQuery.acceptData( elem ) ) { + key = elem[ data_priv.expando ]; + + if ( key && (data = data_priv.cache[ key ]) ) { + if ( data.events ) { + for ( type in data.events ) { + if ( special[ type ] ) { + jQuery.event.remove( elem, type ); + + // This is a shortcut to avoid jQuery.event.remove's overhead + } else { + jQuery.removeEvent( elem, type, data.handle ); + } + } + } + if ( data_priv.cache[ key ] ) { + // Discard any remaining `private` data + delete data_priv.cache[ key ]; + } + } + } + // Discard any remaining `user` data + delete data_user.cache[ elem[ data_user.expando ] ]; + } + } +}); + +jQuery.fn.extend({ + text: function( value ) { + return access( this, function( value ) { + return value === undefined ? + jQuery.text( this ) : + this.empty().each(function() { + if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { + this.textContent = value; + } + }); + }, null, value, arguments.length ); + }, + + append: function() { + return this.domManip( arguments, function( elem ) { + if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { + var target = manipulationTarget( this, elem ); + target.appendChild( elem ); + } + }); + }, + + prepend: function() { + return this.domManip( arguments, function( elem ) { + if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { + var target = manipulationTarget( this, elem ); + target.insertBefore( elem, target.firstChild ); + } + }); + }, + + before: function() { + return this.domManip( arguments, function( elem ) { + if ( this.parentNode ) { + this.parentNode.insertBefore( elem, this ); + } + }); + }, + + after: function() { + return this.domManip( arguments, function( elem ) { + if ( this.parentNode ) { + this.parentNode.insertBefore( elem, this.nextSibling ); + } + }); + }, + + remove: function( selector, keepData /* Internal Use Only */ ) { + var elem, + elems = selector ? jQuery.filter( selector, this ) : this, + i = 0; + + for ( ; (elem = elems[i]) != null; i++ ) { + if ( !keepData && elem.nodeType === 1 ) { + jQuery.cleanData( getAll( elem ) ); + } + + if ( elem.parentNode ) { + if ( keepData && jQuery.contains( elem.ownerDocument, elem ) ) { + setGlobalEval( getAll( elem, "script" ) ); + } + elem.parentNode.removeChild( elem ); + } + } + + return this; + }, + + empty: function() { + var elem, + i = 0; + + for ( ; (elem = this[i]) != null; i++ ) { + if ( elem.nodeType === 1 ) { + + // Prevent memory leaks + jQuery.cleanData( getAll( elem, false ) ); + + // Remove any remaining nodes + elem.textContent = ""; + } + } + + return this; + }, + + clone: function( dataAndEvents, deepDataAndEvents ) { + dataAndEvents = dataAndEvents == null ? false : dataAndEvents; + deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; + + return this.map(function() { + return jQuery.clone( this, dataAndEvents, deepDataAndEvents ); + }); + }, + + html: function( value ) { + return access( this, function( value ) { + var elem = this[ 0 ] || {}, + i = 0, + l = this.length; + + if ( value === undefined && elem.nodeType === 1 ) { + return elem.innerHTML; + } + + // See if we can take a shortcut and just use innerHTML + if ( typeof value === "string" && !rnoInnerhtml.test( value ) && + !wrapMap[ ( rtagName.exec( value ) || [ "", "" ] )[ 1 ].toLowerCase() ] ) { + + value = value.replace( rxhtmlTag, "<$1>" ); + + try { + for ( ; i < l; i++ ) { + elem = this[ i ] || {}; + + // Remove element nodes and prevent memory leaks + if ( elem.nodeType === 1 ) { + jQuery.cleanData( getAll( elem, false ) ); + elem.innerHTML = value; + } + } + + elem = 0; + + // If using innerHTML throws an exception, use the fallback method + } catch( e ) {} + } + + if ( elem ) { + this.empty().append( value ); + } + }, null, value, arguments.length ); + }, + + replaceWith: function() { + var arg = arguments[ 0 ]; + + // Make the changes, replacing each context element with the new content + this.domManip( arguments, function( elem ) { + arg = this.parentNode; + + jQuery.cleanData( getAll( this ) ); + + if ( arg ) { + arg.replaceChild( elem, this ); + } + }); + + // Force removal if there was no new content (e.g., from empty arguments) + return arg && (arg.length || arg.nodeType) ? this : this.remove(); + }, + + detach: function( selector ) { + return this.remove( selector, true ); + }, + + domManip: function( args, callback ) { + + // Flatten any nested arrays + args = concat.apply( [], args ); + + var fragment, first, scripts, hasScripts, node, doc, + i = 0, + l = this.length, + set = this, + iNoClone = l - 1, + value = args[ 0 ], + isFunction = jQuery.isFunction( value ); + + // We can't cloneNode fragments that contain checked, in WebKit + if ( isFunction || + ( l > 1 && typeof value === "string" && + !support.checkClone && rchecked.test( value ) ) ) { + return this.each(function( index ) { + var self = set.eq( index ); + if ( isFunction ) { + args[ 0 ] = value.call( this, index, self.html() ); + } + self.domManip( args, callback ); + }); + } + + if ( l ) { + fragment = jQuery.buildFragment( args, this[ 0 ].ownerDocument, false, this ); + first = fragment.firstChild; + + if ( fragment.childNodes.length === 1 ) { + fragment = first; + } + + if ( first ) { + scripts = jQuery.map( getAll( fragment, "script" ), disableScript ); + hasScripts = scripts.length; + + // Use the original fragment for the last item instead of the first because it can end up + // being emptied incorrectly in certain situations (#8070). + for ( ; i < l; i++ ) { + node = fragment; + + if ( i !== iNoClone ) { + node = jQuery.clone( node, true, true ); + + // Keep references to cloned scripts for later restoration + if ( hasScripts ) { + // Support: QtWebKit + // jQuery.merge because push.apply(_, arraylike) throws + jQuery.merge( scripts, getAll( node, "script" ) ); + } + } + + callback.call( this[ i ], node, i ); + } + + if ( hasScripts ) { + doc = scripts[ scripts.length - 1 ].ownerDocument; + + // Reenable scripts + jQuery.map( scripts, restoreScript ); + + // Evaluate executable scripts on first document insertion + for ( i = 0; i < hasScripts; i++ ) { + node = scripts[ i ]; + if ( rscriptType.test( node.type || "" ) && + !data_priv.access( node, "globalEval" ) && jQuery.contains( doc, node ) ) { + + if ( node.src ) { + // Optional AJAX dependency, but won't run scripts if not present + if ( jQuery._evalUrl ) { + jQuery._evalUrl( node.src ); + } + } else { + jQuery.globalEval( node.textContent.replace( rcleanScript, "" ) ); + } + } + } + } + } + } + + return this; + } +}); + +jQuery.each({ + appendTo: "append", + prependTo: "prepend", + insertBefore: "before", + insertAfter: "after", + replaceAll: "replaceWith" +}, function( name, original ) { + jQuery.fn[ name ] = function( selector ) { + var elems, + ret = [], + insert = jQuery( selector ), + last = insert.length - 1, + i = 0; + + for ( ; i <= last; i++ ) { + elems = i === last ? this : this.clone( true ); + jQuery( insert[ i ] )[ original ]( elems ); + + // Support: QtWebKit + // .get() because push.apply(_, arraylike) throws + push.apply( ret, elems.get() ); + } + + return this.pushStack( ret ); + }; +}); + + +var iframe, + elemdisplay = {}; + +/** + * Retrieve the actual display of a element + * @param {String} name nodeName of the element + * @param {Object} doc Document object + */ +// Called only from within defaultDisplay +function actualDisplay( name, doc ) { + var style, + elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ), + + // getDefaultComputedStyle might be reliably used only on attached element + display = window.getDefaultComputedStyle && ( style = window.getDefaultComputedStyle( elem[ 0 ] ) ) ? + + // Use of this method is a temporary fix (more like optmization) until something better comes along, + // since it was removed from specification and supported only in FF + style.display : jQuery.css( elem[ 0 ], "display" ); + + // We don't have any data stored on the element, + // so use "detach" method as fast way to get rid of the element + elem.detach(); + + return display; +} + +/** + * Try to determine the default display value of an element + * @param {String} nodeName + */ +function defaultDisplay( nodeName ) { + var doc = document, + display = elemdisplay[ nodeName ]; + + if ( !display ) { + display = actualDisplay( nodeName, doc ); + + // If the simple way fails, read from inside an iframe + if ( display === "none" || !display ) { + + // Use the already-created iframe if possible + iframe = (iframe || jQuery( " + +
+ + Light 300 +
+ AaBbCcDdEeFfGgHhJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz +
+ + Light 300 Italic +
+ AaBbCcDdEeFfGgHhJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz +
+ + Normal 400 +
+ AaBbCcDdEeFfGgHhJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz +
+ + Normal 400 Italic +
+ AaBbCcDdEeFfGgHhJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz +
+ + Semibold 600 +
+ AaBbCcDdEeFfGgHhJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz +
+ + Semibold 600 Italic +
+ AaBbCcDdEeFfGgHhJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz +
+ + Bold 700 +
+ AaBbCcDdEeFfGgHhJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz +
+ + Bold 700 Italic +
+ AaBbCcDdEeFfGgHhJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz +
+ + Extrabold 800 +
+ AaBbCcDdEeFfGgHhJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz +
+ + Extrabold 800 Italic +
+ AaBbCcDdEeFfGgHhJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/components/open-sans-fontface-1.0.4/open-sans.css b/1.3.0-rc.2/docs/components/open-sans-fontface-1.0.4/open-sans.css new file mode 100644 index 0000000000..76c36b935c --- /dev/null +++ b/1.3.0-rc.2/docs/components/open-sans-fontface-1.0.4/open-sans.css @@ -0,0 +1,131 @@ +/* Open Sans @font-face kit */ + +/* BEGIN Light */ +@font-face { + font-family: 'Open Sans'; + src: url('fonts/Light/OpenSans-Light.eot'); + src: url('fonts/Light/OpenSans-Light.eot?#iefix') format('embedded-opentype'), + url('fonts/Light/OpenSans-Light.woff') format('woff'), + url('fonts/Light/OpenSans-Light.ttf') format('truetype'), + url('fonts/Light/OpenSans-Light.svg#OpenSansLight') format('svg'); + font-weight: 300; + font-style: normal; +} +/* END Light */ + +/* BEGIN Light Italic */ +@font-face { + font-family: 'Open Sans'; + src: url('fonts/LightItalic/OpenSans-LightItalic.eot'); + src: url('fonts/LightItalic/OpenSans-LightItalic.eot?#iefix') format('embedded-opentype'), + url('fonts/LightItalic/OpenSans-LightItalic.woff') format('woff'), + url('fonts/LightItalic/OpenSans-LightItalic.ttf') format('truetype'), + url('fonts/LightItalic/OpenSans-LightItalic.svg#OpenSansLightItalic') format('svg'); + font-weight: 300; + font-style: italic; +} +/* END Light Italic */ + +/* BEGIN Regular */ +@font-face { + font-family: 'Open Sans'; + src: url('fonts/Regular/OpenSans-Regular.eot'); + src: url('fonts/Regular/OpenSans-Regular.eot?#iefix') format('embedded-opentype'), + url('fonts/Regular/OpenSans-Regular.woff') format('woff'), + url('fonts/Regular/OpenSans-Regular.ttf') format('truetype'), + url('fonts/Regular/OpenSans-Regular.svg#OpenSansRegular') format('svg'); + font-weight: normal; + font-style: normal; +} +/* END Regular */ + +/* BEGIN Italic */ +@font-face { + font-family: 'Open Sans'; + src: url('fonts/Italic/OpenSans-Italic.eot'); + src: url('fonts/Italic/OpenSans-Italic.eot?#iefix') format('embedded-opentype'), + url('fonts/Italic/OpenSans-Italic.woff') format('woff'), + url('fonts/Italic/OpenSans-Italic.ttf') format('truetype'), + url('fonts/Italic/OpenSans-Italic.svg#OpenSansItalic') format('svg'); + font-weight: normal; + font-style: italic; +} +/* END Italic */ + +/* BEGIN Semibold */ +@font-face { + font-family: 'Open Sans'; + src: url('fonts/Semibold/OpenSans-Semibold.eot'); + src: url('fonts/Semibold/OpenSans-Semibold.eot?#iefix') format('embedded-opentype'), + url('fonts/Semibold/OpenSans-Semibold.woff') format('woff'), + url('fonts/Semibold/OpenSans-Semibold.ttf') format('truetype'), + url('fonts/Semibold/OpenSans-Semibold.svg#OpenSansSemibold') format('svg'); + font-weight: 600; + font-style: normal; +} +/* END Semibold */ + +/* BEGIN Semibold Italic */ +@font-face { + font-family: 'Open Sans'; + src: url('fonts/SemiboldItalic/OpenSans-SemiboldItalic.eot'); + src: url('fonts/SemiboldItalic/OpenSans-SemiboldItalic.eot?#iefix') format('embedded-opentype'), + url('fonts/SemiboldItalic/OpenSans-SemiboldItalic.woff') format('woff'), + url('fonts/SemiboldItalic/OpenSans-SemiboldItalic.ttf') format('truetype'), + url('fonts/SemiboldItalic/OpenSans-SemiboldItalic.svg#OpenSansSemiboldItalic') format('svg'); + font-weight: 600; + font-style: italic; +} +/* END Semibold Italic */ + +/* BEGIN Bold */ +@font-face { + font-family: 'Open Sans'; + src: url('fonts/Bold/OpenSans-Bold.eot'); + src: url('fonts/Bold/OpenSans-Bold.eot?#iefix') format('embedded-opentype'), + url('fonts/Bold/OpenSans-Bold.woff') format('woff'), + url('fonts/Bold/OpenSans-Bold.ttf') format('truetype'), + url('fonts/Bold/OpenSans-Bold.svg#OpenSansBold') format('svg'); + font-weight: bold; + font-style: normal; +} +/* END Bold */ + +/* BEGIN Bold Italic */ +@font-face { + font-family: 'Open Sans'; + src: url('fonts/BoldItalic/OpenSans-BoldItalic.eot'); + src: url('fonts/BoldItalic/OpenSans-BoldItalic.eot?#iefix') format('embedded-opentype'), + url('fonts/BoldItalic/OpenSans-BoldItalic.woff') format('woff'), + url('fonts/BoldItalic/OpenSans-BoldItalic.ttf') format('truetype'), + url('fonts/BoldItalic/OpenSans-BoldItalic.svg#OpenSansBoldItalic') format('svg'); + font-weight: bold; + font-style: italic; +} +/* END Bold Italic */ + +/* BEGIN Extrabold */ +@font-face { + font-family: 'Open Sans'; + src: url('fonts/ExtraBold/OpenSans-ExtraBold.eot'); + src: url('fonts/ExtraBold/OpenSans-ExtraBold.eot?#iefix') format('embedded-opentype'), + url('fonts/ExtraBold/OpenSans-ExtraBold.woff') format('woff'), + url('fonts/ExtraBold/OpenSans-ExtraBold.ttf') format('truetype'), + url('fonts/ExtraBold/OpenSans-ExtraBold.svg#OpenSansExtrabold') format('svg'); + font-weight: 800; + font-style: normal; +} +/* END Extrabold */ + +/* BEGIN Extrabold Italic */ +@font-face { + font-family: 'Open Sans'; + src: url('fonts/ExtraBoldItalic/OpenSans-ExtraBoldItalic.eot'); + src: url('fonts/ExtraBoldItalic/OpenSans-ExtraBoldItalic.eot?#iefix') format('embedded-opentype'), + url('fonts/ExtraBoldItalic/OpenSans-ExtraBoldItalic.woff') format('woff'), + url('fonts/ExtraBoldItalic/OpenSans-ExtraBoldItalic.ttf') format('truetype'), + url('fonts/ExtraBoldItalic/OpenSans-ExtraBoldItalic.svg#OpenSansExtraboldItalic') format('svg'); + font-weight: 800; + font-style: italic; +} +/* END Extrabold Italic */ diff --git a/1.3.0-rc.2/docs/components/open-sans-fontface-1.0.4/open-sans.less b/1.3.0-rc.2/docs/components/open-sans-fontface-1.0.4/open-sans.less new file mode 100644 index 0000000000..236a402e96 --- /dev/null +++ b/1.3.0-rc.2/docs/components/open-sans-fontface-1.0.4/open-sans.less @@ -0,0 +1,133 @@ +/* Open Sans @font-face kit */ + +@OpenSansPath: "./fonts"; + +/* BEGIN Light */ +@font-face { + font-family: 'Open Sans'; + src: url('@{OpenSansPath}/Light/OpenSans-Light.eot'); + src: url('@{OpenSansPath}/Light/OpenSans-Light.eot?#iefix') format('embedded-opentype'), + url('@{OpenSansPath}/Light/OpenSans-Light.woff') format('woff'), + url('@{OpenSansPath}/Light/OpenSans-Light.ttf') format('truetype'), + url('@{OpenSansPath}/Light/OpenSans-Light.svg#OpenSansLight') format('svg'); + font-weight: 300; + font-style: normal; +} +/* END Light */ + +/* BEGIN Light Italic */ +@font-face { + font-family: 'Open Sans'; + src: url('@{OpenSansPath}/LightItalic/OpenSans-LightItalic.eot'); + src: url('@{OpenSansPath}/LightItalic/OpenSans-LightItalic.eot?#iefix') format('embedded-opentype'), + url('@{OpenSansPath}/LightItalic/OpenSans-LightItalic.woff') format('woff'), + url('@{OpenSansPath}/LightItalic/OpenSans-LightItalic.ttf') format('truetype'), + url('@{OpenSansPath}/LightItalic/OpenSans-LightItalic.svg#OpenSansLightItalic') format('svg'); + font-weight: 300; + font-style: italic; +} +/* END Light Italic */ + +/* BEGIN Regular */ +@font-face { + font-family: 'Open Sans'; + src: url('@{OpenSansPath}/Regular/OpenSans-Regular.eot'); + src: url('@{OpenSansPath}/Regular/OpenSans-Regular.eot?#iefix') format('embedded-opentype'), + url('@{OpenSansPath}/Regular/OpenSans-Regular.woff') format('woff'), + url('@{OpenSansPath}/Regular/OpenSans-Regular.ttf') format('truetype'), + url('@{OpenSansPath}/Regular/OpenSans-Regular.svg#OpenSansRegular') format('svg'); + font-weight: normal; + font-style: normal; +} +/* END Regular */ + +/* BEGIN Italic */ +@font-face { + font-family: 'Open Sans'; + src: url('@{OpenSansPath}/Italic/OpenSans-Italic.eot'); + src: url('@{OpenSansPath}/Italic/OpenSans-Italic.eot?#iefix') format('embedded-opentype'), + url('@{OpenSansPath}/Italic/OpenSans-Italic.woff') format('woff'), + url('@{OpenSansPath}/Italic/OpenSans-Italic.ttf') format('truetype'), + url('@{OpenSansPath}/Italic/OpenSans-Italic.svg#OpenSansItalic') format('svg'); + font-weight: normal; + font-style: italic; +} +/* END Italic */ + +/* BEGIN Semibold */ +@font-face { + font-family: 'Open Sans'; + src: url('@{OpenSansPath}/Semibold/OpenSans-Semibold.eot'); + src: url('@{OpenSansPath}/Semibold/OpenSans-Semibold.eot?#iefix') format('embedded-opentype'), + url('@{OpenSansPath}/Semibold/OpenSans-Semibold.woff') format('woff'), + url('@{OpenSansPath}/Semibold/OpenSans-Semibold.ttf') format('truetype'), + url('@{OpenSansPath}/Semibold/OpenSans-Semibold.svg#OpenSansSemibold') format('svg'); + font-weight: 600; + font-style: normal; +} +/* END Semibold */ + +/* BEGIN Semibold Italic */ +@font-face { + font-family: 'Open Sans'; + src: url('@{OpenSansPath}/SemiboldItalic/OpenSans-SemiboldItalic.eot'); + src: url('@{OpenSansPath}/SemiboldItalic/OpenSans-SemiboldItalic.eot?#iefix') format('embedded-opentype'), + url('@{OpenSansPath}/SemiboldItalic/OpenSans-SemiboldItalic.woff') format('woff'), + url('@{OpenSansPath}/SemiboldItalic/OpenSans-SemiboldItalic.ttf') format('truetype'), + url('@{OpenSansPath}/SemiboldItalic/OpenSans-SemiboldItalic.svg#OpenSansSemiboldItalic') format('svg'); + font-weight: 600; + font-style: italic; +} +/* END Semibold Italic */ + +/* BEGIN Bold */ +@font-face { + font-family: 'Open Sans'; + src: url('@{OpenSansPath}/Bold/OpenSans-Bold.eot'); + src: url('@{OpenSansPath}/Bold/OpenSans-Bold.eot?#iefix') format('embedded-opentype'), + url('@{OpenSansPath}/Bold/OpenSans-Bold.woff') format('woff'), + url('@{OpenSansPath}/Bold/OpenSans-Bold.ttf') format('truetype'), + url('@{OpenSansPath}/Bold/OpenSans-Bold.svg#OpenSansBold') format('svg'); + font-weight: bold; + font-style: normal; +} +/* END Bold */ + +/* BEGIN Bold Italic */ +@font-face { + font-family: 'Open Sans'; + src: url('@{OpenSansPath}/BoldItalic/OpenSans-BoldItalic.eot'); + src: url('@{OpenSansPath}/BoldItalic/OpenSans-BoldItalic.eot?#iefix') format('embedded-opentype'), + url('@{OpenSansPath}/BoldItalic/OpenSans-BoldItalic.woff') format('woff'), + url('@{OpenSansPath}/BoldItalic/OpenSans-BoldItalic.ttf') format('truetype'), + url('@{OpenSansPath}/BoldItalic/OpenSans-BoldItalic.svg#OpenSansBoldItalic') format('svg'); + font-weight: bold; + font-style: italic; +} +/* END Bold Italic */ + +/* BEGIN Extrabold */ +@font-face { + font-family: 'Open Sans'; + src: url('@{OpenSansPath}/ExtraBold/OpenSans-ExtraBold.eot'); + src: url('@{OpenSansPath}/ExtraBold/OpenSans-ExtraBold.eot?#iefix') format('embedded-opentype'), + url('@{OpenSansPath}/ExtraBold/OpenSans-ExtraBold.woff') format('woff'), + url('@{OpenSansPath}/ExtraBold/OpenSans-ExtraBold.ttf') format('truetype'), + url('@{OpenSansPath}/ExtraBold/OpenSans-ExtraBold.svg#OpenSansExtrabold') format('svg'); + font-weight: 800; + font-style: normal; +} +/* END Extrabold */ + +/* BEGIN Extrabold Italic */ +@font-face { + font-family: 'Open Sans'; + src: url('@{OpenSansPath}/ExtraBoldItalic/OpenSans-ExtraBoldItalic.eot'); + src: url('@{OpenSansPath}/ExtraBoldItalic/OpenSans-ExtraBoldItalic.eot?#iefix') format('embedded-opentype'), + url('@{OpenSansPath}/ExtraBoldItalic/OpenSans-ExtraBoldItalic.woff') format('woff'), + url('@{OpenSansPath}/ExtraBoldItalic/OpenSans-ExtraBoldItalic.ttf') format('truetype'), + url('@{OpenSansPath}/ExtraBoldItalic/OpenSans-ExtraBoldItalic.svg#OpenSansExtraboldItalic') format('svg'); + font-weight: 800; + font-style: italic; +} +/* END Extrabold Italic */ diff --git a/1.3.0-rc.2/docs/components/open-sans-fontface-1.0.4/open-sans.scss b/1.3.0-rc.2/docs/components/open-sans-fontface-1.0.4/open-sans.scss new file mode 100644 index 0000000000..a46063fbb3 --- /dev/null +++ b/1.3.0-rc.2/docs/components/open-sans-fontface-1.0.4/open-sans.scss @@ -0,0 +1,133 @@ +/* Open Sans @font-face kit */ + +$OpenSansPath: "./fonts" !default; + +/* BEGIN Light */ +@font-face { + font-family: 'Open Sans'; + src: url('#{$OpenSansPath}/Light/OpenSans-Light.eot'); + src: url('#{$OpenSansPath}/Light/OpenSans-Light.eot?#iefix') format('embedded-opentype'), + url('#{$OpenSansPath}/Light/OpenSans-Light.woff') format('woff'), + url('#{$OpenSansPath}/Light/OpenSans-Light.ttf') format('truetype'), + url('#{$OpenSansPath}/Light/OpenSans-Light.svg#OpenSansLight') format('svg'); + font-weight: 300; + font-style: normal; +} +/* END Light */ + +/* BEGIN Light Italic */ +@font-face { + font-family: 'Open Sans'; + src: url('#{$OpenSansPath}/LightItalic/OpenSans-LightItalic.eot'); + src: url('#{$OpenSansPath}/LightItalic/OpenSans-LightItalic.eot?#iefix') format('embedded-opentype'), + url('#{$OpenSansPath}/LightItalic/OpenSans-LightItalic.woff') format('woff'), + url('#{$OpenSansPath}/LightItalic/OpenSans-LightItalic.ttf') format('truetype'), + url('#{$OpenSansPath}/LightItalic/OpenSans-LightItalic.svg#OpenSansLightItalic') format('svg'); + font-weight: 300; + font-style: italic; +} +/* END Light Italic */ + +/* BEGIN Regular */ +@font-face { + font-family: 'Open Sans'; + src: url('#{$OpenSansPath}/Regular/OpenSans-Regular.eot'); + src: url('#{$OpenSansPath}/Regular/OpenSans-Regular.eot?#iefix') format('embedded-opentype'), + url('#{$OpenSansPath}/Regular/OpenSans-Regular.woff') format('woff'), + url('#{$OpenSansPath}/Regular/OpenSans-Regular.ttf') format('truetype'), + url('#{$OpenSansPath}/Regular/OpenSans-Regular.svg#OpenSansRegular') format('svg'); + font-weight: normal; + font-style: normal; +} +/* END Regular */ + +/* BEGIN Italic */ +@font-face { + font-family: 'Open Sans'; + src: url('#{$OpenSansPath}/Italic/OpenSans-Italic.eot'); + src: url('#{$OpenSansPath}/Italic/OpenSans-Italic.eot?#iefix') format('embedded-opentype'), + url('#{$OpenSansPath}/Italic/OpenSans-Italic.woff') format('woff'), + url('#{$OpenSansPath}/Italic/OpenSans-Italic.ttf') format('truetype'), + url('#{$OpenSansPath}/Italic/OpenSans-Italic.svg#OpenSansItalic') format('svg'); + font-weight: normal; + font-style: italic; +} +/* END Italic */ + +/* BEGIN Semibold */ +@font-face { + font-family: 'Open Sans'; + src: url('#{$OpenSansPath}/Semibold/OpenSans-Semibold.eot'); + src: url('#{$OpenSansPath}/Semibold/OpenSans-Semibold.eot?#iefix') format('embedded-opentype'), + url('#{$OpenSansPath}/Semibold/OpenSans-Semibold.woff') format('woff'), + url('#{$OpenSansPath}/Semibold/OpenSans-Semibold.ttf') format('truetype'), + url('#{$OpenSansPath}/Semibold/OpenSans-Semibold.svg#OpenSansSemibold') format('svg'); + font-weight: 600; + font-style: normal; +} +/* END Semibold */ + +/* BEGIN Semibold Italic */ +@font-face { + font-family: 'Open Sans'; + src: url('#{$OpenSansPath}/SemiboldItalic/OpenSans-SemiboldItalic.eot'); + src: url('#{$OpenSansPath}/SemiboldItalic/OpenSans-SemiboldItalic.eot?#iefix') format('embedded-opentype'), + url('#{$OpenSansPath}/SemiboldItalic/OpenSans-SemiboldItalic.woff') format('woff'), + url('#{$OpenSansPath}/SemiboldItalic/OpenSans-SemiboldItalic.ttf') format('truetype'), + url('#{$OpenSansPath}/SemiboldItalic/OpenSans-SemiboldItalic.svg#OpenSansSemiboldItalic') format('svg'); + font-weight: 600; + font-style: italic; +} +/* END Semibold Italic */ + +/* BEGIN Bold */ +@font-face { + font-family: 'Open Sans'; + src: url('#{$OpenSansPath}/Bold/OpenSans-Bold.eot'); + src: url('#{$OpenSansPath}/Bold/OpenSans-Bold.eot?#iefix') format('embedded-opentype'), + url('#{$OpenSansPath}/Bold/OpenSans-Bold.woff') format('woff'), + url('#{$OpenSansPath}/Bold/OpenSans-Bold.ttf') format('truetype'), + url('#{$OpenSansPath}/Bold/OpenSans-Bold.svg#OpenSansBold') format('svg'); + font-weight: bold; + font-style: normal; +} +/* END Bold */ + +/* BEGIN Bold Italic */ +@font-face { + font-family: 'Open Sans'; + src: url('#{$OpenSansPath}/BoldItalic/OpenSans-BoldItalic.eot'); + src: url('#{$OpenSansPath}/BoldItalic/OpenSans-BoldItalic.eot?#iefix') format('embedded-opentype'), + url('#{$OpenSansPath}/BoldItalic/OpenSans-BoldItalic.woff') format('woff'), + url('#{$OpenSansPath}/BoldItalic/OpenSans-BoldItalic.ttf') format('truetype'), + url('#{$OpenSansPath}/BoldItalic/OpenSans-BoldItalic.svg#OpenSansBoldItalic') format('svg'); + font-weight: bold; + font-style: italic; +} +/* END Bold Italic */ + +/* BEGIN Extrabold */ +@font-face { + font-family: 'Open Sans'; + src: url('#{$OpenSansPath}/ExtraBold/OpenSans-ExtraBold.eot'); + src: url('#{$OpenSansPath}/ExtraBold/OpenSans-ExtraBold.eot?#iefix') format('embedded-opentype'), + url('#{$OpenSansPath}/ExtraBold/OpenSans-ExtraBold.woff') format('woff'), + url('#{$OpenSansPath}/ExtraBold/OpenSans-ExtraBold.ttf') format('truetype'), + url('#{$OpenSansPath}/ExtraBold/OpenSans-ExtraBold.svg#OpenSansExtrabold') format('svg'); + font-weight: 800; + font-style: normal; +} +/* END Extrabold */ + +/* BEGIN Extrabold Italic */ +@font-face { + font-family: 'Open Sans'; + src: url('#{$OpenSansPath}/ExtraBoldItalic/OpenSans-ExtraBoldItalic.eot'); + src: url('#{$OpenSansPath}/ExtraBoldItalic/OpenSans-ExtraBoldItalic.eot?#iefix') format('embedded-opentype'), + url('#{$OpenSansPath}/ExtraBoldItalic/OpenSans-ExtraBoldItalic.woff') format('woff'), + url('#{$OpenSansPath}/ExtraBoldItalic/OpenSans-ExtraBoldItalic.ttf') format('truetype'), + url('#{$OpenSansPath}/ExtraBoldItalic/OpenSans-ExtraBoldItalic.svg#OpenSansExtraboldItalic') format('svg'); + font-weight: 800; + font-style: italic; +} +/* END Extrabold Italic */ diff --git a/1.3.0-rc.2/docs/css/animations.css b/1.3.0-rc.2/docs/css/animations.css new file mode 100644 index 0000000000..e69de29bb2 diff --git a/1.3.0-rc.2/docs/css/doc_widgets.css b/1.3.0-rc.2/docs/css/doc_widgets.css new file mode 100644 index 0000000000..587d5a7e3c --- /dev/null +++ b/1.3.0-rc.2/docs/css/doc_widgets.css @@ -0,0 +1,150 @@ +ul.doc-example { + list-style-type: none; + position: relative; + font-size: 14px; +} + +ul.doc-example > li { + border: 2px solid gray; + border-radius: 5px; + -moz-border-radius: 5px; + -webkit-border-radius: 5px; + background-color: white; + margin-bottom: 20px; +} + +ul.doc-example > li.doc-example-heading { + border: none; + border-radius: 0; + margin-bottom: -10px; +} + +span.nojsfiddle { + float: right; + font-size: 14px; + margin-right:10px; + margin-top: 10px; +} + +form.jsfiddle { + position: absolute; + right: 0; + z-index: 1; + height: 14px; +} + +form.jsfiddle button { + cursor: pointer; + padding: 4px 10px; + margin: 10px; + background-color: #FFF; + font-weight: bold; + color: #7989D6; + border-color: #7989D6; + -moz-border-radius: 8px; + -webkit-border-radius:8px; + border-radius: 8px; +} + +form.jsfiddle textarea, form.jsfiddle input { + display: none; +} + +li.doc-example-live { + padding: 10px; + font-size: 1.2em; +} + +div.syntaxhighlighter { + padding-bottom: 1px !important; /* fix to remove unnecessary scrollbars http://is.gd/gSMgC */ +} + +/* TABS - tutorial environment navigation */ + +div.tabs-nav { + height: 25px; + position: relative; +} + +div.tabs-nav ul li { + list-style: none; + display: inline-block; + padding: 5px 10px; +} + +div.tabs-nav ul li.current a { + color: white; + text-decoration: none; +} + +div.tabs-nav ul li.current { + background: #7989D6; + -moz-box-shadow: 4px 4px 6px #48577D; + -moz-border-radius-topright: 8px; + -moz-border-radius-topleft: 8px; + box-shadow: 4px 4px 6px #48577D; + border-radius-topright: 8px; + border-radius-topleft: 8px; + -webkit-box-shadow: 4px 4px 6px #48577D; + -webkit-border-top-right-radius: 8px; + -webkit-border-top-left-radius: 8px; + border-top-right-radius: 8px; + border-top-left-radius: 8px; +} + +div.tabs-content { + padding: 4px; + position: relative; + background: #7989D6; + -moz-border-radius: 8px; + border-radius: 8px; + -webkit-border-radius: 8px; +} + +div.tabs-content-inner { + margin: 1px; + padding: 10px; + background: white; + border-radius: 6px; + -moz-border-radius: 6px; + -webkit-border-radius: 6px; +} + + +/* Tutorial Nav Bar */ + +#tutorial-nav { + margin: 0.5em 0 1em 0; + padding: 0; + list-style-type: none; + background: #7989D6; + + -moz-border-radius: 15px; + -webkit-border-radius: 15px; + border-radius: 15px; + + -moz-box-shadow: 4px 4px 6px #48577D; + -webkit-box-shadow: 4px 4px 6px #48577D; + box-shadow: 4px 4px 6px #48577D; +} + + +#tutorial-nav li { + display: inline; +} + + +#tutorial-nav a:link, #tutorial-nav a:visited { + font-size: 1.2em; + color: #FFF; + text-decoration: none; + text-align: center; + display: inline-block; + width: 11em; + padding: 0.2em 0; +} + + +#tutorial-nav a:hover { + color: #000; +} diff --git a/1.3.0-rc.2/docs/css/docs.css b/1.3.0-rc.2/docs/css/docs.css new file mode 100644 index 0000000000..6cbb3bf969 --- /dev/null +++ b/1.3.0-rc.2/docs/css/docs.css @@ -0,0 +1,692 @@ +html, body { + position:relative; + height:100%; +} + +#wrapper { + min-height:100%; + position:relative; + padding-bottom:120px; +} + +.footer { + border-top:20px solid white; + position:absolute; + bottom:0; + left:0; + right:0; + z-index:100; + padding-top: 2em; + background-color: #333; + color: white; + padding-bottom: 2em; +} + +.header-fixed { + position:fixed; + z-index:1000; + top:0; + left:0; + right:0; +} + +.header-branding { + min-height:41px!important; +} + +.docs-navbar-primary { + border-radius:0!important; + margin-bottom:0!important; +} + +/* Logo */ +/*.dropdown-menu { + display:none; +} +*/ +h1,h2,h3,h4,h5,h6 { + font-family: "Open Sans"; +} + +.subnav-body { + margin:70px 0 20px; +} + +.header .brand { + padding-top: 6px; + padding-bottom: 0px; +} + +.header .brand img { + margin-top:5px; + height: 30px; +} + +.docs-search { + margin:10px 0; + padding:4px 0 4px 20px; + background:white; + border-radius:20px; + vertical-align:middle; +} + +.docs-search > .search-query { + font-size:14px; + border:0; + width:80%; + color:#555; +} + +.docs-search > .search-icon { + font-size:15px; + margin-right:10px; +} + +.docs-search > .search-query:focus { + outline:0; +} + +/* end: Logo */ + + +.spacer { + height: 1em; +} + + +.icon-cog { + line-height: 13px; +} + +.naked-list, +.naked-list ul, +.naked-list li { + list-style:none; + margin:0; + padding:0; +} + +.nav-index-section a { + font-weight:bold; + font-family: "Open Sans"; + color:black!important; + margin-top:10px; + display:block; +} + +.nav-index-group { + margin-bottom:20px!important; +} + +.nav-index-group-heading { + color:#6F0101; + font-weight:bold; + font-size:1.2em; + padding:0; + margin:0; + border-bottom:1px soild #aaa; + margin-bottom:5px; +} + +.nav-breadcrumb { + margin:4px 0; + padding:0; +} + +.nav-breadcrumb-entry { + font-family: "Open Sans"; + padding:0; + margin:0; + font-size:18px; + display:inline-block; + vertical-align:middle; +} + +.nav-breadcrumb-entry > .divider { + color:#555; + display:inline-block; + padding-left:8px; +} + +.nav-breadcrumb-entry > span, +.nav-breadcrumb-entry > a { + color:#6F0101; +} + +.step-list > li:nth-child(1) { + padding-left:20px; +} + +.step-list > li:nth-child(2) { + padding-left:40px; +} + +.step-list > li:nth-child(3) { + padding-left:60px; +} + +.api-profile-header-heading { + margin:0; + padding:0; +} + +.api-profile-header-structure, +.api-profile-header-structure a { + font-family: "Open Sans"; + font-weight:bold; + color:#999; +} + +.api-profile-section { + margin-top:30px; + padding-top:30px; + border-top:1px solid #aaa; +} + +pre { + white-space: pre-wrap; + word-break: normal; +} + +.aside-nav a, +.aside-nav a:link, +.aside-nav a:visited, +.aside-nav a:active { + color:#999; +} +.aside-nav a:hover { + color:black; +} + +.api-profile-description > p:first-child { + margin:15px 0; + font-size:18px; +} + +p > code, +code.highlighted { + background:#f4f4f4; + border-radius:5px; + padding:2px 5px; + color:maroon; +} + +ul + p { + margin-top: 10px; +} + +.docs-version-jump { + min-width:100%; + max-width:100%; +} + +.picker { + position: relative; + width: auto; + display: inline-block; + margin: 0 0 2px 1.2%; + overflow: hidden; + border: 1px solid #e5e5e5; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + -ms-border-radius: 4px; + -o-border-radius: 4px; + border-radius: 4px; + font-family: "Open Sans"; + font-weight: 600; + height: auto; + background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff), color-stop(100%, #f2f2f2)); + background-image: -webkit-linear-gradient(#ffffff, #f2f2f2); + background-image: -moz-linear-gradient(#ffffff, #f2f2f2); + background-image: -o-linear-gradient(#ffffff, #f2f2f2); + background-image: linear-gradient(#ffffff, #f2f2f2); +} + +.picker select { + position: relative; + display: block; + min-width: 100%; + width: 120%; + height: 34px; + padding: 6px 30px 6px 15px; + color: #555555; + border: none; + background: transparent; + outline: none; + -webkit-appearance: none; + z-index: 99; + cursor: pointer; + font-size: 16px; + -moz-appearance: none; + text-indent: 0.01px; + text-overflow: ''; +} + +.picker:after { + content:""; + position: absolute; + right: 8%; + top: 50%; + z-index: 0; + color: #999; + width: 0; + margin-top:-2px; + height: 0; + border-top: 6px solid; + border-right: 6px solid transparent; + border-left: 6px solid transparent; +} + +iframe.example { + width: 100%; + border: 1px solid black; +} + +.search-results-frame { + clear:both; + display:table; + width:100%; +} + +.search-results.ng-hide { + display:none; +} + +.search-results-container { + padding-bottom:1em; + border-top:1px solid #111; + background:#181818; + box-shadow:inset 0 0 10px #111; +} + +.search-results-container .search-results-group { + vertical-align:top; + padding:10px 10px; + display:inline-block; +} + +.search-results-group-heading { + font-family: "Open Sans"; + padding-left:10px; + color:white; +} + +.search-results-frame > .search-results-group:first-child > .search-results { + border-right:1px solid #050505; +} + +.search-results-group.col-group-api { width:30%; } +.search-results-group.col-group-guide { width:30%; } +.search-results-group.col-group-tutorial { width:25%; } +.search-results-group.col-group-misc, +.search-results-group.col-group-error { float:right; clear:both; width:15% } + + +.search-results-group.col-group-api .search-result { + width:48%; + display:inline-block; +} + +.search-close { + position: absolute; + bottom: 0; + left: 50%; + margin-left: -100px; + color: white; + text-align: center; + padding: 5px; + background: #333; + border-top-right-radius: 5px; + border-top-left-radius: 5px; + width: 200px; + box-shadow:0 0 10px #111; +} + +.variables-matrix { + border:1px solid #ddd; + width:100%; + margin:10px 0; +} + +.variables-matrix td, +.variables-matrix th { + padding:10px; +} + +.variables-matrix td { + border-top:1px solid #eee; +} + +.variables-matrix td + td, +.variables-matrix th + th { + border-left:1px solid #eee; +} + +.variables-matrix tr:nth-child(even) td { + background:#f5f5f5; +} + +.variables-matrix th { + background:#f1f1f1; +} + +.sup-header { + padding-top:10px; + padding-bottom:5px; + background:rgba(245,245,245,0.88); + box-shadow:0 0 2px #999; +} + +.main-body-grid { + margin-top:120px; + position:relative; +} + +.main-body-grid > .grid-left, +.main-body-grid > .grid-right { + padding:20px 0; +} + +.main-body-grid > .grid-left { + position:fixed; + top:120px; + bottom:0; + padding-bottom:120px; + overflow:auto; +} + +.main-header-grid > .grid-left, +.main-body-grid > .grid-left { + width:260px; +} + +.main-header-grid > .grid-right, +.main-body-grid > .grid-right { + margin-left:270px; + position:relative; +} + +.main-header-grid > .grid-left { + float:left; +} + +.main-body-grid .side-navigation { + position:relative; +} + +.main-body-grid .side-navigation.ng-hide { + display:block!important; +} + +.variables-matrix td { + vertical-align:top; + padding:5px; +} + +.type-hint { + display:inline-block; + background: gray; +} + +.variables-matrix .type-hint { + text-align:center; + min-width:60px; + margin:1px 5px; +} + +.type-hint + .type-hint { + margin-top:5px; +} + +.type-hint-expression { + background:purple; +} + +.type-hint-date { + background:pink; +} + +.type-hint-string { + background:#3a87ad; +} + +.type-hint-function { + background:green; +} + +.type-hint-object { + background:#999; +} + +.type-hint-array { + background:#F90;; +} + +.type-hint-boolean { + background:rgb(18, 131, 39); +} + +.type-hint-number { + background:rgb(189, 63, 66); +} + +.type-hint-regexp { + background: rgb(90, 84, 189); +} + +.type-hint-domelement { + background: rgb(95, 158, 160); +} + +.runnable-example-frame { + width:100%; + height:300px; + border: 1px solid #ddd; + border-radius:5px; +} + +.runnable-example-tabs { + margin-top:10px; + margin-bottom:20px; +} + +.tutorial-nav { + display:block; +} + +h1 + ul, h1 + ul > li, +h2 + ul, h2 + ul > li, +ul.tutorial-nav, ul.tutorial-nav > li, +.usage > ul, .usage > ul > li, +ul.methods, ul.methods > li, +ul.events, ul.events > li { + list-style:none; + padding:0; +} + +h2 { + border-top:1px solid #eee; + margin-top:30px; + padding-top:30px; +} + +h4 { + margin-top:20px; + padding-top:20px; +} + +.btn { + color:#428bca; + position: relative; + width: auto; + display: inline-block; + margin: 0 0 2px; + overflow: hidden; + border: 1px solid #e5e5e5; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + -ms-border-radius: 4px; + -o-border-radius: 4px; + border-radius: 4px; + font-family: "Open Sans"; + font-weight: 600; + height: auto; + background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff), color-stop(100%, #f2f2f2)); + background-image: -webkit-linear-gradient(#ffffff, #f2f2f2); + background-image: -moz-linear-gradient(#ffffff, #f2f2f2); + background-image: -o-linear-gradient(#ffffff, #f2f2f2); + background-image: linear-gradient(#ffffff, #f2f2f2); +} + +.btn + .btn { + margin-left:10px; +} + +.btn:hover { + color:black!important; + border: 1px solid #ddd!important; + background:white!important; +} + +.view-source, .improve-docs { + position:relative; + z-index:100; +} + +.view-source { + margin-right:10px; +} + +.improve-docs { + float:right; +} + +.return-arguments, +.return-arguments th, +.return-arguments th + th, +.return-arguments td, +.return-arguments td + td { + border-radius:0; + border:0; +} + +.return-arguments td:first-child { + width:100px; +} + +ul.methods > li, +ul.events > li { + margin-bottom:40px; +} + +@media only screen and (min-width: 769px) and (max-width: 991px) { + .main-body-grid { + margin-top: 160px; + } + .main-body-grid > .grid-left { + top: 160px; + } +} + +@media only screen and (max-width : 768px) { + .picker, .picker select { + width:auto; + display:block; + margin-bottom:10px; + } + .docs-navbar-primary { + text-align:center; + } + .main-body-grid { + margin-top:0; + } + .main-header-grid > .grid-left, + .main-body-grid > .grid-left, + .main-header-grid > .grid-right, + .main-body-grid > .grid-right { + display:block; + float:none; + width:auto!important; + margin-left:0; + } + .main-body-grid > .grid-left, + .header-fixed, .footer { + position:static!important; + } + .main-body-grid > .grid-left { + background:#efefef; + margin-left:-1em; + margin-right:-1em; + padding:1em; + width:auto!important; + overflow:visible; + } + .main-header-grid > .grid-right, + .main-body-grid > .grid-right { + margin-left:0; + } + .main-body-grid .side-navigation { + display:block!important; + } + .main-body-grid .side-navigation.ng-hide { + display:none!important; + } + .nav-index-group .nav-index-listing { + display:inline-block; + padding:3px 0; + } + .nav-index-group .nav-index-listing:not(.nav-index-section):after { + padding-right:5px; + margin-left:-3px; + content:", "; + } + .nav-index-group .nav-index-listing:last-child:after { + content:""; + display:inline-block; + } + .nav-index-group .nav-index-section { + display:block; + } + .toc-toggle { + margin-bottom:20px; + } + .toc-close { + position: absolute; + bottom: -50px; + left: 50%; + margin-left: -50%; + text-align: center; + padding: 5px; + background: #eee; + border-radius: 5px; + width: 90%; + border:1px solid #ddd; + box-shadow:0 0 10px #bbb; + } + .navbar-brand { + float:none; + text-align:center; + } + .search-results-container { + padding-bottom:60px; + text-align:left; + } + .search-results-group { + float:none!important; + display:block!important; + width:auto!important; + border:0!important; + padding:0!important; + } + .search-results-group .search-result { + display:inline-block!important; + padding:0 5px; + width:auto!important; + } + .search-results-group .search-result:after { + content:", "; + } + #wrapper { + padding-bottom:0px; + } +} diff --git a/1.3.0-rc.2/docs/css/prettify-theme.css b/1.3.0-rc.2/docs/css/prettify-theme.css new file mode 100644 index 0000000000..7308e1ec71 --- /dev/null +++ b/1.3.0-rc.2/docs/css/prettify-theme.css @@ -0,0 +1,142 @@ +/* GitHub Theme */ +.prettyprint { + background: white; + font-family: Menlo, 'Bitstream Vera Sans Mono', 'DejaVu Sans Mono', Monaco, Consolas, monospace; + font-size: 12px; + line-height: 1.5; +} + +.lang-text * { + color: #333333!important; +} + +.pln { + color: #333333; +} + +@media screen { + .str { + color: #dd1144; + } + + .kwd { + color: #333333; + } + + .com { + color: #999988; + } + + .typ { + color: #445588; + } + + .lit { + color: #445588; + } + + .pun { + color: #333333; + } + + .opn { + color: #333333; + } + + .clo { + color: #333333; + } + + .tag { + color: navy; + } + + .atn { + color: teal; + } + + .atv { + color: #dd1144; + } + + .dec { + color: #333333; + } + + .var { + color: teal; + } + + .fun { + color: #990000; + } +} +@media print, projection { + .str { + color: #006600; + } + + .kwd { + color: #006; + font-weight: bold; + } + + .com { + color: #600; + font-style: italic; + } + + .typ { + color: #404; + font-weight: bold; + } + + .lit { + color: #004444; + } + + .pun, .opn, .clo { + color: #444400; + } + + .tag { + color: #006; + font-weight: bold; + } + + .atn { + color: #440044; + } + + .atv { + color: #006600; + } +} +/* Specify class=linenums on a pre to get line numbering */ +ol.linenums { + margin-top: 0; + margin-bottom: 0; +} + +/* IE indents via margin-left */ +li.L0, +li.L1, +li.L2, +li.L3, +li.L4, +li.L5, +li.L6, +li.L7, +li.L8, +li.L9 { + /* */ +} + +/* Alternate shading for lines */ +li.L1, +li.L3, +li.L5, +li.L7, +li.L9 { + /* */ +} diff --git a/1.3.0-rc.2/docs/css/prettify.css b/1.3.0-rc.2/docs/css/prettify.css new file mode 100644 index 0000000000..354bbd544f --- /dev/null +++ b/1.3.0-rc.2/docs/css/prettify.css @@ -0,0 +1,51 @@ +.pln { color: #000 } /* plain text */ + +@media screen { + .str { color: #080 } /* string content */ + .kwd { color: #008 } /* a keyword */ + .com { color: #800 } /* a comment */ + .typ { color: #606 } /* a type name */ + .lit { color: #066 } /* a literal value */ + /* punctuation, lisp open bracket, lisp close bracket */ + .pun, .opn, .clo { color: #660 } + .tag { color: #008 } /* a markup tag name */ + .atn { color: #606 } /* a markup attribute name */ + .atv { color: #080 } /* a markup attribute value */ + .dec, .var { color: #606 } /* a declaration; a variable name */ + .fun { color: red } /* a function name */ +} + +/* Use higher contrast and text-weight for printable form. */ +@media print, projection { + .str { color: #060 } + .kwd { color: #006; font-weight: bold } + .com { color: #600; font-style: italic } + .typ { color: #404; font-weight: bold } + .lit { color: #044 } + .pun, .opn, .clo { color: #440 } + .tag { color: #006; font-weight: bold } + .atn { color: #404 } + .atv { color: #060 } +} + +pre.prettyprint { + padding: 8px; + background-color: #f7f7f9; + border: 1px solid #e1e1e8; +} +pre.prettyprint.linenums { + -webkit-box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0; + -moz-box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0; + box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0; +} +ol.linenums { + margin: 0 0 0 33px; /* IE indents via margin-left */ +} +ol.linenums li { + padding-left: 12px; + font-size:12px; + color: #bebec5; + line-height: 18px; + text-shadow: 0 1px 0 #fff; + list-style-type:decimal!important; +} diff --git a/1.3.0-rc.2/docs/examples/example-$filter/index-debug.html b/1.3.0-rc.2/docs/examples/example-$filter/index-debug.html new file mode 100644 index 0000000000..51bf6e5058 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-$filter/index-debug.html @@ -0,0 +1,20 @@ + + + + + Example - example-$filter-debug + + + + + + + + + +
+

{{ originalText }}

+

{{ filteredText }}

+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-$filter/index-jquery.html b/1.3.0-rc.2/docs/examples/example-$filter/index-jquery.html new file mode 100644 index 0000000000..ab55dc6a3e --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-$filter/index-jquery.html @@ -0,0 +1,21 @@ + + + + + Example - example-$filter-jquery + + + + + + + + + + +
+

{{ originalText }}

+

{{ filteredText }}

+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-$filter/index-production.html b/1.3.0-rc.2/docs/examples/example-$filter/index-production.html new file mode 100644 index 0000000000..4085c6586a --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-$filter/index-production.html @@ -0,0 +1,20 @@ + + + + + Example - example-$filter-production + + + + + + + + + +
+

{{ originalText }}

+

{{ filteredText }}

+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-$filter/index.html b/1.3.0-rc.2/docs/examples/example-$filter/index.html new file mode 100644 index 0000000000..b4924a6f9c --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-$filter/index.html @@ -0,0 +1,20 @@ + + + + + Example - example-$filter + + + + + + + + + +
+

{{ originalText }}

+

{{ filteredText }}

+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-$filter/manifest.json b/1.3.0-rc.2/docs/examples/example-$filter/manifest.json new file mode 100644 index 0000000000..0d2a67bb53 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-$filter/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-$filter", + "files": [ + "index-production.html", + "script.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-$filter/script.js b/1.3.0-rc.2/docs/examples/example-$filter/script.js new file mode 100644 index 0000000000..1fa286a06b --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-$filter/script.js @@ -0,0 +1,5 @@ + angular.module('filterExample', []) + .controller('MainCtrl', function($scope, $filter) { + $scope.originalText = 'hello'; + $scope.filteredText = $filter('uppercase')($scope.originalText); + }); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-$route-service/book.html b/1.3.0-rc.2/docs/examples/example-$route-service/book.html new file mode 100644 index 0000000000..94e4b4bf95 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-$route-service/book.html @@ -0,0 +1,2 @@ + controller: {{name}}
+ Book Id: {{params.bookId}}
\ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-$route-service/chapter.html b/1.3.0-rc.2/docs/examples/example-$route-service/chapter.html new file mode 100644 index 0000000000..43b15f580f --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-$route-service/chapter.html @@ -0,0 +1,3 @@ + controller: {{name}}
+ Book Id: {{params.bookId}}
+ Chapter Id: {{params.chapterId}} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-$route-service/index-debug.html b/1.3.0-rc.2/docs/examples/example-$route-service/index-debug.html new file mode 100644 index 0000000000..2c2b009094 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-$route-service/index-debug.html @@ -0,0 +1,37 @@ + + + + + Example - example-$route-service-debug + + + + + + + + + + +
+ Choose: + Moby | + Moby: Ch1 | + Gatsby | + Gatsby: Ch4 | + Scarlet Letter
+ +
+ +
+ +
$location.path() = {{$location.path()}}
+
$route.current.templateUrl = {{$route.current.templateUrl}}
+
$route.current.params = {{$route.current.params}}
+
$route.current.scope.name = {{$route.current.scope.name}}
+
$routeParams = {{$routeParams}}
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-$route-service/index-jquery.html b/1.3.0-rc.2/docs/examples/example-$route-service/index-jquery.html new file mode 100644 index 0000000000..c88c9c586e --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-$route-service/index-jquery.html @@ -0,0 +1,38 @@ + + + + + Example - example-$route-service-jquery + + + + + + + + + + + +
+ Choose: + Moby | + Moby: Ch1 | + Gatsby | + Gatsby: Ch4 | + Scarlet Letter
+ +
+ +
+ +
$location.path() = {{$location.path()}}
+
$route.current.templateUrl = {{$route.current.templateUrl}}
+
$route.current.params = {{$route.current.params}}
+
$route.current.scope.name = {{$route.current.scope.name}}
+
$routeParams = {{$routeParams}}
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-$route-service/index-production.html b/1.3.0-rc.2/docs/examples/example-$route-service/index-production.html new file mode 100644 index 0000000000..ffa9447108 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-$route-service/index-production.html @@ -0,0 +1,37 @@ + + + + + Example - example-$route-service-production + + + + + + + + + + +
+ Choose: + Moby | + Moby: Ch1 | + Gatsby | + Gatsby: Ch4 | + Scarlet Letter
+ +
+ +
+ +
$location.path() = {{$location.path()}}
+
$route.current.templateUrl = {{$route.current.templateUrl}}
+
$route.current.params = {{$route.current.params}}
+
$route.current.scope.name = {{$route.current.scope.name}}
+
$routeParams = {{$routeParams}}
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-$route-service/index.html b/1.3.0-rc.2/docs/examples/example-$route-service/index.html new file mode 100644 index 0000000000..fa84e3127e --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-$route-service/index.html @@ -0,0 +1,37 @@ + + + + + Example - example-$route-service + + + + + + + + + + +
+ Choose: + Moby | + Moby: Ch1 | + Gatsby | + Gatsby: Ch4 | + Scarlet Letter
+ +
+ +
+ +
$location.path() = {{$location.path()}}
+
$route.current.templateUrl = {{$route.current.templateUrl}}
+
$route.current.params = {{$route.current.params}}
+
$route.current.scope.name = {{$route.current.scope.name}}
+
$routeParams = {{$routeParams}}
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-$route-service/manifest.json b/1.3.0-rc.2/docs/examples/example-$route-service/manifest.json new file mode 100644 index 0000000000..0156fd11f9 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-$route-service/manifest.json @@ -0,0 +1,10 @@ +{ + "name": "example-$route-service", + "files": [ + "index-production.html", + "book.html", + "chapter.html", + "script.js", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-$route-service/protractor.js b/1.3.0-rc.2/docs/examples/example-$route-service/protractor.js new file mode 100644 index 0000000000..a0512ced9a --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-$route-service/protractor.js @@ -0,0 +1,13 @@ + it('should load and compile correct template', function() { + element(by.linkText('Moby: Ch1')).click(); + var content = element(by.css('[ng-view]')).getText(); + expect(content).toMatch(/controller\: ChapterController/); + expect(content).toMatch(/Book Id\: Moby/); + expect(content).toMatch(/Chapter Id\: 1/); + + element(by.partialLinkText('Scarlet')).click(); + + content = element(by.css('[ng-view]')).getText(); + expect(content).toMatch(/controller\: BookController/); + expect(content).toMatch(/Book Id\: Scarlet/); + }); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-$route-service/script.js b/1.3.0-rc.2/docs/examples/example-$route-service/script.js new file mode 100644 index 0000000000..0c77c4d097 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-$route-service/script.js @@ -0,0 +1,40 @@ + angular.module('ngRouteExample', ['ngRoute']) + + .controller('MainController', function($scope, $route, $routeParams, $location) { + $scope.$route = $route; + $scope.$location = $location; + $scope.$routeParams = $routeParams; + }) + + .controller('BookController', function($scope, $routeParams) { + $scope.name = "BookController"; + $scope.params = $routeParams; + }) + + .controller('ChapterController', function($scope, $routeParams) { + $scope.name = "ChapterController"; + $scope.params = $routeParams; + }) + + .config(function($routeProvider, $locationProvider) { + $routeProvider + .when('/Book/:bookId', { + templateUrl: 'book.html', + controller: 'BookController', + resolve: { + // I will cause a 1 second delay + delay: function($q, $timeout) { + var delay = $q.defer(); + $timeout(delay.resolve, 1000); + return delay.promise; + } + } + }) + .when('/Book/:bookId/ch/:chapterId', { + templateUrl: 'chapter.html', + controller: 'ChapterController' + }); + + // configure html5 to get links working on jsfiddle + $locationProvider.html5Mode(true); + }); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-NgModelController/index-debug.html b/1.3.0-rc.2/docs/examples/example-NgModelController/index-debug.html new file mode 100644 index 0000000000..c9a5be58dc --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-NgModelController/index-debug.html @@ -0,0 +1,27 @@ + + + + + Example - example-NgModelController-debug + + + + + + + + + + + +
+
Change me!
+ Required! +
+ +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-NgModelController/index-jquery.html b/1.3.0-rc.2/docs/examples/example-NgModelController/index-jquery.html new file mode 100644 index 0000000000..78a10c8899 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-NgModelController/index-jquery.html @@ -0,0 +1,28 @@ + + + + + Example - example-NgModelController-jquery + + + + + + + + + + + + +
+
Change me!
+ Required! +
+ +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-NgModelController/index-production.html b/1.3.0-rc.2/docs/examples/example-NgModelController/index-production.html new file mode 100644 index 0000000000..5fc28ea5ff --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-NgModelController/index-production.html @@ -0,0 +1,27 @@ + + + + + Example - example-NgModelController-production + + + + + + + + + + + +
+
Change me!
+ Required! +
+ +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-NgModelController/index.html b/1.3.0-rc.2/docs/examples/example-NgModelController/index.html new file mode 100644 index 0000000000..e845b6374a --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-NgModelController/index.html @@ -0,0 +1,27 @@ + + + + + Example - example-NgModelController + + + + + + + + + + + +
+
Change me!
+ Required! +
+ +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-NgModelController/manifest.json b/1.3.0-rc.2/docs/examples/example-NgModelController/manifest.json new file mode 100644 index 0000000000..77bb9769d8 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-NgModelController/manifest.json @@ -0,0 +1,9 @@ +{ + "name": "example-NgModelController", + "files": [ + "index-production.html", + "style.css", + "script.js", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-NgModelController/protractor.js b/1.3.0-rc.2/docs/examples/example-NgModelController/protractor.js new file mode 100644 index 0000000000..a524f929cc --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-NgModelController/protractor.js @@ -0,0 +1,16 @@ +it('should data-bind and become invalid', function() { + if (browser.params.browser == 'safari' || browser.params.browser == 'firefox') { + // SafariDriver can't handle contenteditable + // and Firefox driver can't clear contenteditables very well + return; + } + var contentEditable = element(by.css('[contenteditable]')); + var content = 'Change me!'; + + expect(contentEditable.getText()).toEqual(content); + + contentEditable.clear(); + contentEditable.sendKeys(protractor.Key.BACK_SPACE); + expect(contentEditable.getText()).toEqual(''); + expect(contentEditable.getAttribute('class')).toMatch(/ng-invalid-required/); +}); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-NgModelController/script.js b/1.3.0-rc.2/docs/examples/example-NgModelController/script.js new file mode 100644 index 0000000000..7c54a5c7c8 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-NgModelController/script.js @@ -0,0 +1,32 @@ + angular.module('customControl', ['ngSanitize']). + directive('contenteditable', ['$sce', function($sce) { + return { + restrict: 'A', // only activate on element attribute + require: '?ngModel', // get a hold of NgModelController + link: function(scope, element, attrs, ngModel) { + if (!ngModel) return; // do nothing if no ng-model + + // Specify how UI should be updated + ngModel.$render = function() { + element.html($sce.getTrustedHtml(ngModel.$viewValue || '')); + }; + + // Listen for change events to enable binding + element.on('blur keyup change', function() { + scope.$apply(read); + }); + read(); // initialize + + // Write data to the model + function read() { + var html = element.html(); + // When we clear the content editable the browser leaves a
behind + // If strip-br attribute is provided then we strip this out + if ( attrs.stripBr && html == '
' ) { + html = ''; + } + ngModel.$setViewValue(html); + } + } + }; + }]); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-NgModelController/style.css b/1.3.0-rc.2/docs/examples/example-NgModelController/style.css new file mode 100644 index 0000000000..e9a4a054d1 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-NgModelController/style.css @@ -0,0 +1,9 @@ + [contenteditable] { + border: 1px solid black; + background-color: white; + min-height: 20px; + } + + .ng-invalid { + border: 1px solid red; + } \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-checkbox-input-directive/index-debug.html b/1.3.0-rc.2/docs/examples/example-checkbox-input-directive/index-debug.html new file mode 100644 index 0000000000..7cda7b3e85 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-checkbox-input-directive/index-debug.html @@ -0,0 +1,29 @@ + + + + + Example - example-checkbox-input-directive-debug + + + + + + + + + +
+ Value1:
+ Value2:
+ value1 = {{value1}}
+ value2 = {{value2}}
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-checkbox-input-directive/index-jquery.html b/1.3.0-rc.2/docs/examples/example-checkbox-input-directive/index-jquery.html new file mode 100644 index 0000000000..9796926640 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-checkbox-input-directive/index-jquery.html @@ -0,0 +1,30 @@ + + + + + Example - example-checkbox-input-directive-jquery + + + + + + + + + + +
+ Value1:
+ Value2:
+ value1 = {{value1}}
+ value2 = {{value2}}
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-checkbox-input-directive/index-production.html b/1.3.0-rc.2/docs/examples/example-checkbox-input-directive/index-production.html new file mode 100644 index 0000000000..092c819c9f --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-checkbox-input-directive/index-production.html @@ -0,0 +1,29 @@ + + + + + Example - example-checkbox-input-directive-production + + + + + + + + + +
+ Value1:
+ Value2:
+ value1 = {{value1}}
+ value2 = {{value2}}
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-checkbox-input-directive/index.html b/1.3.0-rc.2/docs/examples/example-checkbox-input-directive/index.html new file mode 100644 index 0000000000..755af5317b --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-checkbox-input-directive/index.html @@ -0,0 +1,29 @@ + + + + + Example - example-checkbox-input-directive + + + + + + + + + +
+ Value1:
+ Value2:
+ value1 = {{value1}}
+ value2 = {{value2}}
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-checkbox-input-directive/manifest.json b/1.3.0-rc.2/docs/examples/example-checkbox-input-directive/manifest.json new file mode 100644 index 0000000000..7c0bf82470 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-checkbox-input-directive/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-checkbox-input-directive", + "files": [ + "index-production.html", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-checkbox-input-directive/protractor.js b/1.3.0-rc.2/docs/examples/example-checkbox-input-directive/protractor.js new file mode 100644 index 0000000000..6de643e7f4 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-checkbox-input-directive/protractor.js @@ -0,0 +1,13 @@ + it('should change state', function() { + var value1 = element(by.binding('value1')); + var value2 = element(by.binding('value2')); + + expect(value1.getText()).toContain('true'); + expect(value2.getText()).toContain('YES'); + + element(by.model('value1')).click(); + element(by.model('value2')).click(); + + expect(value1.getText()).toContain('false'); + expect(value2.getText()).toContain('NO'); + }); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-date-input-directive/index-debug.html b/1.3.0-rc.2/docs/examples/example-date-input-directive/index-debug.html new file mode 100644 index 0000000000..5066f780fe --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-date-input-directive/index-debug.html @@ -0,0 +1,35 @@ + + + + + Example - example-date-input-directive-debug + + + + + + + + + +
+ Pick a date in 2013: + + + Required! + + Not a valid date! + value = {{value | date: "yyyy-MM-dd"}}
+ myForm.input.$valid = {{myForm.input.$valid}}
+ myForm.input.$error = {{myForm.input.$error}}
+ myForm.$valid = {{myForm.$valid}}
+ myForm.$error.required = {{!!myForm.$error.required}}
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-date-input-directive/index-jquery.html b/1.3.0-rc.2/docs/examples/example-date-input-directive/index-jquery.html new file mode 100644 index 0000000000..34d2e73d05 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-date-input-directive/index-jquery.html @@ -0,0 +1,36 @@ + + + + + Example - example-date-input-directive-jquery + + + + + + + + + + +
+ Pick a date in 2013: + + + Required! + + Not a valid date! + value = {{value | date: "yyyy-MM-dd"}}
+ myForm.input.$valid = {{myForm.input.$valid}}
+ myForm.input.$error = {{myForm.input.$error}}
+ myForm.$valid = {{myForm.$valid}}
+ myForm.$error.required = {{!!myForm.$error.required}}
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-date-input-directive/index-production.html b/1.3.0-rc.2/docs/examples/example-date-input-directive/index-production.html new file mode 100644 index 0000000000..5f3dc765a8 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-date-input-directive/index-production.html @@ -0,0 +1,35 @@ + + + + + Example - example-date-input-directive-production + + + + + + + + + +
+ Pick a date in 2013: + + + Required! + + Not a valid date! + value = {{value | date: "yyyy-MM-dd"}}
+ myForm.input.$valid = {{myForm.input.$valid}}
+ myForm.input.$error = {{myForm.input.$error}}
+ myForm.$valid = {{myForm.$valid}}
+ myForm.$error.required = {{!!myForm.$error.required}}
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-date-input-directive/index.html b/1.3.0-rc.2/docs/examples/example-date-input-directive/index.html new file mode 100644 index 0000000000..d29411cac2 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-date-input-directive/index.html @@ -0,0 +1,35 @@ + + + + + Example - example-date-input-directive + + + + + + + + + +
+ Pick a date in 2013: + + + Required! + + Not a valid date! + value = {{value | date: "yyyy-MM-dd"}}
+ myForm.input.$valid = {{myForm.input.$valid}}
+ myForm.input.$error = {{myForm.input.$error}}
+ myForm.$valid = {{myForm.$valid}}
+ myForm.$error.required = {{!!myForm.$error.required}}
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-date-input-directive/manifest.json b/1.3.0-rc.2/docs/examples/example-date-input-directive/manifest.json new file mode 100644 index 0000000000..ac13615c08 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-date-input-directive/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-date-input-directive", + "files": [ + "index-production.html", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-date-input-directive/protractor.js b/1.3.0-rc.2/docs/examples/example-date-input-directive/protractor.js new file mode 100644 index 0000000000..a038b39a3f --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-date-input-directive/protractor.js @@ -0,0 +1,31 @@ + var value = element(by.binding('value | date: "yyyy-MM-dd"')); + var valid = element(by.binding('myForm.input.$valid')); + var input = element(by.model('value')); + + // currently protractor/webdriver does not support + // sending keys to all known HTML5 input controls + // for various browsers (see https://github.com/angular/protractor/issues/562). + function setInput(val) { + // set the value of the element and force validation. + var scr = "var ipt = document.getElementById('exampleInput'); " + + "ipt.value = '" + val + "';" + + "angular.element(ipt).scope().$apply(function(s) { s.myForm[ipt.name].$setViewValue('" + val + "'); });"; + browser.executeScript(scr); + } + + it('should initialize to model', function() { + expect(value.getText()).toContain('2013-10-22'); + expect(valid.getText()).toContain('myForm.input.$valid = true'); + }); + + it('should be invalid if empty', function() { + setInput(''); + expect(value.getText()).toEqual('value ='); + expect(valid.getText()).toContain('myForm.input.$valid = false'); + }); + + it('should be invalid if over max', function() { + setInput('2015-01-01'); + expect(value.getText()).toContain(''); + expect(valid.getText()).toContain('myForm.input.$valid = false'); + }); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-datetimelocal-input-directive/index-debug.html b/1.3.0-rc.2/docs/examples/example-datetimelocal-input-directive/index-debug.html new file mode 100644 index 0000000000..57f7e6fe53 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-datetimelocal-input-directive/index-debug.html @@ -0,0 +1,35 @@ + + + + + Example - example-datetimelocal-input-directive-debug + + + + + + + + + +
+ Pick a date between in 2013: + + + Required! + + Not a valid date! + value = {{value | date: "yyyy-MM-ddTHH:mm:ss"}}
+ myForm.input.$valid = {{myForm.input.$valid}}
+ myForm.input.$error = {{myForm.input.$error}}
+ myForm.$valid = {{myForm.$valid}}
+ myForm.$error.required = {{!!myForm.$error.required}}
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-datetimelocal-input-directive/index-jquery.html b/1.3.0-rc.2/docs/examples/example-datetimelocal-input-directive/index-jquery.html new file mode 100644 index 0000000000..03448a1c09 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-datetimelocal-input-directive/index-jquery.html @@ -0,0 +1,36 @@ + + + + + Example - example-datetimelocal-input-directive-jquery + + + + + + + + + + +
+ Pick a date between in 2013: + + + Required! + + Not a valid date! + value = {{value | date: "yyyy-MM-ddTHH:mm:ss"}}
+ myForm.input.$valid = {{myForm.input.$valid}}
+ myForm.input.$error = {{myForm.input.$error}}
+ myForm.$valid = {{myForm.$valid}}
+ myForm.$error.required = {{!!myForm.$error.required}}
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-datetimelocal-input-directive/index-production.html b/1.3.0-rc.2/docs/examples/example-datetimelocal-input-directive/index-production.html new file mode 100644 index 0000000000..13a0fb6f20 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-datetimelocal-input-directive/index-production.html @@ -0,0 +1,35 @@ + + + + + Example - example-datetimelocal-input-directive-production + + + + + + + + + +
+ Pick a date between in 2013: + + + Required! + + Not a valid date! + value = {{value | date: "yyyy-MM-ddTHH:mm:ss"}}
+ myForm.input.$valid = {{myForm.input.$valid}}
+ myForm.input.$error = {{myForm.input.$error}}
+ myForm.$valid = {{myForm.$valid}}
+ myForm.$error.required = {{!!myForm.$error.required}}
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-datetimelocal-input-directive/index.html b/1.3.0-rc.2/docs/examples/example-datetimelocal-input-directive/index.html new file mode 100644 index 0000000000..90fe62dfa9 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-datetimelocal-input-directive/index.html @@ -0,0 +1,35 @@ + + + + + Example - example-datetimelocal-input-directive + + + + + + + + + +
+ Pick a date between in 2013: + + + Required! + + Not a valid date! + value = {{value | date: "yyyy-MM-ddTHH:mm:ss"}}
+ myForm.input.$valid = {{myForm.input.$valid}}
+ myForm.input.$error = {{myForm.input.$error}}
+ myForm.$valid = {{myForm.$valid}}
+ myForm.$error.required = {{!!myForm.$error.required}}
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-datetimelocal-input-directive/manifest.json b/1.3.0-rc.2/docs/examples/example-datetimelocal-input-directive/manifest.json new file mode 100644 index 0000000000..34b85a6353 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-datetimelocal-input-directive/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-datetimelocal-input-directive", + "files": [ + "index-production.html", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-datetimelocal-input-directive/protractor.js b/1.3.0-rc.2/docs/examples/example-datetimelocal-input-directive/protractor.js new file mode 100644 index 0000000000..10a6574ad7 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-datetimelocal-input-directive/protractor.js @@ -0,0 +1,31 @@ + var value = element(by.binding('value | date: "yyyy-MM-ddTHH:mm:ss"')); + var valid = element(by.binding('myForm.input.$valid')); + var input = element(by.model('value')); + + // currently protractor/webdriver does not support + // sending keys to all known HTML5 input controls + // for various browsers (https://github.com/angular/protractor/issues/562). + function setInput(val) { + // set the value of the element and force validation. + var scr = "var ipt = document.getElementById('exampleInput'); " + + "ipt.value = '" + val + "';" + + "angular.element(ipt).scope().$apply(function(s) { s.myForm[ipt.name].$setViewValue('" + val + "'); });"; + browser.executeScript(scr); + } + + it('should initialize to model', function() { + expect(value.getText()).toContain('2010-12-28T14:57:00'); + expect(valid.getText()).toContain('myForm.input.$valid = true'); + }); + + it('should be invalid if empty', function() { + setInput(''); + expect(value.getText()).toEqual('value ='); + expect(valid.getText()).toContain('myForm.input.$valid = false'); + }); + + it('should be invalid if over max', function() { + setInput('2015-01-01T23:59:00'); + expect(value.getText()).toContain(''); + expect(valid.getText()).toContain('myForm.input.$valid = false'); + }); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-email-input-directive/index-debug.html b/1.3.0-rc.2/docs/examples/example-email-input-directive/index-debug.html new file mode 100644 index 0000000000..f17b88fefe --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-email-input-directive/index-debug.html @@ -0,0 +1,34 @@ + + + + + Example - example-email-input-directive-debug + + + + + + + + + +
+ Email: + + Required! + + Not valid email! + text = {{text}}
+ myForm.input.$valid = {{myForm.input.$valid}}
+ myForm.input.$error = {{myForm.input.$error}}
+ myForm.$valid = {{myForm.$valid}}
+ myForm.$error.required = {{!!myForm.$error.required}}
+ myForm.$error.email = {{!!myForm.$error.email}}
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-email-input-directive/index-jquery.html b/1.3.0-rc.2/docs/examples/example-email-input-directive/index-jquery.html new file mode 100644 index 0000000000..6f5c6abb42 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-email-input-directive/index-jquery.html @@ -0,0 +1,35 @@ + + + + + Example - example-email-input-directive-jquery + + + + + + + + + + +
+ Email: + + Required! + + Not valid email! + text = {{text}}
+ myForm.input.$valid = {{myForm.input.$valid}}
+ myForm.input.$error = {{myForm.input.$error}}
+ myForm.$valid = {{myForm.$valid}}
+ myForm.$error.required = {{!!myForm.$error.required}}
+ myForm.$error.email = {{!!myForm.$error.email}}
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-email-input-directive/index-production.html b/1.3.0-rc.2/docs/examples/example-email-input-directive/index-production.html new file mode 100644 index 0000000000..e0899b2ee1 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-email-input-directive/index-production.html @@ -0,0 +1,34 @@ + + + + + Example - example-email-input-directive-production + + + + + + + + + +
+ Email: + + Required! + + Not valid email! + text = {{text}}
+ myForm.input.$valid = {{myForm.input.$valid}}
+ myForm.input.$error = {{myForm.input.$error}}
+ myForm.$valid = {{myForm.$valid}}
+ myForm.$error.required = {{!!myForm.$error.required}}
+ myForm.$error.email = {{!!myForm.$error.email}}
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-email-input-directive/index.html b/1.3.0-rc.2/docs/examples/example-email-input-directive/index.html new file mode 100644 index 0000000000..ee64291fa3 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-email-input-directive/index.html @@ -0,0 +1,34 @@ + + + + + Example - example-email-input-directive + + + + + + + + + +
+ Email: + + Required! + + Not valid email! + text = {{text}}
+ myForm.input.$valid = {{myForm.input.$valid}}
+ myForm.input.$error = {{myForm.input.$error}}
+ myForm.$valid = {{myForm.$valid}}
+ myForm.$error.required = {{!!myForm.$error.required}}
+ myForm.$error.email = {{!!myForm.$error.email}}
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-email-input-directive/manifest.json b/1.3.0-rc.2/docs/examples/example-email-input-directive/manifest.json new file mode 100644 index 0000000000..a7348f2b92 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-email-input-directive/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-email-input-directive", + "files": [ + "index-production.html", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-email-input-directive/protractor.js b/1.3.0-rc.2/docs/examples/example-email-input-directive/protractor.js new file mode 100644 index 0000000000..0d7c9a164b --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-email-input-directive/protractor.js @@ -0,0 +1,22 @@ + var text = element(by.binding('text')); + var valid = element(by.binding('myForm.input.$valid')); + var input = element(by.model('text')); + + it('should initialize to model', function() { + expect(text.getText()).toContain('me@example.com'); + expect(valid.getText()).toContain('true'); + }); + + it('should be invalid if empty', function() { + input.clear(); + input.sendKeys(''); + expect(text.getText()).toEqual('text ='); + expect(valid.getText()).toContain('false'); + }); + + it('should be invalid if not email', function() { + input.clear(); + input.sendKeys('xxx'); + + expect(valid.getText()).toContain('false'); + }); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-error-$rootScope-inprog/app.js b/1.3.0-rc.2/docs/examples/example-error-$rootScope-inprog/app.js new file mode 100644 index 0000000000..3cc1ce0486 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-error-$rootScope-inprog/app.js @@ -0,0 +1,7 @@ + angular.module('app', []).directive('setFocusIf', function() { + return function link($scope, $element, $attr) { + $scope.$watch($attr.setFocusIf, function(value) { + if ( value ) { $element[0].focus(); } + }); + }; + }); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-error-$rootScope-inprog/index-debug.html b/1.3.0-rc.2/docs/examples/example-error-$rootScope-inprog/index-debug.html new file mode 100644 index 0000000000..5fad25046d --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-error-$rootScope-inprog/index-debug.html @@ -0,0 +1,18 @@ + + + + + Example - example-error-$rootScope-inprog-debug + + + + + + + + + + + + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-error-$rootScope-inprog/index-jquery.html b/1.3.0-rc.2/docs/examples/example-error-$rootScope-inprog/index-jquery.html new file mode 100644 index 0000000000..a027b1fd44 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-error-$rootScope-inprog/index-jquery.html @@ -0,0 +1,19 @@ + + + + + Example - example-error-$rootScope-inprog-jquery + + + + + + + + + + + + + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-error-$rootScope-inprog/index-production.html b/1.3.0-rc.2/docs/examples/example-error-$rootScope-inprog/index-production.html new file mode 100644 index 0000000000..eb71c9800f --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-error-$rootScope-inprog/index-production.html @@ -0,0 +1,18 @@ + + + + + Example - example-error-$rootScope-inprog-production + + + + + + + + + + + + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-error-$rootScope-inprog/index.html b/1.3.0-rc.2/docs/examples/example-error-$rootScope-inprog/index.html new file mode 100644 index 0000000000..a2060aecdb --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-error-$rootScope-inprog/index.html @@ -0,0 +1,18 @@ + + + + + Example - example-error-$rootScope-inprog + + + + + + + + + + + + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-error-$rootScope-inprog/manifest.json b/1.3.0-rc.2/docs/examples/example-error-$rootScope-inprog/manifest.json new file mode 100644 index 0000000000..1c988f9fab --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-error-$rootScope-inprog/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-error-$rootScope-inprog", + "files": [ + "index-production.html", + "app.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example/index-debug.html b/1.3.0-rc.2/docs/examples/example-example/index-debug.html new file mode 100644 index 0000000000..3aa0b68607 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example/index-debug.html @@ -0,0 +1,46 @@ + + + + + Example - example-example-debug + + + + + + + + +
+
+Name:
+E-mail:
+Gender: male +female
+ + +
+
form = {{user | json}}
+
master = {{master | json}}
+
+ + + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example/index-jquery.html new file mode 100644 index 0000000000..396796ee49 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example/index-jquery.html @@ -0,0 +1,47 @@ + + + + + Example - example-example-jquery + + + + + + + + + +
+
+Name:
+E-mail:
+Gender: male +female
+ + +
+
form = {{user | json}}
+
master = {{master | json}}
+
+ + + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example/index-production.html b/1.3.0-rc.2/docs/examples/example-example/index-production.html new file mode 100644 index 0000000000..a9b7412402 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example/index-production.html @@ -0,0 +1,46 @@ + + + + + Example - example-example-production + + + + + + + + +
+
+Name:
+E-mail:
+Gender: male +female
+ + +
+
form = {{user | json}}
+
master = {{master | json}}
+
+ + + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example/index.html b/1.3.0-rc.2/docs/examples/example-example/index.html new file mode 100644 index 0000000000..d571064594 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example/index.html @@ -0,0 +1,46 @@ + + + + + Example - example-example + + + + + + + + +
+
+Name:
+E-mail:
+Gender: male +female
+ + +
+
form = {{user | json}}
+
master = {{master | json}}
+
+ + + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example/manifest.json b/1.3.0-rc.2/docs/examples/example-example/manifest.json new file mode 100644 index 0000000000..afef434e19 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example/manifest.json @@ -0,0 +1,6 @@ +{ + "name": "example-example", + "files": [ + "index-production.html" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example1/index-debug.html b/1.3.0-rc.2/docs/examples/example-example1/index-debug.html new file mode 100644 index 0000000000..fbd55d5d3d --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example1/index-debug.html @@ -0,0 +1,19 @@ + + + + + Example - example-example1-debug + + + + + + + + + +
+ I can add: {{a}} + {{b}} = {{ a+b }} +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example1/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example1/index-jquery.html new file mode 100644 index 0000000000..fd931523b4 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example1/index-jquery.html @@ -0,0 +1,20 @@ + + + + + Example - example-example1-jquery + + + + + + + + + + +
+ I can add: {{a}} + {{b}} = {{ a+b }} +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example1/index-production.html b/1.3.0-rc.2/docs/examples/example-example1/index-production.html new file mode 100644 index 0000000000..86c3e990df --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example1/index-production.html @@ -0,0 +1,19 @@ + + + + + Example - example-example1-production + + + + + + + + + +
+ I can add: {{a}} + {{b}} = {{ a+b }} +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example1/index.html b/1.3.0-rc.2/docs/examples/example-example1/index.html new file mode 100644 index 0000000000..cd2ad9b769 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example1/index.html @@ -0,0 +1,19 @@ + + + + + Example - example-example1 + + + + + + + + + +
+ I can add: {{a}} + {{b}} = {{ a+b }} +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example1/manifest.json b/1.3.0-rc.2/docs/examples/example-example1/manifest.json new file mode 100644 index 0000000000..add5f56bdc --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example1/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example1", + "files": [ + "index-production.html", + "script.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example1/script.js b/1.3.0-rc.2/docs/examples/example-example1/script.js new file mode 100644 index 0000000000..68333d37e5 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example1/script.js @@ -0,0 +1,4 @@ +angular.module('ngAppDemo', []).controller('ngAppDemoController', function($scope) { + $scope.a = 1; + $scope.b = 2; +}); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example10/index-debug.html b/1.3.0-rc.2/docs/examples/example-example10/index-debug.html new file mode 100644 index 0000000000..3d25df7a1c --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example10/index-debug.html @@ -0,0 +1,20 @@ + + + + + Example - example-example10-debug + + + + + + + + + Check me to select:
+ + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example10/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example10/index-jquery.html new file mode 100644 index 0000000000..b973af0e87 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example10/index-jquery.html @@ -0,0 +1,21 @@ + + + + + Example - example-example10-jquery + + + + + + + + + + Check me to select:
+ + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example10/index-production.html b/1.3.0-rc.2/docs/examples/example-example10/index-production.html new file mode 100644 index 0000000000..4c57a41c64 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example10/index-production.html @@ -0,0 +1,20 @@ + + + + + Example - example-example10-production + + + + + + + + + Check me to select:
+ + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example10/index.html b/1.3.0-rc.2/docs/examples/example-example10/index.html new file mode 100644 index 0000000000..0f2af1b605 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example10/index.html @@ -0,0 +1,20 @@ + + + + + Example - example-example10 + + + + + + + + + Check me to select:
+ + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example10/manifest.json b/1.3.0-rc.2/docs/examples/example-example10/manifest.json new file mode 100644 index 0000000000..947ad10326 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example10/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example10", + "files": [ + "index-production.html", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example10/protractor.js b/1.3.0-rc.2/docs/examples/example-example10/protractor.js new file mode 100644 index 0000000000..e51846f4a6 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example10/protractor.js @@ -0,0 +1,5 @@ + it('should select Greetings!', function() { + expect(element(by.id('greet')).getAttribute('selected')).toBeFalsy(); + element(by.model('selected')).click(); + expect(element(by.id('greet')).getAttribute('selected')).toBeTruthy(); + }); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example100/index-debug.html b/1.3.0-rc.2/docs/examples/example-example100/index-debug.html new file mode 100644 index 0000000000..268fb14a82 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example100/index-debug.html @@ -0,0 +1,53 @@ + + + + + Example - example-example100-debug + + + + + + + + +
+
+ Name: +
+ E-mail:
+ Gender: male + female
+ + +
+
+ + + + + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example100/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example100/index-jquery.html new file mode 100644 index 0000000000..d73b29dd94 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example100/index-jquery.html @@ -0,0 +1,54 @@ + + + + + Example - example-example100-jquery + + + + + + + + + +
+
+ Name: +
+ E-mail:
+ Gender: male + female
+ + +
+
+ + + + + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example100/index-production.html b/1.3.0-rc.2/docs/examples/example-example100/index-production.html new file mode 100644 index 0000000000..715313cc03 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example100/index-production.html @@ -0,0 +1,53 @@ + + + + + Example - example-example100-production + + + + + + + + +
+
+ Name: +
+ E-mail:
+ Gender: male + female
+ + +
+
+ + + + + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example100/index.html b/1.3.0-rc.2/docs/examples/example-example100/index.html new file mode 100644 index 0000000000..19c5c7ff6a --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example100/index.html @@ -0,0 +1,53 @@ + + + + + Example - example-example100 + + + + + + + + +
+
+ Name: +
+ E-mail:
+ Gender: male + female
+ + +
+
+ + + + + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example100/manifest.json b/1.3.0-rc.2/docs/examples/example-example100/manifest.json new file mode 100644 index 0000000000..68a5e41c04 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example100/manifest.json @@ -0,0 +1,6 @@ +{ + "name": "example-example100", + "files": [ + "index-production.html" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example101/index-debug.html b/1.3.0-rc.2/docs/examples/example-example101/index-debug.html new file mode 100644 index 0000000000..e6959a46ee --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example101/index-debug.html @@ -0,0 +1,40 @@ + + + + + Example - example-example101-debug + + + + + + + + + +
+
+ Name: +
+ E-mail: +
+
Invalid: + Tell us your email. + This is not a valid email. +
+ + Gender: male + female
+ + + I agree:
+
Please agree and sign.
+ + + +
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example101/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example101/index-jquery.html new file mode 100644 index 0000000000..cf91acfa77 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example101/index-jquery.html @@ -0,0 +1,41 @@ + + + + + Example - example-example101-jquery + + + + + + + + + + +
+
+ Name: +
+ E-mail: +
+
Invalid: + Tell us your email. + This is not a valid email. +
+ + Gender: male + female
+ + + I agree:
+
Please agree and sign.
+ + + +
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example101/index-production.html b/1.3.0-rc.2/docs/examples/example-example101/index-production.html new file mode 100644 index 0000000000..7c84f38207 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example101/index-production.html @@ -0,0 +1,40 @@ + + + + + Example - example-example101-production + + + + + + + + + +
+
+ Name: +
+ E-mail: +
+
Invalid: + Tell us your email. + This is not a valid email. +
+ + Gender: male + female
+ + + I agree:
+
Please agree and sign.
+ + + +
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example101/index.html b/1.3.0-rc.2/docs/examples/example-example101/index.html new file mode 100644 index 0000000000..7ebe7e5ad5 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example101/index.html @@ -0,0 +1,40 @@ + + + + + Example - example-example101 + + + + + + + + + +
+
+ Name: +
+ E-mail: +
+
Invalid: + Tell us your email. + This is not a valid email. +
+ + Gender: male + female
+ + + I agree:
+
Please agree and sign.
+ + + +
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example101/manifest.json b/1.3.0-rc.2/docs/examples/example-example101/manifest.json new file mode 100644 index 0000000000..ed66af641a --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example101/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example101", + "files": [ + "index-production.html", + "script.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example101/script.js b/1.3.0-rc.2/docs/examples/example-example101/script.js new file mode 100644 index 0000000000..12c3108840 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example101/script.js @@ -0,0 +1,18 @@ + angular.module('formExample', []) + .controller('ExampleController', ['$scope', function($scope) { + $scope.master = {}; + + $scope.update = function(user) { + $scope.master = angular.copy(user); + }; + + $scope.reset = function() { + $scope.user = angular.copy($scope.master); + }; + + $scope.isUnchanged = function(user) { + return angular.equals(user, $scope.master); + }; + + $scope.reset(); + }]); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example102/index-debug.html b/1.3.0-rc.2/docs/examples/example-example102/index-debug.html new file mode 100644 index 0000000000..e3d80209f7 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example102/index-debug.html @@ -0,0 +1,25 @@ + + + + + Example - example-example102-debug + + + + + + + + + +
+
+ Name: +
+ Other data: +
+
+
username = "{{user.name}}"
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example102/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example102/index-jquery.html new file mode 100644 index 0000000000..9c6da7860e --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example102/index-jquery.html @@ -0,0 +1,26 @@ + + + + + Example - example-example102-jquery + + + + + + + + + + +
+
+ Name: +
+ Other data: +
+
+
username = "{{user.name}}"
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example102/index-production.html b/1.3.0-rc.2/docs/examples/example-example102/index-production.html new file mode 100644 index 0000000000..9ab83b0dce --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example102/index-production.html @@ -0,0 +1,25 @@ + + + + + Example - example-example102-production + + + + + + + + + +
+
+ Name: +
+ Other data: +
+
+
username = "{{user.name}}"
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example102/index.html b/1.3.0-rc.2/docs/examples/example-example102/index.html new file mode 100644 index 0000000000..c9008afc44 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example102/index.html @@ -0,0 +1,25 @@ + + + + + Example - example-example102 + + + + + + + + + +
+
+ Name: +
+ Other data: +
+
+
username = "{{user.name}}"
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example102/manifest.json b/1.3.0-rc.2/docs/examples/example-example102/manifest.json new file mode 100644 index 0000000000..d9f1b45407 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example102/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example102", + "files": [ + "index-production.html", + "script.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example102/script.js b/1.3.0-rc.2/docs/examples/example-example102/script.js new file mode 100644 index 0000000000..6cae276c92 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example102/script.js @@ -0,0 +1,4 @@ + angular.module('customTriggerExample', []) + .controller('ExampleController', ['$scope', function($scope) { + $scope.user = {}; + }]); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example103/index-debug.html b/1.3.0-rc.2/docs/examples/example-example103/index-debug.html new file mode 100644 index 0000000000..1237d093f9 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example103/index-debug.html @@ -0,0 +1,23 @@ + + + + + Example - example-example103-debug + + + + + + + + + +
+
+ Name: +
+
+
username = "{{user.name}}"
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example103/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example103/index-jquery.html new file mode 100644 index 0000000000..10192ec0db --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example103/index-jquery.html @@ -0,0 +1,24 @@ + + + + + Example - example-example103-jquery + + + + + + + + + + +
+
+ Name: +
+
+
username = "{{user.name}}"
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example103/index-production.html b/1.3.0-rc.2/docs/examples/example-example103/index-production.html new file mode 100644 index 0000000000..831a7a8d7d --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example103/index-production.html @@ -0,0 +1,23 @@ + + + + + Example - example-example103-production + + + + + + + + + +
+
+ Name: +
+
+
username = "{{user.name}}"
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example103/index.html b/1.3.0-rc.2/docs/examples/example-example103/index.html new file mode 100644 index 0000000000..576b8f7afd --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example103/index.html @@ -0,0 +1,23 @@ + + + + + Example - example-example103 + + + + + + + + + +
+
+ Name: +
+
+
username = "{{user.name}}"
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example103/manifest.json b/1.3.0-rc.2/docs/examples/example-example103/manifest.json new file mode 100644 index 0000000000..05759b4f0a --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example103/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example103", + "files": [ + "index-production.html", + "script.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example103/script.js b/1.3.0-rc.2/docs/examples/example-example103/script.js new file mode 100644 index 0000000000..27f8805e1b --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example103/script.js @@ -0,0 +1,4 @@ + angular.module('debounceExample', []) + .controller('ExampleController', ['$scope', function($scope) { + $scope.user = {}; + }]); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example104/index-debug.html b/1.3.0-rc.2/docs/examples/example-example104/index-debug.html new file mode 100644 index 0000000000..20c3944790 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example104/index-debug.html @@ -0,0 +1,34 @@ + + + + + Example - example-example104-debug + + + + + + + + + +
+
+ Size (integer 0 - 10): + {{size}}
+ This is not valid integer! + + The value must be in range 0 to 10! +
+ +
+ Length (float): + + {{length}}
+ + This is not a valid float number! +
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example104/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example104/index-jquery.html new file mode 100644 index 0000000000..d431db087e --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example104/index-jquery.html @@ -0,0 +1,35 @@ + + + + + Example - example-example104-jquery + + + + + + + + + + +
+
+ Size (integer 0 - 10): + {{size}}
+ This is not valid integer! + + The value must be in range 0 to 10! +
+ +
+ Length (float): + + {{length}}
+ + This is not a valid float number! +
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example104/index-production.html b/1.3.0-rc.2/docs/examples/example-example104/index-production.html new file mode 100644 index 0000000000..9a70546313 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example104/index-production.html @@ -0,0 +1,34 @@ + + + + + Example - example-example104-production + + + + + + + + + +
+
+ Size (integer 0 - 10): + {{size}}
+ This is not valid integer! + + The value must be in range 0 to 10! +
+ +
+ Length (float): + + {{length}}
+ + This is not a valid float number! +
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example104/index.html b/1.3.0-rc.2/docs/examples/example-example104/index.html new file mode 100644 index 0000000000..2f8e19e3aa --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example104/index.html @@ -0,0 +1,34 @@ + + + + + Example - example-example104 + + + + + + + + + +
+
+ Size (integer 0 - 10): + {{size}}
+ This is not valid integer! + + The value must be in range 0 to 10! +
+ +
+ Length (float): + + {{length}}
+ + This is not a valid float number! +
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example104/manifest.json b/1.3.0-rc.2/docs/examples/example-example104/manifest.json new file mode 100644 index 0000000000..7c0e5a0530 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example104/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example104", + "files": [ + "index-production.html", + "script.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example104/script.js b/1.3.0-rc.2/docs/examples/example-example104/script.js new file mode 100644 index 0000000000..91a29d63eb --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example104/script.js @@ -0,0 +1,39 @@ + var app = angular.module('form-example1', []); + + var INTEGER_REGEXP = /^\-?\d+$/; + app.directive('integer', function() { + return { + require: 'ngModel', + link: function(scope, elm, attrs, ctrl) { + ctrl.$parsers.unshift(function(viewValue) { + if (INTEGER_REGEXP.test(viewValue)) { + // it is valid + ctrl.$setValidity('integer', true); + return viewValue; + } else { + // it is invalid, return undefined (no model update) + ctrl.$setValidity('integer', false); + return undefined; + } + }); + } + }; + }); + + var FLOAT_REGEXP = /^\-?\d+((\.|\,)\d+)?$/; + app.directive('smartFloat', function() { + return { + require: 'ngModel', + link: function(scope, elm, attrs, ctrl) { + ctrl.$parsers.unshift(function(viewValue) { + if (FLOAT_REGEXP.test(viewValue)) { + ctrl.$setValidity('float', true); + return parseFloat(viewValue.replace(',', '.')); + } else { + ctrl.$setValidity('float', false); + return undefined; + } + }); + } + }; + }); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example105/index-debug.html b/1.3.0-rc.2/docs/examples/example-example105/index-debug.html new file mode 100644 index 0000000000..f2902ac804 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example105/index-debug.html @@ -0,0 +1,25 @@ + + + + + Example - example-example105-debug + + + + + + + + + +
Some
+
model = {{content}}
+ + + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example105/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example105/index-jquery.html new file mode 100644 index 0000000000..82e9224c9a --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example105/index-jquery.html @@ -0,0 +1,26 @@ + + + + + Example - example-example105-jquery + + + + + + + + + + +
Some
+
model = {{content}}
+ + + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example105/index-production.html b/1.3.0-rc.2/docs/examples/example-example105/index-production.html new file mode 100644 index 0000000000..4950a6a5b6 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example105/index-production.html @@ -0,0 +1,25 @@ + + + + + Example - example-example105-production + + + + + + + + + +
Some
+
model = {{content}}
+ + + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example105/index.html b/1.3.0-rc.2/docs/examples/example-example105/index.html new file mode 100644 index 0000000000..d61e051263 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example105/index.html @@ -0,0 +1,25 @@ + + + + + Example - example-example105 + + + + + + + + + +
Some
+
model = {{content}}
+ + + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example105/manifest.json b/1.3.0-rc.2/docs/examples/example-example105/manifest.json new file mode 100644 index 0000000000..4372ed63be --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example105/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example105", + "files": [ + "index-production.html", + "script.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example105/script.js b/1.3.0-rc.2/docs/examples/example-example105/script.js new file mode 100644 index 0000000000..0487d87bdf --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example105/script.js @@ -0,0 +1,21 @@ + angular.module('form-example2', []).directive('contenteditable', function() { + return { + require: 'ngModel', + link: function(scope, elm, attrs, ctrl) { + // view -> model + elm.on('blur', function() { + scope.$apply(function() { + ctrl.$setViewValue(elm.html()); + }); + }); + + // model -> view + ctrl.$render = function() { + elm.html(ctrl.$viewValue); + }; + + // load init value from DOM + ctrl.$setViewValue(elm.html()); + } + }; + }); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example106/index-debug.html b/1.3.0-rc.2/docs/examples/example-example106/index-debug.html new file mode 100644 index 0000000000..7a19810621 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example106/index-debug.html @@ -0,0 +1,21 @@ + + + + + Example - example-example106-debug + + + + + + + + + +
+
+ {{ 'World' | greet }} +
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example106/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example106/index-jquery.html new file mode 100644 index 0000000000..a8bad10baa --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example106/index-jquery.html @@ -0,0 +1,22 @@ + + + + + Example - example-example106-jquery + + + + + + + + + + +
+
+ {{ 'World' | greet }} +
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example106/index-production.html b/1.3.0-rc.2/docs/examples/example-example106/index-production.html new file mode 100644 index 0000000000..3e5572af64 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example106/index-production.html @@ -0,0 +1,21 @@ + + + + + Example - example-example106-production + + + + + + + + + +
+
+ {{ 'World' | greet }} +
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example106/index.html b/1.3.0-rc.2/docs/examples/example-example106/index.html new file mode 100644 index 0000000000..4942d80257 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example106/index.html @@ -0,0 +1,21 @@ + + + + + Example - example-example106 + + + + + + + + + +
+
+ {{ 'World' | greet }} +
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example106/manifest.json b/1.3.0-rc.2/docs/examples/example-example106/manifest.json new file mode 100644 index 0000000000..5703532681 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example106/manifest.json @@ -0,0 +1,8 @@ +{ + "name": "example-example106", + "files": [ + "index-production.html", + "script.js", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example106/protractor.js b/1.3.0-rc.2/docs/examples/example-example106/protractor.js new file mode 100644 index 0000000000..a3c96cf92f --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example106/protractor.js @@ -0,0 +1,3 @@ + it('should add Hello to the name', function() { + expect(element(by.binding("'World' | greet")).getText()).toEqual('Hello, World!'); + }); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example106/script.js b/1.3.0-rc.2/docs/examples/example-example106/script.js new file mode 100644 index 0000000000..7a2bb6a413 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example106/script.js @@ -0,0 +1,10 @@ + // declare a module + var myAppModule = angular.module('myApp', []); + + // configure the module. + // in this example we will create a greeting filter + myAppModule.filter('greet', function() { + return function(name) { + return 'Hello, ' + name + '!'; + }; + }); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example107/index-debug.html b/1.3.0-rc.2/docs/examples/example-example107/index-debug.html new file mode 100644 index 0000000000..fef1e0e507 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example107/index-debug.html @@ -0,0 +1,19 @@ + + + + + Example - example-example107-debug + + + + + + + + + +
+ {{ greeting }} +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example107/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example107/index-jquery.html new file mode 100644 index 0000000000..1b061971e1 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example107/index-jquery.html @@ -0,0 +1,20 @@ + + + + + Example - example-example107-jquery + + + + + + + + + + +
+ {{ greeting }} +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example107/index-production.html b/1.3.0-rc.2/docs/examples/example-example107/index-production.html new file mode 100644 index 0000000000..b7ff954bd5 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example107/index-production.html @@ -0,0 +1,19 @@ + + + + + Example - example-example107-production + + + + + + + + + +
+ {{ greeting }} +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example107/index.html b/1.3.0-rc.2/docs/examples/example-example107/index.html new file mode 100644 index 0000000000..834a3c1de5 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example107/index.html @@ -0,0 +1,19 @@ + + + + + Example - example-example107 + + + + + + + + + +
+ {{ greeting }} +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example107/manifest.json b/1.3.0-rc.2/docs/examples/example-example107/manifest.json new file mode 100644 index 0000000000..49e9900e4e --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example107/manifest.json @@ -0,0 +1,8 @@ +{ + "name": "example-example107", + "files": [ + "index-production.html", + "script.js", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example107/protractor.js b/1.3.0-rc.2/docs/examples/example-example107/protractor.js new file mode 100644 index 0000000000..e76228d236 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example107/protractor.js @@ -0,0 +1,3 @@ + it('should add Hello to the name', function() { + expect(element(by.binding("greeting")).getText()).toEqual('Bonjour World!'); + }); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example107/script.js b/1.3.0-rc.2/docs/examples/example-example107/script.js new file mode 100644 index 0000000000..1ba616ac8c --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example107/script.js @@ -0,0 +1,35 @@ + angular.module('xmpl.service', []) + + .value('greeter', { + salutation: 'Hello', + localize: function(localization) { + this.salutation = localization.salutation; + }, + greet: function(name) { + return this.salutation + ' ' + name + '!'; + } + }) + + .value('user', { + load: function(name) { + this.name = name; + } + }); + + angular.module('xmpl.directive', []); + + angular.module('xmpl.filter', []); + + angular.module('xmpl', ['xmpl.service', 'xmpl.directive', 'xmpl.filter']) + + .run(function(greeter, user) { + // This is effectively part of the main method initialization code + greeter.localize({ + salutation: 'Bonjour' + }); + user.load('World'); + }) + + .controller('XmplController', function($scope, greeter, user){ + $scope.greeting = greeter.greet(user.name); + }); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example108/index-debug.html b/1.3.0-rc.2/docs/examples/example-example108/index-debug.html new file mode 100644 index 0000000000..ea69ee5e2b --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example108/index-debug.html @@ -0,0 +1,23 @@ + + + + + Example - example-example108-debug + + + + + + + + + +
+ Your name: + + +
+ {{greeting}} +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example108/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example108/index-jquery.html new file mode 100644 index 0000000000..92fdae77f3 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example108/index-jquery.html @@ -0,0 +1,24 @@ + + + + + Example - example-example108-jquery + + + + + + + + + + +
+ Your name: + + +
+ {{greeting}} +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example108/index-production.html b/1.3.0-rc.2/docs/examples/example-example108/index-production.html new file mode 100644 index 0000000000..6ec118d3fa --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example108/index-production.html @@ -0,0 +1,23 @@ + + + + + Example - example-example108-production + + + + + + + + + +
+ Your name: + + +
+ {{greeting}} +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example108/index.html b/1.3.0-rc.2/docs/examples/example-example108/index.html new file mode 100644 index 0000000000..ee45f8e755 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example108/index.html @@ -0,0 +1,23 @@ + + + + + Example - example-example108 + + + + + + + + + +
+ Your name: + + +
+ {{greeting}} +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example108/manifest.json b/1.3.0-rc.2/docs/examples/example-example108/manifest.json new file mode 100644 index 0000000000..dcb9f8d813 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example108/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example108", + "files": [ + "index-production.html", + "script.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example108/script.js b/1.3.0-rc.2/docs/examples/example-example108/script.js new file mode 100644 index 0000000000..301f01e5a4 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example108/script.js @@ -0,0 +1,8 @@ + angular.module('scopeExample', []) + .controller('MyController', ['$scope', function($scope) { + $scope.username = 'World'; + + $scope.sayHello = function() { + $scope.greeting = 'Hello ' + $scope.username + '!'; + }; + }]); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example109/index-debug.html b/1.3.0-rc.2/docs/examples/example-example109/index-debug.html new file mode 100644 index 0000000000..5c86a6c698 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example109/index-debug.html @@ -0,0 +1,27 @@ + + + + + Example - example-example109-debug + + + + + + + + + + +
+
+ Hello {{name}}! +
+
+
    +
  1. {{name}} from {{department}}
  2. +
+
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example109/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example109/index-jquery.html new file mode 100644 index 0000000000..0c204be44b --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example109/index-jquery.html @@ -0,0 +1,28 @@ + + + + + Example - example-example109-jquery + + + + + + + + + + + +
+
+ Hello {{name}}! +
+
+
    +
  1. {{name}} from {{department}}
  2. +
+
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example109/index-production.html b/1.3.0-rc.2/docs/examples/example-example109/index-production.html new file mode 100644 index 0000000000..a661a95ee1 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example109/index-production.html @@ -0,0 +1,27 @@ + + + + + Example - example-example109-production + + + + + + + + + + +
+
+ Hello {{name}}! +
+
+
    +
  1. {{name}} from {{department}}
  2. +
+
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example109/index.html b/1.3.0-rc.2/docs/examples/example-example109/index.html new file mode 100644 index 0000000000..7148fb7632 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example109/index.html @@ -0,0 +1,27 @@ + + + + + Example - example-example109 + + + + + + + + + + +
+
+ Hello {{name}}! +
+
+
    +
  1. {{name}} from {{department}}
  2. +
+
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example109/manifest.json b/1.3.0-rc.2/docs/examples/example-example109/manifest.json new file mode 100644 index 0000000000..78d2be6087 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example109/manifest.json @@ -0,0 +1,8 @@ +{ + "name": "example-example109", + "files": [ + "index-production.html", + "script.js", + "style.css" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example109/script.js b/1.3.0-rc.2/docs/examples/example-example109/script.js new file mode 100644 index 0000000000..d37dabc30f --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example109/script.js @@ -0,0 +1,8 @@ + angular.module('scopeExample', []) + .controller('GreetController', ['$scope', '$rootScope', function($scope, $rootScope) { + $scope.name = 'World'; + $rootScope.department = 'Angular'; + }]) + .controller('ListController', ['$scope', function($scope) { + $scope.names = ['Igor', 'Misko', 'Vojta']; + }]); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example109/style.css b/1.3.0-rc.2/docs/examples/example-example109/style.css new file mode 100644 index 0000000000..d2a95564e1 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example109/style.css @@ -0,0 +1,5 @@ + .show-scope-demo.ng-scope, + .show-scope-demo .ng-scope { + border: 1px solid red; + margin: 3px; + } \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example11/index-debug.html b/1.3.0-rc.2/docs/examples/example-example11/index-debug.html new file mode 100644 index 0000000000..bd495246c1 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example11/index-debug.html @@ -0,0 +1,19 @@ + + + + + Example - example-example11-debug + + + + + + + + + Check me check multiple:
+
+ Show/Hide me +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example11/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example11/index-jquery.html new file mode 100644 index 0000000000..a15a4128eb --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example11/index-jquery.html @@ -0,0 +1,20 @@ + + + + + Example - example-example11-jquery + + + + + + + + + + Check me check multiple:
+
+ Show/Hide me +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example11/index-production.html b/1.3.0-rc.2/docs/examples/example-example11/index-production.html new file mode 100644 index 0000000000..e2424ec491 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example11/index-production.html @@ -0,0 +1,19 @@ + + + + + Example - example-example11-production + + + + + + + + + Check me check multiple:
+
+ Show/Hide me +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example11/index.html b/1.3.0-rc.2/docs/examples/example-example11/index.html new file mode 100644 index 0000000000..f9ad71e684 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example11/index.html @@ -0,0 +1,19 @@ + + + + + Example - example-example11 + + + + + + + + + Check me check multiple:
+
+ Show/Hide me +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example11/manifest.json b/1.3.0-rc.2/docs/examples/example-example11/manifest.json new file mode 100644 index 0000000000..b89b9da768 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example11/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example11", + "files": [ + "index-production.html", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example11/protractor.js b/1.3.0-rc.2/docs/examples/example-example11/protractor.js new file mode 100644 index 0000000000..1f2c684ba9 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example11/protractor.js @@ -0,0 +1,5 @@ + it('should toggle open', function() { + expect(element(by.id('details')).getAttribute('open')).toBeFalsy(); + element(by.model('open')).click(); + expect(element(by.id('details')).getAttribute('open')).toBeTruthy(); + }); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example110/index-debug.html b/1.3.0-rc.2/docs/examples/example-example110/index-debug.html new file mode 100644 index 0000000000..a9e448114a --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example110/index-debug.html @@ -0,0 +1,32 @@ + + + + + Example - example-example110-debug + + + + + + + + + +
+ Root scope MyEvent count: {{count}} +
    +
  • + + +
    + Middle scope MyEvent count: {{count}} +
      +
    • + Leaf scope MyEvent count: {{count}} +
    • +
    +
  • +
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example110/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example110/index-jquery.html new file mode 100644 index 0000000000..80f41a6bb4 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example110/index-jquery.html @@ -0,0 +1,33 @@ + + + + + Example - example-example110-jquery + + + + + + + + + + +
+ Root scope MyEvent count: {{count}} +
    +
  • + + +
    + Middle scope MyEvent count: {{count}} +
      +
    • + Leaf scope MyEvent count: {{count}} +
    • +
    +
  • +
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example110/index-production.html b/1.3.0-rc.2/docs/examples/example-example110/index-production.html new file mode 100644 index 0000000000..c6ee09bdee --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example110/index-production.html @@ -0,0 +1,32 @@ + + + + + Example - example-example110-production + + + + + + + + + +
+ Root scope MyEvent count: {{count}} +
    +
  • + + +
    + Middle scope MyEvent count: {{count}} +
      +
    • + Leaf scope MyEvent count: {{count}} +
    • +
    +
  • +
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example110/index.html b/1.3.0-rc.2/docs/examples/example-example110/index.html new file mode 100644 index 0000000000..41507036fe --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example110/index.html @@ -0,0 +1,32 @@ + + + + + Example - example-example110 + + + + + + + + + +
+ Root scope MyEvent count: {{count}} +
    +
  • + + +
    + Middle scope MyEvent count: {{count}} +
      +
    • + Leaf scope MyEvent count: {{count}} +
    • +
    +
  • +
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example110/manifest.json b/1.3.0-rc.2/docs/examples/example-example110/manifest.json new file mode 100644 index 0000000000..437cd7875b --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example110/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example110", + "files": [ + "index-production.html", + "script.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example110/script.js b/1.3.0-rc.2/docs/examples/example-example110/script.js new file mode 100644 index 0000000000..a8eb7f9872 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example110/script.js @@ -0,0 +1,7 @@ + angular.module('eventExample', []) + .controller('EventController', ['$scope', function($scope) { + $scope.count = 0; + $scope.$on('MyEvent', function() { + $scope.count++; + }); + }]); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example111/index-debug.html b/1.3.0-rc.2/docs/examples/example-example111/index-debug.html new file mode 100644 index 0000000000..e2eff286b2 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example111/index-debug.html @@ -0,0 +1,22 @@ + + + + + Example - example-example111-debug + + + + + + + + + +
+

Let's try this simple notify service, injected into the controller...

+ + +

(you have to click 3 times to see an alert)

+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example111/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example111/index-jquery.html new file mode 100644 index 0000000000..69fa828aed --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example111/index-jquery.html @@ -0,0 +1,23 @@ + + + + + Example - example-example111-jquery + + + + + + + + + + +
+

Let's try this simple notify service, injected into the controller...

+ + +

(you have to click 3 times to see an alert)

+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example111/index-production.html b/1.3.0-rc.2/docs/examples/example-example111/index-production.html new file mode 100644 index 0000000000..113bbcd7d8 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example111/index-production.html @@ -0,0 +1,22 @@ + + + + + Example - example-example111-production + + + + + + + + + +
+

Let's try this simple notify service, injected into the controller...

+ + +

(you have to click 3 times to see an alert)

+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example111/index.html b/1.3.0-rc.2/docs/examples/example-example111/index.html new file mode 100644 index 0000000000..a112e7768c --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example111/index.html @@ -0,0 +1,22 @@ + + + + + Example - example-example111 + + + + + + + + + +
+

Let's try this simple notify service, injected into the controller...

+ + +

(you have to click 3 times to see an alert)

+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example111/manifest.json b/1.3.0-rc.2/docs/examples/example-example111/manifest.json new file mode 100644 index 0000000000..1136e7baed --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example111/manifest.json @@ -0,0 +1,8 @@ +{ + "name": "example-example111", + "files": [ + "index-production.html", + "script.js", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example111/protractor.js b/1.3.0-rc.2/docs/examples/example-example111/protractor.js new file mode 100644 index 0000000000..943e356ace --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example111/protractor.js @@ -0,0 +1,4 @@ + it('should test service', function() { + expect(element(by.id('simple')).element(by.model('message')).getAttribute('value')) + .toEqual('test'); + }); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example111/script.js b/1.3.0-rc.2/docs/examples/example-example111/script.js new file mode 100644 index 0000000000..12aabc558a --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example111/script.js @@ -0,0 +1,17 @@ + angular. + module('myServiceModule', []). + controller('MyController', ['$scope','notify', function ($scope, notify) { + $scope.callNotify = function(msg) { + notify(msg); + }; + }]). + factory('notify', ['$window', function(win) { + var msgs = []; + return function(msg) { + msgs.push(msg); + if (msgs.length == 3) { + win.alert(msgs.join("\n")); + msgs = []; + } + }; + }]); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example112/index-debug.html b/1.3.0-rc.2/docs/examples/example-example112/index-debug.html new file mode 100644 index 0000000000..3df48a100f --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example112/index-debug.html @@ -0,0 +1,22 @@ + + + + + Example - example-example112-debug + + + + + + + + + +
+

Let's try the notify service, that is implicitly injected into the controller...

+ + +

(you have to click 3 times to see an alert)

+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example112/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example112/index-jquery.html new file mode 100644 index 0000000000..4f499332a7 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example112/index-jquery.html @@ -0,0 +1,23 @@ + + + + + Example - example-example112-jquery + + + + + + + + + + +
+

Let's try the notify service, that is implicitly injected into the controller...

+ + +

(you have to click 3 times to see an alert)

+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example112/index-production.html b/1.3.0-rc.2/docs/examples/example-example112/index-production.html new file mode 100644 index 0000000000..1a4c2b0ee4 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example112/index-production.html @@ -0,0 +1,22 @@ + + + + + Example - example-example112-production + + + + + + + + + +
+

Let's try the notify service, that is implicitly injected into the controller...

+ + +

(you have to click 3 times to see an alert)

+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example112/index.html b/1.3.0-rc.2/docs/examples/example-example112/index.html new file mode 100644 index 0000000000..41ad0fec5a --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example112/index.html @@ -0,0 +1,22 @@ + + + + + Example - example-example112 + + + + + + + + + +
+

Let's try the notify service, that is implicitly injected into the controller...

+ + +

(you have to click 3 times to see an alert)

+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example112/manifest.json b/1.3.0-rc.2/docs/examples/example-example112/manifest.json new file mode 100644 index 0000000000..1f548aced7 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example112/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example112", + "files": [ + "index-production.html", + "script.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example112/script.js b/1.3.0-rc.2/docs/examples/example-example112/script.js new file mode 100644 index 0000000000..bee4e0ef63 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example112/script.js @@ -0,0 +1,16 @@ + angular.module('myServiceModuleDI', []). + factory('notify', function($window) { + var msgs = []; + return function(msg) { + msgs.push(msg); + if (msgs.length == 3) { + $window.alert(msgs.join("\n")); + msgs = []; + } + }; + }). + controller('MyController', function($scope, notify) { + $scope.callNotify = function(msg) { + notify(msg); + }; + }); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example12/index-debug.html b/1.3.0-rc.2/docs/examples/example-example12/index-debug.html new file mode 100644 index 0000000000..abed039f0f --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example12/index-debug.html @@ -0,0 +1,43 @@ + + + + + Example - example-example12-debug + + + + + + + + + + + +
+ userType: + Required!
+ userType = {{userType}}
+ myForm.input.$valid = {{myForm.input.$valid}}
+ myForm.input.$error = {{myForm.input.$error}}
+ myForm.$valid = {{myForm.$valid}}
+ myForm.$error.required = {{!!myForm.$error.required}}
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example12/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example12/index-jquery.html new file mode 100644 index 0000000000..8d8e5a674c --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example12/index-jquery.html @@ -0,0 +1,44 @@ + + + + + Example - example-example12-jquery + + + + + + + + + + + + +
+ userType: + Required!
+ userType = {{userType}}
+ myForm.input.$valid = {{myForm.input.$valid}}
+ myForm.input.$error = {{myForm.input.$error}}
+ myForm.$valid = {{myForm.$valid}}
+ myForm.$error.required = {{!!myForm.$error.required}}
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example12/index-production.html b/1.3.0-rc.2/docs/examples/example-example12/index-production.html new file mode 100644 index 0000000000..81eae33665 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example12/index-production.html @@ -0,0 +1,43 @@ + + + + + Example - example-example12-production + + + + + + + + + + + +
+ userType: + Required!
+ userType = {{userType}}
+ myForm.input.$valid = {{myForm.input.$valid}}
+ myForm.input.$error = {{myForm.input.$error}}
+ myForm.$valid = {{myForm.$valid}}
+ myForm.$error.required = {{!!myForm.$error.required}}
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example12/index.html b/1.3.0-rc.2/docs/examples/example-example12/index.html new file mode 100644 index 0000000000..0803e6ee2d --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example12/index.html @@ -0,0 +1,43 @@ + + + + + Example - example-example12 + + + + + + + + + + + +
+ userType: + Required!
+ userType = {{userType}}
+ myForm.input.$valid = {{myForm.input.$valid}}
+ myForm.input.$error = {{myForm.input.$error}}
+ myForm.$valid = {{myForm.$valid}}
+ myForm.$error.required = {{!!myForm.$error.required}}
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example12/manifest.json b/1.3.0-rc.2/docs/examples/example-example12/manifest.json new file mode 100644 index 0000000000..7f1b7324ce --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example12/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example12", + "files": [ + "index-production.html", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example12/protractor.js b/1.3.0-rc.2/docs/examples/example-example12/protractor.js new file mode 100644 index 0000000000..4e686d9498 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example12/protractor.js @@ -0,0 +1,19 @@ + it('should initialize to model', function() { + var userType = element(by.binding('userType')); + var valid = element(by.binding('myForm.input.$valid')); + + expect(userType.getText()).toContain('guest'); + expect(valid.getText()).toContain('true'); + }); + + it('should be invalid if empty', function() { + var userType = element(by.binding('userType')); + var valid = element(by.binding('myForm.input.$valid')); + var userInput = element(by.model('userType')); + + userInput.clear(); + userInput.sendKeys(''); + + expect(userType.getText()).toEqual('userType ='); + expect(valid.getText()).toContain('false'); + }); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example13/index-debug.html b/1.3.0-rc.2/docs/examples/example-example13/index-debug.html new file mode 100644 index 0000000000..2de3009390 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example13/index-debug.html @@ -0,0 +1,40 @@ + + + + + Example - example-example13-debug + + + + + + + + + + + + Update input to see transitions when valid/invalid. + Integer is a valid value. +
+ +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example13/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example13/index-jquery.html new file mode 100644 index 0000000000..36c5859754 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example13/index-jquery.html @@ -0,0 +1,41 @@ + + + + + Example - example-example13-jquery + + + + + + + + + + + + + Update input to see transitions when valid/invalid. + Integer is a valid value. +
+ +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example13/index-production.html b/1.3.0-rc.2/docs/examples/example-example13/index-production.html new file mode 100644 index 0000000000..fb0fd184e0 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example13/index-production.html @@ -0,0 +1,40 @@ + + + + + Example - example-example13-production + + + + + + + + + + + + Update input to see transitions when valid/invalid. + Integer is a valid value. +
+ +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example13/index.html b/1.3.0-rc.2/docs/examples/example-example13/index.html new file mode 100644 index 0000000000..712ab1a8b0 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example13/index.html @@ -0,0 +1,40 @@ + + + + + Example - example-example13 + + + + + + + + + + + + Update input to see transitions when valid/invalid. + Integer is a valid value. +
+ +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example13/manifest.json b/1.3.0-rc.2/docs/examples/example-example13/manifest.json new file mode 100644 index 0000000000..27efa67bde --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example13/manifest.json @@ -0,0 +1,6 @@ +{ + "name": "example-example13", + "files": [ + "index-production.html" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example14/index-debug.html b/1.3.0-rc.2/docs/examples/example-example14/index-debug.html new file mode 100644 index 0000000000..42e4c6484b --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example14/index-debug.html @@ -0,0 +1,25 @@ + + + + + Example - example-example14-debug + + + + + + + + + +
+ Enter name:
+ Hello ! +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example14/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example14/index-jquery.html new file mode 100644 index 0000000000..5b92de0e73 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example14/index-jquery.html @@ -0,0 +1,26 @@ + + + + + Example - example-example14-jquery + + + + + + + + + + +
+ Enter name:
+ Hello ! +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example14/index-production.html b/1.3.0-rc.2/docs/examples/example-example14/index-production.html new file mode 100644 index 0000000000..4e202f56c6 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example14/index-production.html @@ -0,0 +1,25 @@ + + + + + Example - example-example14-production + + + + + + + + + +
+ Enter name:
+ Hello ! +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example14/index.html b/1.3.0-rc.2/docs/examples/example-example14/index.html new file mode 100644 index 0000000000..ac015fc70d --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example14/index.html @@ -0,0 +1,25 @@ + + + + + Example - example-example14 + + + + + + + + + +
+ Enter name:
+ Hello ! +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example14/manifest.json b/1.3.0-rc.2/docs/examples/example-example14/manifest.json new file mode 100644 index 0000000000..6276328e40 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example14/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example14", + "files": [ + "index-production.html", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example14/protractor.js b/1.3.0-rc.2/docs/examples/example-example14/protractor.js new file mode 100644 index 0000000000..5cc9209d2a --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example14/protractor.js @@ -0,0 +1,8 @@ + it('should check ng-bind', function() { + var nameInput = element(by.model('name')); + + expect(element(by.binding('name')).getText()).toBe('Whirled'); + nameInput.clear(); + nameInput.sendKeys('world'); + expect(element(by.binding('name')).getText()).toBe('world'); + }); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example15/index-debug.html b/1.3.0-rc.2/docs/examples/example-example15/index-debug.html new file mode 100644 index 0000000000..305be7ef9d --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example15/index-debug.html @@ -0,0 +1,27 @@ + + + + + Example - example-example15-debug + + + + + + + + + +
+ Salutation:
+ Name:
+

+  
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example15/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example15/index-jquery.html new file mode 100644 index 0000000000..53170d262d --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example15/index-jquery.html @@ -0,0 +1,28 @@ + + + + + Example - example-example15-jquery + + + + + + + + + + +
+ Salutation:
+ Name:
+

+  
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example15/index-production.html b/1.3.0-rc.2/docs/examples/example-example15/index-production.html new file mode 100644 index 0000000000..d1b1450e09 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example15/index-production.html @@ -0,0 +1,27 @@ + + + + + Example - example-example15-production + + + + + + + + + +
+ Salutation:
+ Name:
+

+  
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example15/index.html b/1.3.0-rc.2/docs/examples/example-example15/index.html new file mode 100644 index 0000000000..5a6925a58b --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example15/index.html @@ -0,0 +1,27 @@ + + + + + Example - example-example15 + + + + + + + + + +
+ Salutation:
+ Name:
+

+  
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example15/manifest.json b/1.3.0-rc.2/docs/examples/example-example15/manifest.json new file mode 100644 index 0000000000..2451a1008a --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example15/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example15", + "files": [ + "index-production.html", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example15/protractor.js b/1.3.0-rc.2/docs/examples/example-example15/protractor.js new file mode 100644 index 0000000000..a7436ba95f --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example15/protractor.js @@ -0,0 +1,14 @@ + it('should check ng-bind', function() { + var salutationElem = element(by.binding('salutation')); + var salutationInput = element(by.model('salutation')); + var nameInput = element(by.model('name')); + + expect(salutationElem.getText()).toBe('Hello World!'); + + salutationInput.clear(); + salutationInput.sendKeys('Greetings'); + nameInput.clear(); + nameInput.sendKeys('user'); + + expect(salutationElem.getText()).toBe('Greetings user!'); + }); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example16/index-debug.html b/1.3.0-rc.2/docs/examples/example-example16/index-debug.html new file mode 100644 index 0000000000..e5d605b8ae --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example16/index-debug.html @@ -0,0 +1,20 @@ + + + + + Example - example-example16-debug + + + + + + + + + + +
+

+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example16/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example16/index-jquery.html new file mode 100644 index 0000000000..e5e3697a12 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example16/index-jquery.html @@ -0,0 +1,21 @@ + + + + + Example - example-example16-jquery + + + + + + + + + + + +
+

+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example16/index-production.html b/1.3.0-rc.2/docs/examples/example-example16/index-production.html new file mode 100644 index 0000000000..f7fcbff5ca --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example16/index-production.html @@ -0,0 +1,20 @@ + + + + + Example - example-example16-production + + + + + + + + + + +
+

+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example16/index.html b/1.3.0-rc.2/docs/examples/example-example16/index.html new file mode 100644 index 0000000000..380dd67044 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example16/index.html @@ -0,0 +1,20 @@ + + + + + Example - example-example16 + + + + + + + + + + +
+

+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example16/manifest.json b/1.3.0-rc.2/docs/examples/example-example16/manifest.json new file mode 100644 index 0000000000..1dc1cd207d --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example16/manifest.json @@ -0,0 +1,8 @@ +{ + "name": "example-example16", + "files": [ + "index-production.html", + "script.js", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example16/protractor.js b/1.3.0-rc.2/docs/examples/example-example16/protractor.js new file mode 100644 index 0000000000..46c0353305 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example16/protractor.js @@ -0,0 +1,4 @@ + it('should check ng-bind-html', function() { + expect(element(by.binding('myHTML')).getText()).toBe( + 'I am an HTMLstring with links! and other stuff'); + }); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example16/script.js b/1.3.0-rc.2/docs/examples/example-example16/script.js new file mode 100644 index 0000000000..4053dfcc38 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example16/script.js @@ -0,0 +1,6 @@ + angular.module('bindHtmlExample', ['ngSanitize']) + .controller('ExampleController', ['$scope', function($scope) { + $scope.myHTML = + 'I am an HTMLstring with ' + + 'links! and other stuff'; + }]); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example17/index-debug.html b/1.3.0-rc.2/docs/examples/example-example17/index-debug.html new file mode 100644 index 0000000000..5ebf9dc1e8 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example17/index-debug.html @@ -0,0 +1,28 @@ + + + + + Example - example-example17-debug + + + + + + + + + +

Map Syntax Example

+ deleted (apply "strike" class)
+ important (apply "bold" class)
+ error (apply "red" class) +
+

Using String Syntax

+ +
+

Using Array Syntax

+
+
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example17/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example17/index-jquery.html new file mode 100644 index 0000000000..09b26e805a --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example17/index-jquery.html @@ -0,0 +1,29 @@ + + + + + Example - example-example17-jquery + + + + + + + + + + +

Map Syntax Example

+ deleted (apply "strike" class)
+ important (apply "bold" class)
+ error (apply "red" class) +
+

Using String Syntax

+ +
+

Using Array Syntax

+
+
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example17/index-production.html b/1.3.0-rc.2/docs/examples/example-example17/index-production.html new file mode 100644 index 0000000000..58159e01cb --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example17/index-production.html @@ -0,0 +1,28 @@ + + + + + Example - example-example17-production + + + + + + + + + +

Map Syntax Example

+ deleted (apply "strike" class)
+ important (apply "bold" class)
+ error (apply "red" class) +
+

Using String Syntax

+ +
+

Using Array Syntax

+
+
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example17/index.html b/1.3.0-rc.2/docs/examples/example-example17/index.html new file mode 100644 index 0000000000..b66190f623 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example17/index.html @@ -0,0 +1,28 @@ + + + + + Example - example-example17 + + + + + + + + + +

Map Syntax Example

+ deleted (apply "strike" class)
+ important (apply "bold" class)
+ error (apply "red" class) +
+

Using String Syntax

+ +
+

Using Array Syntax

+
+
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example17/manifest.json b/1.3.0-rc.2/docs/examples/example-example17/manifest.json new file mode 100644 index 0000000000..fa087d38da --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example17/manifest.json @@ -0,0 +1,8 @@ +{ + "name": "example-example17", + "files": [ + "index-production.html", + "style.css", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example17/protractor.js b/1.3.0-rc.2/docs/examples/example-example17/protractor.js new file mode 100644 index 0000000000..1f8ea4c64e --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example17/protractor.js @@ -0,0 +1,28 @@ + var ps = element.all(by.css('p')); + + it('should let you toggle the class', function() { + + expect(ps.first().getAttribute('class')).not.toMatch(/bold/); + expect(ps.first().getAttribute('class')).not.toMatch(/red/); + + element(by.model('important')).click(); + expect(ps.first().getAttribute('class')).toMatch(/bold/); + + element(by.model('error')).click(); + expect(ps.first().getAttribute('class')).toMatch(/red/); + }); + + it('should let you toggle string example', function() { + expect(ps.get(1).getAttribute('class')).toBe(''); + element(by.model('style')).clear(); + element(by.model('style')).sendKeys('red'); + expect(ps.get(1).getAttribute('class')).toBe('red'); + }); + + it('array example should have 3 classes', function() { + expect(ps.last().getAttribute('class')).toBe(''); + element(by.model('style1')).sendKeys('bold'); + element(by.model('style2')).sendKeys('strike'); + element(by.model('style3')).sendKeys('red'); + expect(ps.last().getAttribute('class')).toBe('bold strike red'); + }); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example17/style.css b/1.3.0-rc.2/docs/examples/example-example17/style.css new file mode 100644 index 0000000000..f3d75e0a41 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example17/style.css @@ -0,0 +1,9 @@ + .strike { + text-decoration: line-through; + } + .bold { + font-weight: bold; + } + .red { + color: red; + } \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example18/index-debug.html b/1.3.0-rc.2/docs/examples/example-example18/index-debug.html new file mode 100644 index 0000000000..1e72055560 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example18/index-debug.html @@ -0,0 +1,21 @@ + + + + + Example - example-example18-debug + + + + + + + + + + + + +
+ Sample Text + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example18/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example18/index-jquery.html new file mode 100644 index 0000000000..f0f8b445ba --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example18/index-jquery.html @@ -0,0 +1,22 @@ + + + + + Example - example-example18-jquery + + + + + + + + + + + + + +
+ Sample Text + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example18/index-production.html b/1.3.0-rc.2/docs/examples/example-example18/index-production.html new file mode 100644 index 0000000000..b6f5f6de1a --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example18/index-production.html @@ -0,0 +1,21 @@ + + + + + Example - example-example18-production + + + + + + + + + + + + +
+ Sample Text + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example18/index.html b/1.3.0-rc.2/docs/examples/example-example18/index.html new file mode 100644 index 0000000000..dcbe93df03 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example18/index.html @@ -0,0 +1,21 @@ + + + + + Example - example-example18 + + + + + + + + + + + + +
+ Sample Text + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example18/manifest.json b/1.3.0-rc.2/docs/examples/example-example18/manifest.json new file mode 100644 index 0000000000..bb1d6d7d9c --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example18/manifest.json @@ -0,0 +1,8 @@ +{ + "name": "example-example18", + "files": [ + "index-production.html", + "style.css", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example18/protractor.js b/1.3.0-rc.2/docs/examples/example-example18/protractor.js new file mode 100644 index 0000000000..f3a5a82ed9 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example18/protractor.js @@ -0,0 +1,14 @@ + it('should check ng-class', function() { + expect(element(by.css('.base-class')).getAttribute('class')).not. + toMatch(/my-class/); + + element(by.id('setbtn')).click(); + + expect(element(by.css('.base-class')).getAttribute('class')). + toMatch(/my-class/); + + element(by.id('clearbtn')).click(); + + expect(element(by.css('.base-class')).getAttribute('class')).not. + toMatch(/my-class/); + }); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example18/style.css b/1.3.0-rc.2/docs/examples/example-example18/style.css new file mode 100644 index 0000000000..2f3fa91244 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example18/style.css @@ -0,0 +1,9 @@ + .base-class { + -webkit-transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s; + transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s; + } + + .base-class.my-class { + color: red; + font-size:3em; + } \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example19/index-debug.html b/1.3.0-rc.2/docs/examples/example-example19/index-debug.html new file mode 100644 index 0000000000..979b88d9bf --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example19/index-debug.html @@ -0,0 +1,23 @@ + + + + + Example - example-example19-debug + + + + + + + + + +
    +
  1. + + {{name}} + +
  2. +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example19/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example19/index-jquery.html new file mode 100644 index 0000000000..c713e664c5 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example19/index-jquery.html @@ -0,0 +1,24 @@ + + + + + Example - example-example19-jquery + + + + + + + + + + +
    +
  1. + + {{name}} + +
  2. +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example19/index-production.html b/1.3.0-rc.2/docs/examples/example-example19/index-production.html new file mode 100644 index 0000000000..dfa83ec5c0 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example19/index-production.html @@ -0,0 +1,23 @@ + + + + + Example - example-example19-production + + + + + + + + + +
    +
  1. + + {{name}} + +
  2. +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example19/index.html b/1.3.0-rc.2/docs/examples/example-example19/index.html new file mode 100644 index 0000000000..1036bd7f78 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example19/index.html @@ -0,0 +1,23 @@ + + + + + Example - example-example19 + + + + + + + + + +
    +
  1. + + {{name}} + +
  2. +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example19/manifest.json b/1.3.0-rc.2/docs/examples/example-example19/manifest.json new file mode 100644 index 0000000000..354b1f054d --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example19/manifest.json @@ -0,0 +1,8 @@ +{ + "name": "example-example19", + "files": [ + "index-production.html", + "style.css", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example19/protractor.js b/1.3.0-rc.2/docs/examples/example-example19/protractor.js new file mode 100644 index 0000000000..c44928632b --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example19/protractor.js @@ -0,0 +1,6 @@ + it('should check ng-class-odd and ng-class-even', function() { + expect(element(by.repeater('name in names').row(0).column('name')).getAttribute('class')). + toMatch(/odd/); + expect(element(by.repeater('name in names').row(1).column('name')).getAttribute('class')). + toMatch(/even/); + }); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example19/style.css b/1.3.0-rc.2/docs/examples/example-example19/style.css new file mode 100644 index 0000000000..68949bf55d --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example19/style.css @@ -0,0 +1,6 @@ + .odd { + color: red; + } + .even { + color: blue; + } \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example2/index-debug.html b/1.3.0-rc.2/docs/examples/example-example2/index-debug.html new file mode 100644 index 0000000000..40f64661aa --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example2/index-debug.html @@ -0,0 +1,47 @@ + + + + + Example - example-example2-debug + + + + + + + + + + +
+
+ I can add: {{a}} + {{b}} = {{ a+b }} + +

This renders because the controller does not fail to + instantiate, by using explicit annotation style (see + script.js for details) +

+
+ +
+ Name:
+ Hello, {{name}}! + +

This renders because the controller does not fail to + instantiate, by using explicit annotation style + (see script.js for details) +

+
+ +
+ I can add: {{a}} + {{b}} = {{ a+b }} + +

The controller could not be instantiated, due to relying + on automatic function annotations (which are disabled in + strict mode). As such, the content of this section is not + interpolated, and there should be an error in your web console. +

+
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example2/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example2/index-jquery.html new file mode 100644 index 0000000000..2b69a55dbd --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example2/index-jquery.html @@ -0,0 +1,48 @@ + + + + + Example - example-example2-jquery + + + + + + + + + + + +
+
+ I can add: {{a}} + {{b}} = {{ a+b }} + +

This renders because the controller does not fail to + instantiate, by using explicit annotation style (see + script.js for details) +

+
+ +
+ Name:
+ Hello, {{name}}! + +

This renders because the controller does not fail to + instantiate, by using explicit annotation style + (see script.js for details) +

+
+ +
+ I can add: {{a}} + {{b}} = {{ a+b }} + +

The controller could not be instantiated, due to relying + on automatic function annotations (which are disabled in + strict mode). As such, the content of this section is not + interpolated, and there should be an error in your web console. +

+
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example2/index-production.html b/1.3.0-rc.2/docs/examples/example-example2/index-production.html new file mode 100644 index 0000000000..c5c6224190 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example2/index-production.html @@ -0,0 +1,47 @@ + + + + + Example - example-example2-production + + + + + + + + + + +
+
+ I can add: {{a}} + {{b}} = {{ a+b }} + +

This renders because the controller does not fail to + instantiate, by using explicit annotation style (see + script.js for details) +

+
+ +
+ Name:
+ Hello, {{name}}! + +

This renders because the controller does not fail to + instantiate, by using explicit annotation style + (see script.js for details) +

+
+ +
+ I can add: {{a}} + {{b}} = {{ a+b }} + +

The controller could not be instantiated, due to relying + on automatic function annotations (which are disabled in + strict mode). As such, the content of this section is not + interpolated, and there should be an error in your web console. +

+
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example2/index.html b/1.3.0-rc.2/docs/examples/example-example2/index.html new file mode 100644 index 0000000000..039f835816 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example2/index.html @@ -0,0 +1,47 @@ + + + + + Example - example-example2 + + + + + + + + + + +
+
+ I can add: {{a}} + {{b}} = {{ a+b }} + +

This renders because the controller does not fail to + instantiate, by using explicit annotation style (see + script.js for details) +

+
+ +
+ Name:
+ Hello, {{name}}! + +

This renders because the controller does not fail to + instantiate, by using explicit annotation style + (see script.js for details) +

+
+ +
+ I can add: {{a}} + {{b}} = {{ a+b }} + +

The controller could not be instantiated, due to relying + on automatic function annotations (which are disabled in + strict mode). As such, the content of this section is not + interpolated, and there should be an error in your web console. +

+
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example2/manifest.json b/1.3.0-rc.2/docs/examples/example-example2/manifest.json new file mode 100644 index 0000000000..15c820feef --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example2/manifest.json @@ -0,0 +1,8 @@ +{ + "name": "example-example2", + "files": [ + "index-production.html", + "script.js", + "style.css" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example2/script.js b/1.3.0-rc.2/docs/examples/example-example2/script.js new file mode 100644 index 0000000000..c5d9361c3f --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example2/script.js @@ -0,0 +1,18 @@ +angular.module('ngAppStrictDemo', []) + // BadController will fail to instantiate, due to relying on automatic function annotation, + // rather than an explicit annotation + .controller('BadController', function($scope) { + $scope.a = 1; + $scope.b = 2; + }) + // Unlike BadController, GoodController1 and GoodController2 will not fail to be instantiated, + // due to using explicit annotations using the array style and $inject property, respectively. + .controller('GoodController1', ['$scope', function($scope) { + $scope.a = 1; + $scope.b = 2; + }]) + .controller('GoodController2', GoodController2); + function GoodController2($scope) { + $scope.name = "World"; + } + GoodController2.$inject = ['$scope']; \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example2/style.css b/1.3.0-rc.2/docs/examples/example-example2/style.css new file mode 100644 index 0000000000..e8379bfdf7 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example2/style.css @@ -0,0 +1,18 @@ +div[ng-controller] { + margin-bottom: 1em; + -webkit-border-radius: 4px; + border-radius: 4px; + border: 1px solid; + padding: .5em; +} +div[ng-controller^=Good] { + border-color: #d6e9c6; + background-color: #dff0d8; + color: #3c763d; +} +div[ng-controller^=Bad] { + border-color: #ebccd1; + background-color: #f2dede; + color: #a94442; + margin-bottom: 0; +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example20/index-debug.html b/1.3.0-rc.2/docs/examples/example-example20/index-debug.html new file mode 100644 index 0000000000..4855f6fa3c --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example20/index-debug.html @@ -0,0 +1,23 @@ + + + + + Example - example-example20-debug + + + + + + + + + +
    +
  1. + + {{name}}       + +
  2. +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example20/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example20/index-jquery.html new file mode 100644 index 0000000000..db8a3867e0 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example20/index-jquery.html @@ -0,0 +1,24 @@ + + + + + Example - example-example20-jquery + + + + + + + + + + +
    +
  1. + + {{name}}       + +
  2. +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example20/index-production.html b/1.3.0-rc.2/docs/examples/example-example20/index-production.html new file mode 100644 index 0000000000..fc4cf65792 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example20/index-production.html @@ -0,0 +1,23 @@ + + + + + Example - example-example20-production + + + + + + + + + +
    +
  1. + + {{name}}       + +
  2. +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example20/index.html b/1.3.0-rc.2/docs/examples/example-example20/index.html new file mode 100644 index 0000000000..bd392e7dd8 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example20/index.html @@ -0,0 +1,23 @@ + + + + + Example - example-example20 + + + + + + + + + +
    +
  1. + + {{name}}       + +
  2. +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example20/manifest.json b/1.3.0-rc.2/docs/examples/example-example20/manifest.json new file mode 100644 index 0000000000..254eb178a3 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example20/manifest.json @@ -0,0 +1,8 @@ +{ + "name": "example-example20", + "files": [ + "index-production.html", + "style.css", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example20/protractor.js b/1.3.0-rc.2/docs/examples/example-example20/protractor.js new file mode 100644 index 0000000000..c44928632b --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example20/protractor.js @@ -0,0 +1,6 @@ + it('should check ng-class-odd and ng-class-even', function() { + expect(element(by.repeater('name in names').row(0).column('name')).getAttribute('class')). + toMatch(/odd/); + expect(element(by.repeater('name in names').row(1).column('name')).getAttribute('class')). + toMatch(/even/); + }); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example20/style.css b/1.3.0-rc.2/docs/examples/example-example20/style.css new file mode 100644 index 0000000000..68949bf55d --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example20/style.css @@ -0,0 +1,6 @@ + .odd { + color: red; + } + .even { + color: blue; + } \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example21/index-debug.html b/1.3.0-rc.2/docs/examples/example-example21/index-debug.html new file mode 100644 index 0000000000..3ee41f3e0d --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example21/index-debug.html @@ -0,0 +1,17 @@ + + + + + Example - example-example21-debug + + + + + + + + +
{{ 'hello' }}
+
{{ 'hello IE7' }}
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example21/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example21/index-jquery.html new file mode 100644 index 0000000000..6cdb1d2d6c --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example21/index-jquery.html @@ -0,0 +1,18 @@ + + + + + Example - example-example21-jquery + + + + + + + + + +
{{ 'hello' }}
+
{{ 'hello IE7' }}
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example21/index-production.html b/1.3.0-rc.2/docs/examples/example-example21/index-production.html new file mode 100644 index 0000000000..44604ec1c6 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example21/index-production.html @@ -0,0 +1,17 @@ + + + + + Example - example-example21-production + + + + + + + + +
{{ 'hello' }}
+
{{ 'hello IE7' }}
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example21/index.html b/1.3.0-rc.2/docs/examples/example-example21/index.html new file mode 100644 index 0000000000..15c1abd744 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example21/index.html @@ -0,0 +1,17 @@ + + + + + Example - example-example21 + + + + + + + + +
{{ 'hello' }}
+
{{ 'hello IE7' }}
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example21/manifest.json b/1.3.0-rc.2/docs/examples/example-example21/manifest.json new file mode 100644 index 0000000000..c82db91d49 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example21/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example21", + "files": [ + "index-production.html", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example21/protractor.js b/1.3.0-rc.2/docs/examples/example-example21/protractor.js new file mode 100644 index 0000000000..1fd0ff5c17 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example21/protractor.js @@ -0,0 +1,6 @@ + it('should remove the template directive and css class', function() { + expect($('#template1').getAttribute('ng-cloak')). + toBeNull(); + expect($('#template2').getAttribute('ng-cloak')). + toBeNull(); + }); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example22/index-debug.html b/1.3.0-rc.2/docs/examples/example-example22/index-debug.html new file mode 100644 index 0000000000..c8a4e3c4ad --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example22/index-debug.html @@ -0,0 +1,21 @@ + + + + + Example - example-example22-debug + + + + + + + + + + + count: {{count}} + + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example22/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example22/index-jquery.html new file mode 100644 index 0000000000..65cbd1dd01 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example22/index-jquery.html @@ -0,0 +1,22 @@ + + + + + Example - example-example22-jquery + + + + + + + + + + + + count: {{count}} + + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example22/index-production.html b/1.3.0-rc.2/docs/examples/example-example22/index-production.html new file mode 100644 index 0000000000..e8d57a2c5d --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example22/index-production.html @@ -0,0 +1,21 @@ + + + + + Example - example-example22-production + + + + + + + + + + + count: {{count}} + + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example22/index.html b/1.3.0-rc.2/docs/examples/example-example22/index.html new file mode 100644 index 0000000000..8a203fc702 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example22/index.html @@ -0,0 +1,21 @@ + + + + + Example - example-example22 + + + + + + + + + + + count: {{count}} + + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example22/manifest.json b/1.3.0-rc.2/docs/examples/example-example22/manifest.json new file mode 100644 index 0000000000..9b0d8c33ad --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example22/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example22", + "files": [ + "index-production.html", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example22/protractor.js b/1.3.0-rc.2/docs/examples/example-example22/protractor.js new file mode 100644 index 0000000000..88afa2fdb0 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example22/protractor.js @@ -0,0 +1,5 @@ + it('should check ng-click', function() { + expect(element(by.binding('count')).getText()).toMatch('0'); + element(by.css('button')).click(); + expect(element(by.binding('count')).getText()).toMatch('1'); + }); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example23/index-debug.html b/1.3.0-rc.2/docs/examples/example-example23/index-debug.html new file mode 100644 index 0000000000..f964bda169 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example23/index-debug.html @@ -0,0 +1,19 @@ + + + + + Example - example-example23-debug + + + + + + + + + + count: {{count}} + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example23/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example23/index-jquery.html new file mode 100644 index 0000000000..c1e86e7e2c --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example23/index-jquery.html @@ -0,0 +1,20 @@ + + + + + Example - example-example23-jquery + + + + + + + + + + + count: {{count}} + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example23/index-production.html b/1.3.0-rc.2/docs/examples/example-example23/index-production.html new file mode 100644 index 0000000000..0185f03116 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example23/index-production.html @@ -0,0 +1,19 @@ + + + + + Example - example-example23-production + + + + + + + + + + count: {{count}} + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example23/index.html b/1.3.0-rc.2/docs/examples/example-example23/index.html new file mode 100644 index 0000000000..95964ad60c --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example23/index.html @@ -0,0 +1,19 @@ + + + + + Example - example-example23 + + + + + + + + + + count: {{count}} + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example23/manifest.json b/1.3.0-rc.2/docs/examples/example-example23/manifest.json new file mode 100644 index 0000000000..70c520a007 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example23/manifest.json @@ -0,0 +1,6 @@ +{ + "name": "example-example23", + "files": [ + "index-production.html" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example24/index-debug.html b/1.3.0-rc.2/docs/examples/example-example24/index-debug.html new file mode 100644 index 0000000000..b8ea8f801c --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example24/index-debug.html @@ -0,0 +1,19 @@ + + + + + Example - example-example24-debug + + + + + + + + + + count: {{count}} + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example24/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example24/index-jquery.html new file mode 100644 index 0000000000..23065f49ab --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example24/index-jquery.html @@ -0,0 +1,20 @@ + + + + + Example - example-example24-jquery + + + + + + + + + + + count: {{count}} + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example24/index-production.html b/1.3.0-rc.2/docs/examples/example-example24/index-production.html new file mode 100644 index 0000000000..6268f8e763 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example24/index-production.html @@ -0,0 +1,19 @@ + + + + + Example - example-example24-production + + + + + + + + + + count: {{count}} + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example24/index.html b/1.3.0-rc.2/docs/examples/example-example24/index.html new file mode 100644 index 0000000000..f4e42c764f --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example24/index.html @@ -0,0 +1,19 @@ + + + + + Example - example-example24 + + + + + + + + + + count: {{count}} + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example24/manifest.json b/1.3.0-rc.2/docs/examples/example-example24/manifest.json new file mode 100644 index 0000000000..31304f2a8b --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example24/manifest.json @@ -0,0 +1,6 @@ +{ + "name": "example-example24", + "files": [ + "index-production.html" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example25/index-debug.html b/1.3.0-rc.2/docs/examples/example-example25/index-debug.html new file mode 100644 index 0000000000..e439156f41 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example25/index-debug.html @@ -0,0 +1,19 @@ + + + + + Example - example-example25-debug + + + + + + + + + + count: {{count}} + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example25/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example25/index-jquery.html new file mode 100644 index 0000000000..2f07bbf528 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example25/index-jquery.html @@ -0,0 +1,20 @@ + + + + + Example - example-example25-jquery + + + + + + + + + + + count: {{count}} + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example25/index-production.html b/1.3.0-rc.2/docs/examples/example-example25/index-production.html new file mode 100644 index 0000000000..989c8af8ab --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example25/index-production.html @@ -0,0 +1,19 @@ + + + + + Example - example-example25-production + + + + + + + + + + count: {{count}} + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example25/index.html b/1.3.0-rc.2/docs/examples/example-example25/index.html new file mode 100644 index 0000000000..95768439fd --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example25/index.html @@ -0,0 +1,19 @@ + + + + + Example - example-example25 + + + + + + + + + + count: {{count}} + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example25/manifest.json b/1.3.0-rc.2/docs/examples/example-example25/manifest.json new file mode 100644 index 0000000000..827bc7b0f4 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example25/manifest.json @@ -0,0 +1,6 @@ +{ + "name": "example-example25", + "files": [ + "index-production.html" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example26/index-debug.html b/1.3.0-rc.2/docs/examples/example-example26/index-debug.html new file mode 100644 index 0000000000..5af0c03f03 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example26/index-debug.html @@ -0,0 +1,19 @@ + + + + + Example - example-example26-debug + + + + + + + + + + count: {{count}} + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example26/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example26/index-jquery.html new file mode 100644 index 0000000000..f8a12512be --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example26/index-jquery.html @@ -0,0 +1,20 @@ + + + + + Example - example-example26-jquery + + + + + + + + + + + count: {{count}} + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example26/index-production.html b/1.3.0-rc.2/docs/examples/example-example26/index-production.html new file mode 100644 index 0000000000..a667a6d71b --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example26/index-production.html @@ -0,0 +1,19 @@ + + + + + Example - example-example26-production + + + + + + + + + + count: {{count}} + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example26/index.html b/1.3.0-rc.2/docs/examples/example-example26/index.html new file mode 100644 index 0000000000..a31324821e --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example26/index.html @@ -0,0 +1,19 @@ + + + + + Example - example-example26 + + + + + + + + + + count: {{count}} + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example26/manifest.json b/1.3.0-rc.2/docs/examples/example-example26/manifest.json new file mode 100644 index 0000000000..2b3b4c0530 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example26/manifest.json @@ -0,0 +1,6 @@ +{ + "name": "example-example26", + "files": [ + "index-production.html" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example27/index-debug.html b/1.3.0-rc.2/docs/examples/example-example27/index-debug.html new file mode 100644 index 0000000000..1bae0120a7 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example27/index-debug.html @@ -0,0 +1,19 @@ + + + + + Example - example-example27-debug + + + + + + + + + + count: {{count}} + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example27/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example27/index-jquery.html new file mode 100644 index 0000000000..8f0f61b8a7 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example27/index-jquery.html @@ -0,0 +1,20 @@ + + + + + Example - example-example27-jquery + + + + + + + + + + + count: {{count}} + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example27/index-production.html b/1.3.0-rc.2/docs/examples/example-example27/index-production.html new file mode 100644 index 0000000000..716f48a0bd --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example27/index-production.html @@ -0,0 +1,19 @@ + + + + + Example - example-example27-production + + + + + + + + + + count: {{count}} + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example27/index.html b/1.3.0-rc.2/docs/examples/example-example27/index.html new file mode 100644 index 0000000000..444d376443 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example27/index.html @@ -0,0 +1,19 @@ + + + + + Example - example-example27 + + + + + + + + + + count: {{count}} + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example27/manifest.json b/1.3.0-rc.2/docs/examples/example-example27/manifest.json new file mode 100644 index 0000000000..1c3026f9b2 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example27/manifest.json @@ -0,0 +1,6 @@ +{ + "name": "example-example27", + "files": [ + "index-production.html" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example28/index-debug.html b/1.3.0-rc.2/docs/examples/example-example28/index-debug.html new file mode 100644 index 0000000000..76357aa42a --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example28/index-debug.html @@ -0,0 +1,19 @@ + + + + + Example - example-example28-debug + + + + + + + + + + count: {{count}} + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example28/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example28/index-jquery.html new file mode 100644 index 0000000000..961fd46ab1 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example28/index-jquery.html @@ -0,0 +1,20 @@ + + + + + Example - example-example28-jquery + + + + + + + + + + + count: {{count}} + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example28/index-production.html b/1.3.0-rc.2/docs/examples/example-example28/index-production.html new file mode 100644 index 0000000000..1936cf6d76 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example28/index-production.html @@ -0,0 +1,19 @@ + + + + + Example - example-example28-production + + + + + + + + + + count: {{count}} + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example28/index.html b/1.3.0-rc.2/docs/examples/example-example28/index.html new file mode 100644 index 0000000000..f4141034d9 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example28/index.html @@ -0,0 +1,19 @@ + + + + + Example - example-example28 + + + + + + + + + + count: {{count}} + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example28/manifest.json b/1.3.0-rc.2/docs/examples/example-example28/manifest.json new file mode 100644 index 0000000000..9a80d91245 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example28/manifest.json @@ -0,0 +1,6 @@ +{ + "name": "example-example28", + "files": [ + "index-production.html" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example29/index-debug.html b/1.3.0-rc.2/docs/examples/example-example29/index-debug.html new file mode 100644 index 0000000000..b435713b71 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example29/index-debug.html @@ -0,0 +1,19 @@ + + + + + Example - example-example29-debug + + + + + + + + + + count: {{count}} + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example29/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example29/index-jquery.html new file mode 100644 index 0000000000..e50452b13c --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example29/index-jquery.html @@ -0,0 +1,20 @@ + + + + + Example - example-example29-jquery + + + + + + + + + + + count: {{count}} + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example29/index-production.html b/1.3.0-rc.2/docs/examples/example-example29/index-production.html new file mode 100644 index 0000000000..c497da3f88 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example29/index-production.html @@ -0,0 +1,19 @@ + + + + + Example - example-example29-production + + + + + + + + + + count: {{count}} + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example29/index.html b/1.3.0-rc.2/docs/examples/example-example29/index.html new file mode 100644 index 0000000000..3d40a9c65a --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example29/index.html @@ -0,0 +1,19 @@ + + + + + Example - example-example29 + + + + + + + + + + count: {{count}} + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example29/manifest.json b/1.3.0-rc.2/docs/examples/example-example29/manifest.json new file mode 100644 index 0000000000..48f662eda5 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example29/manifest.json @@ -0,0 +1,6 @@ +{ + "name": "example-example29", + "files": [ + "index-production.html" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example3/index-debug.html b/1.3.0-rc.2/docs/examples/example-example3/index-debug.html new file mode 100644 index 0000000000..cc63d61b9b --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example3/index-debug.html @@ -0,0 +1,21 @@ + + + + + Example - example-example3-debug + + + + + + + + + + +
+ Go to bottom + You're at the bottom! +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example3/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example3/index-jquery.html new file mode 100644 index 0000000000..8b0eac2c75 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example3/index-jquery.html @@ -0,0 +1,22 @@ + + + + + Example - example-example3-jquery + + + + + + + + + + + +
+ Go to bottom + You're at the bottom! +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example3/index-production.html b/1.3.0-rc.2/docs/examples/example-example3/index-production.html new file mode 100644 index 0000000000..49e817358f --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example3/index-production.html @@ -0,0 +1,21 @@ + + + + + Example - example-example3-production + + + + + + + + + + +
+ Go to bottom + You're at the bottom! +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example3/index.html b/1.3.0-rc.2/docs/examples/example-example3/index.html new file mode 100644 index 0000000000..42bea4ac2d --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example3/index.html @@ -0,0 +1,21 @@ + + + + + Example - example-example3 + + + + + + + + + + +
+ Go to bottom + You're at the bottom! +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example3/manifest.json b/1.3.0-rc.2/docs/examples/example-example3/manifest.json new file mode 100644 index 0000000000..e1661b24e5 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example3/manifest.json @@ -0,0 +1,8 @@ +{ + "name": "example-example3", + "files": [ + "index-production.html", + "script.js", + "style.css" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example3/script.js b/1.3.0-rc.2/docs/examples/example-example3/script.js new file mode 100644 index 0000000000..7c6b1e2af7 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example3/script.js @@ -0,0 +1,12 @@ + angular.module('anchorScrollExample', []) + .controller('ScrollController', ['$scope', '$location', '$anchorScroll', + function ($scope, $location, $anchorScroll) { + $scope.gotoBottom = function() { + // set the location.hash to the id of + // the element you wish to scroll to. + $location.hash('bottom'); + + // call $anchorScroll() + $anchorScroll(); + }; + }]); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example3/style.css b/1.3.0-rc.2/docs/examples/example-example3/style.css new file mode 100644 index 0000000000..a9bffdc2d9 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example3/style.css @@ -0,0 +1,9 @@ + #scrollArea { + height: 350px; + overflow: auto; + } + + #bottom { + display: block; + margin-top: 2000px; + } \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example30/index-debug.html b/1.3.0-rc.2/docs/examples/example-example30/index-debug.html new file mode 100644 index 0000000000..fd23957340 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example30/index-debug.html @@ -0,0 +1,17 @@ + + + + + Example - example-example30-debug + + + + + + + + + + key down count: {{count}} + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example30/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example30/index-jquery.html new file mode 100644 index 0000000000..64e71e8e8b --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example30/index-jquery.html @@ -0,0 +1,18 @@ + + + + + Example - example-example30-jquery + + + + + + + + + + + key down count: {{count}} + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example30/index-production.html b/1.3.0-rc.2/docs/examples/example-example30/index-production.html new file mode 100644 index 0000000000..1885e0dd96 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example30/index-production.html @@ -0,0 +1,17 @@ + + + + + Example - example-example30-production + + + + + + + + + + key down count: {{count}} + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example30/index.html b/1.3.0-rc.2/docs/examples/example-example30/index.html new file mode 100644 index 0000000000..c726c52649 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example30/index.html @@ -0,0 +1,17 @@ + + + + + Example - example-example30 + + + + + + + + + + key down count: {{count}} + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example30/manifest.json b/1.3.0-rc.2/docs/examples/example-example30/manifest.json new file mode 100644 index 0000000000..7e06e65605 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example30/manifest.json @@ -0,0 +1,6 @@ +{ + "name": "example-example30", + "files": [ + "index-production.html" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example31/index-debug.html b/1.3.0-rc.2/docs/examples/example-example31/index-debug.html new file mode 100644 index 0000000000..10a6b8263a --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example31/index-debug.html @@ -0,0 +1,22 @@ + + + + + Example - example-example31-debug + + + + + + + + +

Typing in the input box below updates the key count

+ key up count: {{count}} + +

Typing in the input box below updates the keycode

+ +

event keyCode: {{ event.keyCode }}

+

event altKey: {{ event.altKey }}

+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example31/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example31/index-jquery.html new file mode 100644 index 0000000000..df24c74a0d --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example31/index-jquery.html @@ -0,0 +1,23 @@ + + + + + Example - example-example31-jquery + + + + + + + + + +

Typing in the input box below updates the key count

+ key up count: {{count}} + +

Typing in the input box below updates the keycode

+ +

event keyCode: {{ event.keyCode }}

+

event altKey: {{ event.altKey }}

+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example31/index-production.html b/1.3.0-rc.2/docs/examples/example-example31/index-production.html new file mode 100644 index 0000000000..c95cbb8509 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example31/index-production.html @@ -0,0 +1,22 @@ + + + + + Example - example-example31-production + + + + + + + + +

Typing in the input box below updates the key count

+ key up count: {{count}} + +

Typing in the input box below updates the keycode

+ +

event keyCode: {{ event.keyCode }}

+

event altKey: {{ event.altKey }}

+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example31/index.html b/1.3.0-rc.2/docs/examples/example-example31/index.html new file mode 100644 index 0000000000..1f1b932122 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example31/index.html @@ -0,0 +1,22 @@ + + + + + Example - example-example31 + + + + + + + + +

Typing in the input box below updates the key count

+ key up count: {{count}} + +

Typing in the input box below updates the keycode

+ +

event keyCode: {{ event.keyCode }}

+

event altKey: {{ event.altKey }}

+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example31/manifest.json b/1.3.0-rc.2/docs/examples/example-example31/manifest.json new file mode 100644 index 0000000000..4890933c94 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example31/manifest.json @@ -0,0 +1,6 @@ +{ + "name": "example-example31", + "files": [ + "index-production.html" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example32/index-debug.html b/1.3.0-rc.2/docs/examples/example-example32/index-debug.html new file mode 100644 index 0000000000..49a454600d --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example32/index-debug.html @@ -0,0 +1,17 @@ + + + + + Example - example-example32-debug + + + + + + + + + + key press count: {{count}} + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example32/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example32/index-jquery.html new file mode 100644 index 0000000000..0678ca45b3 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example32/index-jquery.html @@ -0,0 +1,18 @@ + + + + + Example - example-example32-jquery + + + + + + + + + + + key press count: {{count}} + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example32/index-production.html b/1.3.0-rc.2/docs/examples/example-example32/index-production.html new file mode 100644 index 0000000000..5a95dbf69b --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example32/index-production.html @@ -0,0 +1,17 @@ + + + + + Example - example-example32-production + + + + + + + + + + key press count: {{count}} + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example32/index.html b/1.3.0-rc.2/docs/examples/example-example32/index.html new file mode 100644 index 0000000000..bde5fda3c0 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example32/index.html @@ -0,0 +1,17 @@ + + + + + Example - example-example32 + + + + + + + + + + key press count: {{count}} + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example32/manifest.json b/1.3.0-rc.2/docs/examples/example-example32/manifest.json new file mode 100644 index 0000000000..e0e567b386 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example32/manifest.json @@ -0,0 +1,6 @@ +{ + "name": "example-example32", + "files": [ + "index-production.html" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example33/index-debug.html b/1.3.0-rc.2/docs/examples/example-example33/index-debug.html new file mode 100644 index 0000000000..67f55c2b58 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example33/index-debug.html @@ -0,0 +1,34 @@ + + + + + Example - example-example33-debug + + + + + + + + + +
+ Enter text and hit enter: + + +
list={{list}}
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example33/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example33/index-jquery.html new file mode 100644 index 0000000000..558a7e84af --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example33/index-jquery.html @@ -0,0 +1,35 @@ + + + + + Example - example-example33-jquery + + + + + + + + + + +
+ Enter text and hit enter: + + +
list={{list}}
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example33/index-production.html b/1.3.0-rc.2/docs/examples/example-example33/index-production.html new file mode 100644 index 0000000000..3b6719856d --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example33/index-production.html @@ -0,0 +1,34 @@ + + + + + Example - example-example33-production + + + + + + + + + +
+ Enter text and hit enter: + + +
list={{list}}
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example33/index.html b/1.3.0-rc.2/docs/examples/example-example33/index.html new file mode 100644 index 0000000000..cbbd51df39 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example33/index.html @@ -0,0 +1,34 @@ + + + + + Example - example-example33 + + + + + + + + + +
+ Enter text and hit enter: + + +
list={{list}}
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example33/manifest.json b/1.3.0-rc.2/docs/examples/example-example33/manifest.json new file mode 100644 index 0000000000..1808afff42 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example33/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example33", + "files": [ + "index-production.html", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example33/protractor.js b/1.3.0-rc.2/docs/examples/example-example33/protractor.js new file mode 100644 index 0000000000..6b823562e9 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example33/protractor.js @@ -0,0 +1,12 @@ + it('should check ng-submit', function() { + expect(element(by.binding('list')).getText()).toBe('list=[]'); + element(by.css('#submit')).click(); + expect(element(by.binding('list')).getText()).toContain('hello'); + expect(element(by.model('text')).getAttribute('value')).toBe(''); + }); + it('should ignore empty strings', function() { + expect(element(by.binding('list')).getText()).toBe('list=[]'); + element(by.css('#submit')).click(); + element(by.css('#submit')).click(); + expect(element(by.binding('list')).getText()).toContain('hello'); + }); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example34/index-debug.html b/1.3.0-rc.2/docs/examples/example-example34/index-debug.html new file mode 100644 index 0000000000..5c2c51de18 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example34/index-debug.html @@ -0,0 +1,17 @@ + + + + + Example - example-example34-debug + + + + + + + + + + copied: {{copied}} + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example34/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example34/index-jquery.html new file mode 100644 index 0000000000..173cd384ff --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example34/index-jquery.html @@ -0,0 +1,18 @@ + + + + + Example - example-example34-jquery + + + + + + + + + + + copied: {{copied}} + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example34/index-production.html b/1.3.0-rc.2/docs/examples/example-example34/index-production.html new file mode 100644 index 0000000000..f51fc9e06d --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example34/index-production.html @@ -0,0 +1,17 @@ + + + + + Example - example-example34-production + + + + + + + + + + copied: {{copied}} + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example34/index.html b/1.3.0-rc.2/docs/examples/example-example34/index.html new file mode 100644 index 0000000000..e534d2ddf5 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example34/index.html @@ -0,0 +1,17 @@ + + + + + Example - example-example34 + + + + + + + + + + copied: {{copied}} + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example34/manifest.json b/1.3.0-rc.2/docs/examples/example-example34/manifest.json new file mode 100644 index 0000000000..cc7622aeb4 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example34/manifest.json @@ -0,0 +1,6 @@ +{ + "name": "example-example34", + "files": [ + "index-production.html" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example35/index-debug.html b/1.3.0-rc.2/docs/examples/example-example35/index-debug.html new file mode 100644 index 0000000000..aa1be93daa --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example35/index-debug.html @@ -0,0 +1,17 @@ + + + + + Example - example-example35-debug + + + + + + + + + + cut: {{cut}} + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example35/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example35/index-jquery.html new file mode 100644 index 0000000000..5dafa5240d --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example35/index-jquery.html @@ -0,0 +1,18 @@ + + + + + Example - example-example35-jquery + + + + + + + + + + + cut: {{cut}} + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example35/index-production.html b/1.3.0-rc.2/docs/examples/example-example35/index-production.html new file mode 100644 index 0000000000..848ba54bbc --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example35/index-production.html @@ -0,0 +1,17 @@ + + + + + Example - example-example35-production + + + + + + + + + + cut: {{cut}} + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example35/index.html b/1.3.0-rc.2/docs/examples/example-example35/index.html new file mode 100644 index 0000000000..2669150050 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example35/index.html @@ -0,0 +1,17 @@ + + + + + Example - example-example35 + + + + + + + + + + cut: {{cut}} + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example35/manifest.json b/1.3.0-rc.2/docs/examples/example-example35/manifest.json new file mode 100644 index 0000000000..9705a31c98 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example35/manifest.json @@ -0,0 +1,6 @@ +{ + "name": "example-example35", + "files": [ + "index-production.html" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example36/index-debug.html b/1.3.0-rc.2/docs/examples/example-example36/index-debug.html new file mode 100644 index 0000000000..19f92b1de7 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example36/index-debug.html @@ -0,0 +1,17 @@ + + + + + Example - example-example36-debug + + + + + + + + + + pasted: {{paste}} + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example36/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example36/index-jquery.html new file mode 100644 index 0000000000..c657daa5a6 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example36/index-jquery.html @@ -0,0 +1,18 @@ + + + + + Example - example-example36-jquery + + + + + + + + + + + pasted: {{paste}} + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example36/index-production.html b/1.3.0-rc.2/docs/examples/example-example36/index-production.html new file mode 100644 index 0000000000..5413db76fd --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example36/index-production.html @@ -0,0 +1,17 @@ + + + + + Example - example-example36-production + + + + + + + + + + pasted: {{paste}} + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example36/index.html b/1.3.0-rc.2/docs/examples/example-example36/index.html new file mode 100644 index 0000000000..bc8590b806 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example36/index.html @@ -0,0 +1,17 @@ + + + + + Example - example-example36 + + + + + + + + + + pasted: {{paste}} + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example36/manifest.json b/1.3.0-rc.2/docs/examples/example-example36/manifest.json new file mode 100644 index 0000000000..4b10a26f7e --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example36/manifest.json @@ -0,0 +1,6 @@ +{ + "name": "example-example36", + "files": [ + "index-production.html" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example37/animations.css b/1.3.0-rc.2/docs/examples/example-example37/animations.css new file mode 100644 index 0000000000..2782c1247b --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example37/animations.css @@ -0,0 +1,20 @@ + .animate-if { + background:white; + border:1px solid black; + padding:10px; + } + + .animate-if.ng-enter, .animate-if.ng-leave { + -webkit-transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s; + transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s; + } + + .animate-if.ng-enter, + .animate-if.ng-leave.ng-leave-active { + opacity:0; + } + + .animate-if.ng-leave, + .animate-if.ng-enter.ng-enter-active { + opacity:1; + } \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example37/index-debug.html b/1.3.0-rc.2/docs/examples/example-example37/index-debug.html new file mode 100644 index 0000000000..d9b6b37f10 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example37/index-debug.html @@ -0,0 +1,22 @@ + + + + + Example - example-example37-debug + + + + + + + + + + + Click me:
+ Show when checked: + + I'm removed when the checkbox is unchecked. + + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example37/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example37/index-jquery.html new file mode 100644 index 0000000000..fedbd3a12d --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example37/index-jquery.html @@ -0,0 +1,23 @@ + + + + + Example - example-example37-jquery + + + + + + + + + + + + Click me:
+ Show when checked: + + I'm removed when the checkbox is unchecked. + + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example37/index-production.html b/1.3.0-rc.2/docs/examples/example-example37/index-production.html new file mode 100644 index 0000000000..1d965b1440 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example37/index-production.html @@ -0,0 +1,22 @@ + + + + + Example - example-example37-production + + + + + + + + + + + Click me:
+ Show when checked: + + I'm removed when the checkbox is unchecked. + + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example37/index.html b/1.3.0-rc.2/docs/examples/example-example37/index.html new file mode 100644 index 0000000000..c82b8ad6c0 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example37/index.html @@ -0,0 +1,22 @@ + + + + + Example - example-example37 + + + + + + + + + + + Click me:
+ Show when checked: + + I'm removed when the checkbox is unchecked. + + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example37/manifest.json b/1.3.0-rc.2/docs/examples/example-example37/manifest.json new file mode 100644 index 0000000000..5da987bbac --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example37/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example37", + "files": [ + "index-production.html", + "animations.css" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example38/animations.css b/1.3.0-rc.2/docs/examples/example-example38/animations.css new file mode 100644 index 0000000000..87a01ef8ec --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example38/animations.css @@ -0,0 +1,38 @@ + .slide-animate-container { + position:relative; + background:white; + border:1px solid black; + height:40px; + overflow:hidden; + } + + .slide-animate { + padding:10px; + } + + .slide-animate.ng-enter, .slide-animate.ng-leave { + -webkit-transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s; + transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s; + + position:absolute; + top:0; + left:0; + right:0; + bottom:0; + display:block; + padding:10px; + } + + .slide-animate.ng-enter { + top:-50px; + } + .slide-animate.ng-enter.ng-enter-active { + top:0; + } + + .slide-animate.ng-leave { + top:0; + } + .slide-animate.ng-leave.ng-leave-active { + top:50px; + } \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example38/index-debug.html b/1.3.0-rc.2/docs/examples/example-example38/index-debug.html new file mode 100644 index 0000000000..e1b0b70d5e --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example38/index-debug.html @@ -0,0 +1,28 @@ + + + + + Example - example-example38-debug + + + + + + + + + + + +
+ + url of the template: {{template.url}} +
+
+
+
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example38/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example38/index-jquery.html new file mode 100644 index 0000000000..2b4e0cbba5 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example38/index-jquery.html @@ -0,0 +1,29 @@ + + + + + Example - example-example38-jquery + + + + + + + + + + + + +
+ + url of the template: {{template.url}} +
+
+
+
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example38/index-production.html b/1.3.0-rc.2/docs/examples/example-example38/index-production.html new file mode 100644 index 0000000000..a249738461 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example38/index-production.html @@ -0,0 +1,28 @@ + + + + + Example - example-example38-production + + + + + + + + + + + +
+ + url of the template: {{template.url}} +
+
+
+
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example38/index.html b/1.3.0-rc.2/docs/examples/example-example38/index.html new file mode 100644 index 0000000000..b43a411b34 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example38/index.html @@ -0,0 +1,28 @@ + + + + + Example - example-example38 + + + + + + + + + + + +
+ + url of the template: {{template.url}} +
+
+
+
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example38/manifest.json b/1.3.0-rc.2/docs/examples/example-example38/manifest.json new file mode 100644 index 0000000000..4b768af40e --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example38/manifest.json @@ -0,0 +1,11 @@ +{ + "name": "example-example38", + "files": [ + "index-production.html", + "script.js", + "template1.html", + "template2.html", + "animations.css", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example38/protractor.js b/1.3.0-rc.2/docs/examples/example-example38/protractor.js new file mode 100644 index 0000000000..ae67a81037 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example38/protractor.js @@ -0,0 +1,27 @@ + var templateSelect = element(by.model('template')); + var includeElem = element(by.css('[ng-include]')); + + it('should load template1.html', function() { + expect(includeElem.getText()).toMatch(/Content of template1.html/); + }); + + it('should load template2.html', function() { + if (browser.params.browser == 'firefox') { + // Firefox can't handle using selects + // See https://github.com/angular/protractor/issues/480 + return; + } + templateSelect.click(); + templateSelect.all(by.css('option')).get(2).click(); + expect(includeElem.getText()).toMatch(/Content of template2.html/); + }); + + it('should change to blank', function() { + if (browser.params.browser == 'firefox') { + // Firefox can't handle using selects + return; + } + templateSelect.click(); + templateSelect.all(by.css('option')).get(0).click(); + expect(includeElem.isPresent()).toBe(false); + }); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example38/script.js b/1.3.0-rc.2/docs/examples/example-example38/script.js new file mode 100644 index 0000000000..92680ca9f2 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example38/script.js @@ -0,0 +1,7 @@ + angular.module('includeExample', ['ngAnimate']) + .controller('ExampleController', ['$scope', function($scope) { + $scope.templates = + [ { name: 'template1.html', url: 'template1.html'}, + { name: 'template2.html', url: 'template2.html'} ]; + $scope.template = $scope.templates[0]; + }]); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example38/template1.html b/1.3.0-rc.2/docs/examples/example-example38/template1.html new file mode 100644 index 0000000000..e2ce5ca854 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example38/template1.html @@ -0,0 +1 @@ + Content of template1.html \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example38/template2.html b/1.3.0-rc.2/docs/examples/example-example38/template2.html new file mode 100644 index 0000000000..bc2c751a70 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example38/template2.html @@ -0,0 +1 @@ + Content of template2.html \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example39/index-debug.html b/1.3.0-rc.2/docs/examples/example-example39/index-debug.html new file mode 100644 index 0000000000..b057fa0ccb --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example39/index-debug.html @@ -0,0 +1,28 @@ + + + + + Example - example-example39-debug + + + + + + + + + +
+
+
+ list[ {{outerIndex}} ][ {{innerIndex}} ] = {{value}}; +
+
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example39/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example39/index-jquery.html new file mode 100644 index 0000000000..9e345f0c0f --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example39/index-jquery.html @@ -0,0 +1,29 @@ + + + + + Example - example-example39-jquery + + + + + + + + + + +
+
+
+ list[ {{outerIndex}} ][ {{innerIndex}} ] = {{value}}; +
+
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example39/index-production.html b/1.3.0-rc.2/docs/examples/example-example39/index-production.html new file mode 100644 index 0000000000..86639c0223 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example39/index-production.html @@ -0,0 +1,28 @@ + + + + + Example - example-example39-production + + + + + + + + + +
+
+
+ list[ {{outerIndex}} ][ {{innerIndex}} ] = {{value}}; +
+
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example39/index.html b/1.3.0-rc.2/docs/examples/example-example39/index.html new file mode 100644 index 0000000000..21611bf43a --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example39/index.html @@ -0,0 +1,28 @@ + + + + + Example - example-example39 + + + + + + + + + +
+
+
+ list[ {{outerIndex}} ][ {{innerIndex}} ] = {{value}}; +
+
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example39/manifest.json b/1.3.0-rc.2/docs/examples/example-example39/manifest.json new file mode 100644 index 0000000000..4562c86bc2 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example39/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example39", + "files": [ + "index-production.html", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example39/protractor.js b/1.3.0-rc.2/docs/examples/example-example39/protractor.js new file mode 100644 index 0000000000..b1bc72d1d7 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example39/protractor.js @@ -0,0 +1,7 @@ + it('should alias index positions', function() { + var elements = element.all(by.css('.example-init')); + expect(elements.get(0).getText()).toBe('list[ 0 ][ 0 ] = a;'); + expect(elements.get(1).getText()).toBe('list[ 0 ][ 1 ] = b;'); + expect(elements.get(2).getText()).toBe('list[ 1 ][ 0 ] = c;'); + expect(elements.get(3).getText()).toBe('list[ 1 ][ 1 ] = d;'); + }); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example4/index-debug.html b/1.3.0-rc.2/docs/examples/example-example4/index-debug.html new file mode 100644 index 0000000000..d4d03f7557 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example4/index-debug.html @@ -0,0 +1,36 @@ + + + + + Example - example-example4-debug + + + + + + + + + + +
+ + + + +

Cached Values

+
+ + : + +
+ +

Cache Info

+
+ + : + +
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example4/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example4/index-jquery.html new file mode 100644 index 0000000000..1ca1b5aea6 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example4/index-jquery.html @@ -0,0 +1,37 @@ + + + + + Example - example-example4-jquery + + + + + + + + + + + +
+ + + + +

Cached Values

+
+ + : + +
+ +

Cache Info

+
+ + : + +
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example4/index-production.html b/1.3.0-rc.2/docs/examples/example-example4/index-production.html new file mode 100644 index 0000000000..badbc05e40 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example4/index-production.html @@ -0,0 +1,36 @@ + + + + + Example - example-example4-production + + + + + + + + + + +
+ + + + +

Cached Values

+
+ + : + +
+ +

Cache Info

+
+ + : + +
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example4/index.html b/1.3.0-rc.2/docs/examples/example-example4/index.html new file mode 100644 index 0000000000..4fbde95f27 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example4/index.html @@ -0,0 +1,36 @@ + + + + + Example - example-example4 + + + + + + + + + + +
+ + + + +

Cached Values

+
+ + : + +
+ +

Cache Info

+
+ + : + +
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example4/manifest.json b/1.3.0-rc.2/docs/examples/example-example4/manifest.json new file mode 100644 index 0000000000..a050738b51 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example4/manifest.json @@ -0,0 +1,8 @@ +{ + "name": "example-example4", + "files": [ + "index-production.html", + "script.js", + "style.css" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example4/script.js b/1.3.0-rc.2/docs/examples/example-example4/script.js new file mode 100644 index 0000000000..2a682cdc7d --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example4/script.js @@ -0,0 +1,11 @@ + angular.module('cacheExampleApp', []). + controller('CacheController', ['$scope', '$cacheFactory', function($scope, $cacheFactory) { + $scope.keys = []; + $scope.cache = $cacheFactory('cacheId'); + $scope.put = function(key, value) { + if ($scope.cache.get(key) === undefined) { + $scope.keys.push(key); + } + $scope.cache.put(key, value === undefined ? null : value); + }; + }]); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example4/style.css b/1.3.0-rc.2/docs/examples/example-example4/style.css new file mode 100644 index 0000000000..301a3b0a5c --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example4/style.css @@ -0,0 +1,3 @@ + p { + margin: 10px 0 3px; + } \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example40/index-debug.html b/1.3.0-rc.2/docs/examples/example-example40/index-debug.html new file mode 100644 index 0000000000..c9fd209f4b --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example40/index-debug.html @@ -0,0 +1,17 @@ + + + + + Example - example-example40-debug + + + + + + + + +
Normal: {{1 + 2}}
+
Ignored: {{1 + 2}}
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example40/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example40/index-jquery.html new file mode 100644 index 0000000000..28cac633c7 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example40/index-jquery.html @@ -0,0 +1,18 @@ + + + + + Example - example-example40-jquery + + + + + + + + + +
Normal: {{1 + 2}}
+
Ignored: {{1 + 2}}
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example40/index-production.html b/1.3.0-rc.2/docs/examples/example-example40/index-production.html new file mode 100644 index 0000000000..acb4c8e86c --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example40/index-production.html @@ -0,0 +1,17 @@ + + + + + Example - example-example40-production + + + + + + + + +
Normal: {{1 + 2}}
+
Ignored: {{1 + 2}}
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example40/index.html b/1.3.0-rc.2/docs/examples/example-example40/index.html new file mode 100644 index 0000000000..62bee67f0f --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example40/index.html @@ -0,0 +1,17 @@ + + + + + Example - example-example40 + + + + + + + + +
Normal: {{1 + 2}}
+
Ignored: {{1 + 2}}
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example40/manifest.json b/1.3.0-rc.2/docs/examples/example-example40/manifest.json new file mode 100644 index 0000000000..c3a60d52e5 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example40/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example40", + "files": [ + "index-production.html", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example40/protractor.js b/1.3.0-rc.2/docs/examples/example-example40/protractor.js new file mode 100644 index 0000000000..92e76aeb1f --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example40/protractor.js @@ -0,0 +1,4 @@ + it('should check ng-non-bindable', function() { + expect(element(by.binding('1 + 2')).getText()).toContain('3'); + expect(element.all(by.css('div')).last().getText()).toMatch(/1 \+ 2/); + }); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example41/index-debug.html b/1.3.0-rc.2/docs/examples/example-example41/index-debug.html new file mode 100644 index 0000000000..b82774412f --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example41/index-debug.html @@ -0,0 +1,46 @@ + + + + + Example - example-example41-debug + + + + + + + + + +
+ Person 1:
+ Person 2:
+ Number of People:
+ + + Without Offset: + +
+ + + With Offset(2): + + +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example41/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example41/index-jquery.html new file mode 100644 index 0000000000..7caf4c3a9e --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example41/index-jquery.html @@ -0,0 +1,47 @@ + + + + + Example - example-example41-jquery + + + + + + + + + + +
+ Person 1:
+ Person 2:
+ Number of People:
+ + + Without Offset: + +
+ + + With Offset(2): + + +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example41/index-production.html b/1.3.0-rc.2/docs/examples/example-example41/index-production.html new file mode 100644 index 0000000000..c2d5a62bd0 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example41/index-production.html @@ -0,0 +1,46 @@ + + + + + Example - example-example41-production + + + + + + + + + +
+ Person 1:
+ Person 2:
+ Number of People:
+ + + Without Offset: + +
+ + + With Offset(2): + + +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example41/index.html b/1.3.0-rc.2/docs/examples/example-example41/index.html new file mode 100644 index 0000000000..4ae75d2a5d --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example41/index.html @@ -0,0 +1,46 @@ + + + + + Example - example-example41 + + + + + + + + + +
+ Person 1:
+ Person 2:
+ Number of People:
+ + + Without Offset: + +
+ + + With Offset(2): + + +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example41/manifest.json b/1.3.0-rc.2/docs/examples/example-example41/manifest.json new file mode 100644 index 0000000000..1657c20cf2 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example41/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example41", + "files": [ + "index-production.html", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example41/protractor.js b/1.3.0-rc.2/docs/examples/example-example41/protractor.js new file mode 100644 index 0000000000..65fe79ff37 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example41/protractor.js @@ -0,0 +1,45 @@ + it('should show correct pluralized string', function() { + var withoutOffset = element.all(by.css('ng-pluralize')).get(0); + var withOffset = element.all(by.css('ng-pluralize')).get(1); + var countInput = element(by.model('personCount')); + + expect(withoutOffset.getText()).toEqual('1 person is viewing.'); + expect(withOffset.getText()).toEqual('Igor is viewing.'); + + countInput.clear(); + countInput.sendKeys('0'); + + expect(withoutOffset.getText()).toEqual('Nobody is viewing.'); + expect(withOffset.getText()).toEqual('Nobody is viewing.'); + + countInput.clear(); + countInput.sendKeys('2'); + + expect(withoutOffset.getText()).toEqual('2 people are viewing.'); + expect(withOffset.getText()).toEqual('Igor and Misko are viewing.'); + + countInput.clear(); + countInput.sendKeys('3'); + + expect(withoutOffset.getText()).toEqual('3 people are viewing.'); + expect(withOffset.getText()).toEqual('Igor, Misko and one other person are viewing.'); + + countInput.clear(); + countInput.sendKeys('4'); + + expect(withoutOffset.getText()).toEqual('4 people are viewing.'); + expect(withOffset.getText()).toEqual('Igor, Misko and 2 other people are viewing.'); + }); + it('should show data-bound names', function() { + var withOffset = element.all(by.css('ng-pluralize')).get(1); + var personCount = element(by.model('personCount')); + var person1 = element(by.model('person1')); + var person2 = element(by.model('person2')); + personCount.clear(); + personCount.sendKeys('4'); + person1.clear(); + person1.sendKeys('Di'); + person2.clear(); + person2.sendKeys('Vojta'); + expect(withOffset.getText()).toEqual('Di, Vojta and 2 other people are viewing.'); + }); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example42/animations.css b/1.3.0-rc.2/docs/examples/example-example42/animations.css new file mode 100644 index 0000000000..5d21c71bba --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example42/animations.css @@ -0,0 +1,34 @@ + .example-animate-container { + background:white; + border:1px solid black; + list-style:none; + margin:0; + padding:0 10px; + } + + .animate-repeat { + line-height:40px; + list-style:none; + box-sizing:border-box; + } + + .animate-repeat.ng-move, + .animate-repeat.ng-enter, + .animate-repeat.ng-leave { + -webkit-transition:all linear 0.5s; + transition:all linear 0.5s; + } + + .animate-repeat.ng-leave.ng-leave-active, + .animate-repeat.ng-move, + .animate-repeat.ng-enter { + opacity:0; + max-height:0; + } + + .animate-repeat.ng-leave, + .animate-repeat.ng-move.ng-move-active, + .animate-repeat.ng-enter.ng-enter-active { + opacity:1; + max-height:40px; + } \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example42/index-debug.html b/1.3.0-rc.2/docs/examples/example-example42/index-debug.html new file mode 100644 index 0000000000..1650c3f82e --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example42/index-debug.html @@ -0,0 +1,40 @@ + + + + + Example - example-example42-debug + + + + + + + + + + +
+ I have {{friends.length}} friends. They are: + +
    +
  • + [{{$index + 1}}] {{friend.name}} who is {{friend.age}} years old. +
  • +
  • + No results found... +
  • +
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example42/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example42/index-jquery.html new file mode 100644 index 0000000000..1c6c002987 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example42/index-jquery.html @@ -0,0 +1,41 @@ + + + + + Example - example-example42-jquery + + + + + + + + + + + +
+ I have {{friends.length}} friends. They are: + +
    +
  • + [{{$index + 1}}] {{friend.name}} who is {{friend.age}} years old. +
  • +
  • + No results found... +
  • +
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example42/index-production.html b/1.3.0-rc.2/docs/examples/example-example42/index-production.html new file mode 100644 index 0000000000..c3acc500d7 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example42/index-production.html @@ -0,0 +1,40 @@ + + + + + Example - example-example42-production + + + + + + + + + + +
+ I have {{friends.length}} friends. They are: + +
    +
  • + [{{$index + 1}}] {{friend.name}} who is {{friend.age}} years old. +
  • +
  • + No results found... +
  • +
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example42/index.html b/1.3.0-rc.2/docs/examples/example-example42/index.html new file mode 100644 index 0000000000..4091646f73 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example42/index.html @@ -0,0 +1,40 @@ + + + + + Example - example-example42 + + + + + + + + + + +
+ I have {{friends.length}} friends. They are: + +
    +
  • + [{{$index + 1}}] {{friend.name}} who is {{friend.age}} years old. +
  • +
  • + No results found... +
  • +
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example42/manifest.json b/1.3.0-rc.2/docs/examples/example-example42/manifest.json new file mode 100644 index 0000000000..3eb748b72a --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example42/manifest.json @@ -0,0 +1,8 @@ +{ + "name": "example-example42", + "files": [ + "index-production.html", + "animations.css", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example42/protractor.js b/1.3.0-rc.2/docs/examples/example-example42/protractor.js new file mode 100644 index 0000000000..b90d6fb61a --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example42/protractor.js @@ -0,0 +1,20 @@ +var friends = element.all(by.repeater('friend in friends')); + +it('should render initial data set', function() { + expect(friends.count()).toBe(10); + expect(friends.get(0).getText()).toEqual('[1] John who is 25 years old.'); + expect(friends.get(1).getText()).toEqual('[2] Jessie who is 30 years old.'); + expect(friends.last().getText()).toEqual('[10] Samantha who is 60 years old.'); + expect(element(by.binding('friends.length')).getText()) + .toMatch("I have 10 friends. They are:"); +}); + + it('should update repeater when filter predicate changes', function() { + expect(friends.count()).toBe(10); + + element(by.model('q')).sendKeys('ma'); + + expect(friends.count()).toBe(2); + expect(friends.get(0).getText()).toEqual('[1] Mary who is 28 years old.'); + expect(friends.last().getText()).toEqual('[2] Samantha who is 60 years old.'); + }); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example43/animations.css b/1.3.0-rc.2/docs/examples/example-example43/animations.css new file mode 100644 index 0000000000..4c538506a7 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example43/animations.css @@ -0,0 +1,25 @@ + .animate-show { + line-height:20px; + opacity:1; + padding:10px; + border:1px solid black; + background:white; + } + + .animate-show.ng-hide-add.ng-hide-add-active, + .animate-show.ng-hide-remove.ng-hide-remove-active { + -webkit-transition:all linear 0.5s; + transition:all linear 0.5s; + } + + .animate-show.ng-hide { + line-height:0; + opacity:0; + padding:0 10px; + } + + .check-element { + padding:10px; + border:1px solid black; + background:white; + } \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example43/glyphicons.css b/1.3.0-rc.2/docs/examples/example-example43/glyphicons.css new file mode 100644 index 0000000000..e81b05ec1e --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example43/glyphicons.css @@ -0,0 +1 @@ + @import url(//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap-glyphicons.css); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example43/index-debug.html b/1.3.0-rc.2/docs/examples/example-example43/index-debug.html new file mode 100644 index 0000000000..369635e065 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example43/index-debug.html @@ -0,0 +1,31 @@ + + + + + Example - example-example43-debug + + + + + + + + + + + + Click me:
+
+ Show: +
+ I show up when your checkbox is checked. +
+
+
+ Hide: +
+ I hide when your checkbox is checked. +
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example43/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example43/index-jquery.html new file mode 100644 index 0000000000..0bad1aef27 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example43/index-jquery.html @@ -0,0 +1,32 @@ + + + + + Example - example-example43-jquery + + + + + + + + + + + + + Click me:
+
+ Show: +
+ I show up when your checkbox is checked. +
+
+
+ Hide: +
+ I hide when your checkbox is checked. +
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example43/index-production.html b/1.3.0-rc.2/docs/examples/example-example43/index-production.html new file mode 100644 index 0000000000..f85e902c53 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example43/index-production.html @@ -0,0 +1,31 @@ + + + + + Example - example-example43-production + + + + + + + + + + + + Click me:
+
+ Show: +
+ I show up when your checkbox is checked. +
+
+
+ Hide: +
+ I hide when your checkbox is checked. +
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example43/index.html b/1.3.0-rc.2/docs/examples/example-example43/index.html new file mode 100644 index 0000000000..8b7aadd91d --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example43/index.html @@ -0,0 +1,31 @@ + + + + + Example - example-example43 + + + + + + + + + + + + Click me:
+
+ Show: +
+ I show up when your checkbox is checked. +
+
+
+ Hide: +
+ I hide when your checkbox is checked. +
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example43/manifest.json b/1.3.0-rc.2/docs/examples/example-example43/manifest.json new file mode 100644 index 0000000000..86faa930c0 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example43/manifest.json @@ -0,0 +1,9 @@ +{ + "name": "example-example43", + "files": [ + "index-production.html", + "glyphicons.css", + "animations.css", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example43/protractor.js b/1.3.0-rc.2/docs/examples/example-example43/protractor.js new file mode 100644 index 0000000000..a0c35c8644 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example43/protractor.js @@ -0,0 +1,12 @@ + var thumbsUp = element(by.css('span.glyphicon-thumbs-up')); + var thumbsDown = element(by.css('span.glyphicon-thumbs-down')); + + it('should check ng-show / ng-hide', function() { + expect(thumbsUp.isDisplayed()).toBeFalsy(); + expect(thumbsDown.isDisplayed()).toBeTruthy(); + + element(by.model('checked')).click(); + + expect(thumbsUp.isDisplayed()).toBeTruthy(); + expect(thumbsDown.isDisplayed()).toBeFalsy(); + }); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example44/animations.css b/1.3.0-rc.2/docs/examples/example-example44/animations.css new file mode 100644 index 0000000000..a755d7b690 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example44/animations.css @@ -0,0 +1,21 @@ + .animate-hide { + -webkit-transition:all linear 0.5s; + transition:all linear 0.5s; + line-height:20px; + opacity:1; + padding:10px; + border:1px solid black; + background:white; + } + + .animate-hide.ng-hide { + line-height:0; + opacity:0; + padding:0 10px; + } + + .check-element { + padding:10px; + border:1px solid black; + background:white; + } \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example44/glyphicons.css b/1.3.0-rc.2/docs/examples/example-example44/glyphicons.css new file mode 100644 index 0000000000..e81b05ec1e --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example44/glyphicons.css @@ -0,0 +1 @@ + @import url(//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap-glyphicons.css); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example44/index-debug.html b/1.3.0-rc.2/docs/examples/example-example44/index-debug.html new file mode 100644 index 0000000000..92e95f4ddf --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example44/index-debug.html @@ -0,0 +1,31 @@ + + + + + Example - example-example44-debug + + + + + + + + + + + + Click me:
+
+ Show: +
+ I show up when your checkbox is checked. +
+
+
+ Hide: +
+ I hide when your checkbox is checked. +
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example44/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example44/index-jquery.html new file mode 100644 index 0000000000..9e75c99d84 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example44/index-jquery.html @@ -0,0 +1,32 @@ + + + + + Example - example-example44-jquery + + + + + + + + + + + + + Click me:
+
+ Show: +
+ I show up when your checkbox is checked. +
+
+
+ Hide: +
+ I hide when your checkbox is checked. +
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example44/index-production.html b/1.3.0-rc.2/docs/examples/example-example44/index-production.html new file mode 100644 index 0000000000..ef685f9a13 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example44/index-production.html @@ -0,0 +1,31 @@ + + + + + Example - example-example44-production + + + + + + + + + + + + Click me:
+
+ Show: +
+ I show up when your checkbox is checked. +
+
+
+ Hide: +
+ I hide when your checkbox is checked. +
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example44/index.html b/1.3.0-rc.2/docs/examples/example-example44/index.html new file mode 100644 index 0000000000..456dc58194 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example44/index.html @@ -0,0 +1,31 @@ + + + + + Example - example-example44 + + + + + + + + + + + + Click me:
+
+ Show: +
+ I show up when your checkbox is checked. +
+
+
+ Hide: +
+ I hide when your checkbox is checked. +
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example44/manifest.json b/1.3.0-rc.2/docs/examples/example-example44/manifest.json new file mode 100644 index 0000000000..7915b297f4 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example44/manifest.json @@ -0,0 +1,9 @@ +{ + "name": "example-example44", + "files": [ + "index-production.html", + "glyphicons.css", + "animations.css", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example44/protractor.js b/1.3.0-rc.2/docs/examples/example-example44/protractor.js new file mode 100644 index 0000000000..a0c35c8644 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example44/protractor.js @@ -0,0 +1,12 @@ + var thumbsUp = element(by.css('span.glyphicon-thumbs-up')); + var thumbsDown = element(by.css('span.glyphicon-thumbs-down')); + + it('should check ng-show / ng-hide', function() { + expect(thumbsUp.isDisplayed()).toBeFalsy(); + expect(thumbsDown.isDisplayed()).toBeTruthy(); + + element(by.model('checked')).click(); + + expect(thumbsUp.isDisplayed()).toBeTruthy(); + expect(thumbsDown.isDisplayed()).toBeFalsy(); + }); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example45/index-debug.html b/1.3.0-rc.2/docs/examples/example-example45/index-debug.html new file mode 100644 index 0000000000..87ea0c4177 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example45/index-debug.html @@ -0,0 +1,22 @@ + + + + + Example - example-example45-debug + + + + + + + + + + + + +
+ Sample Text +
myStyle={{myStyle}}
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example45/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example45/index-jquery.html new file mode 100644 index 0000000000..c74fafd104 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example45/index-jquery.html @@ -0,0 +1,23 @@ + + + + + Example - example-example45-jquery + + + + + + + + + + + + + +
+ Sample Text +
myStyle={{myStyle}}
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example45/index-production.html b/1.3.0-rc.2/docs/examples/example-example45/index-production.html new file mode 100644 index 0000000000..795cf0628b --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example45/index-production.html @@ -0,0 +1,22 @@ + + + + + Example - example-example45-production + + + + + + + + + + + + +
+ Sample Text +
myStyle={{myStyle}}
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example45/index.html b/1.3.0-rc.2/docs/examples/example-example45/index.html new file mode 100644 index 0000000000..06283458b0 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example45/index.html @@ -0,0 +1,22 @@ + + + + + Example - example-example45 + + + + + + + + + + + + +
+ Sample Text +
myStyle={{myStyle}}
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example45/manifest.json b/1.3.0-rc.2/docs/examples/example-example45/manifest.json new file mode 100644 index 0000000000..afab623670 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example45/manifest.json @@ -0,0 +1,8 @@ +{ + "name": "example-example45", + "files": [ + "index-production.html", + "style.css", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example45/protractor.js b/1.3.0-rc.2/docs/examples/example-example45/protractor.js new file mode 100644 index 0000000000..5520cd4b01 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example45/protractor.js @@ -0,0 +1,9 @@ + var colorSpan = element(by.css('span')); + + it('should check ng-style', function() { + expect(colorSpan.getCssValue('color')).toBe('rgba(0, 0, 0, 1)'); + element(by.css('input[value=\'set color\']')).click(); + expect(colorSpan.getCssValue('color')).toBe('rgba(255, 0, 0, 1)'); + element(by.css('input[value=clear]')).click(); + expect(colorSpan.getCssValue('color')).toBe('rgba(0, 0, 0, 1)'); + }); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example45/style.css b/1.3.0-rc.2/docs/examples/example-example45/style.css new file mode 100644 index 0000000000..3813c5ab68 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example45/style.css @@ -0,0 +1,3 @@ + span { + color: black; + } \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example46/animations.css b/1.3.0-rc.2/docs/examples/example-example46/animations.css new file mode 100644 index 0000000000..029267121d --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example46/animations.css @@ -0,0 +1,31 @@ + .animate-switch-container { + position:relative; + background:white; + border:1px solid black; + height:40px; + overflow:hidden; + } + + .animate-switch { + padding:10px; + } + + .animate-switch.ng-animate { + -webkit-transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s; + transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s; + + position:absolute; + top:0; + left:0; + right:0; + bottom:0; + } + + .animate-switch.ng-leave.ng-leave-active, + .animate-switch.ng-enter { + top:-50px; + } + .animate-switch.ng-leave, + .animate-switch.ng-enter.ng-enter-active { + top:0; + } \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example46/index-debug.html b/1.3.0-rc.2/docs/examples/example-example46/index-debug.html new file mode 100644 index 0000000000..28ee6685a0 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example46/index-debug.html @@ -0,0 +1,30 @@ + + + + + Example - example-example46-debug + + + + + + + + + + + +
+ + selection={{selection}} +
+
+
Settings Div
+
Home Span
+
default
+
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example46/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example46/index-jquery.html new file mode 100644 index 0000000000..67830fb20f --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example46/index-jquery.html @@ -0,0 +1,31 @@ + + + + + Example - example-example46-jquery + + + + + + + + + + + + +
+ + selection={{selection}} +
+
+
Settings Div
+
Home Span
+
default
+
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example46/index-production.html b/1.3.0-rc.2/docs/examples/example-example46/index-production.html new file mode 100644 index 0000000000..1d6f144a3e --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example46/index-production.html @@ -0,0 +1,30 @@ + + + + + Example - example-example46-production + + + + + + + + + + + +
+ + selection={{selection}} +
+
+
Settings Div
+
Home Span
+
default
+
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example46/index.html b/1.3.0-rc.2/docs/examples/example-example46/index.html new file mode 100644 index 0000000000..693e627fab --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example46/index.html @@ -0,0 +1,30 @@ + + + + + Example - example-example46 + + + + + + + + + + + +
+ + selection={{selection}} +
+
+
Settings Div
+
Home Span
+
default
+
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example46/manifest.json b/1.3.0-rc.2/docs/examples/example-example46/manifest.json new file mode 100644 index 0000000000..3206375bf9 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example46/manifest.json @@ -0,0 +1,9 @@ +{ + "name": "example-example46", + "files": [ + "index-production.html", + "script.js", + "animations.css", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example46/protractor.js b/1.3.0-rc.2/docs/examples/example-example46/protractor.js new file mode 100644 index 0000000000..13428b5d9d --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example46/protractor.js @@ -0,0 +1,14 @@ + var switchElem = element(by.css('[ng-switch]')); + var select = element(by.model('selection')); + + it('should start in settings', function() { + expect(switchElem.getText()).toMatch(/Settings Div/); + }); + it('should change to home', function() { + select.all(by.css('option')).get(1).click(); + expect(switchElem.getText()).toMatch(/Home Span/); + }); + it('should select default', function() { + select.all(by.css('option')).get(2).click(); + expect(switchElem.getText()).toMatch(/default/); + }); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example46/script.js b/1.3.0-rc.2/docs/examples/example-example46/script.js new file mode 100644 index 0000000000..eeb7d5ab4e --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example46/script.js @@ -0,0 +1,5 @@ + angular.module('switchExample', ['ngAnimate']) + .controller('ExampleController', ['$scope', function($scope) { + $scope.items = ['settings', 'home', 'other']; + $scope.selection = $scope.items[0]; + }]); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example47/index-debug.html b/1.3.0-rc.2/docs/examples/example-example47/index-debug.html new file mode 100644 index 0000000000..50579072bc --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example47/index-debug.html @@ -0,0 +1,38 @@ + + + + + Example - example-example47-debug + + + + + + + + + +
+
+
+ {{text}} +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example47/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example47/index-jquery.html new file mode 100644 index 0000000000..0096220503 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example47/index-jquery.html @@ -0,0 +1,39 @@ + + + + + Example - example-example47-jquery + + + + + + + + + + +
+
+
+ {{text}} +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example47/index-production.html b/1.3.0-rc.2/docs/examples/example-example47/index-production.html new file mode 100644 index 0000000000..3e4c64a854 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example47/index-production.html @@ -0,0 +1,38 @@ + + + + + Example - example-example47-production + + + + + + + + + +
+
+
+ {{text}} +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example47/index.html b/1.3.0-rc.2/docs/examples/example-example47/index.html new file mode 100644 index 0000000000..ccc6fccc69 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example47/index.html @@ -0,0 +1,38 @@ + + + + + Example - example-example47 + + + + + + + + + +
+
+
+ {{text}} +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example47/manifest.json b/1.3.0-rc.2/docs/examples/example-example47/manifest.json new file mode 100644 index 0000000000..16357cf50d --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example47/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example47", + "files": [ + "index-production.html", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example47/protractor.js b/1.3.0-rc.2/docs/examples/example-example47/protractor.js new file mode 100644 index 0000000000..cede5558e4 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example47/protractor.js @@ -0,0 +1,10 @@ + it('should have transcluded', function() { + var titleElement = element(by.model('title')); + titleElement.clear(); + titleElement.sendKeys('TITLE'); + var textElement = element(by.model('text')); + textElement.clear(); + textElement.sendKeys('TEXT'); + expect(element(by.binding('title')).getText()).toEqual('TITLE'); + expect(element(by.binding('text')).getText()).toEqual('TEXT'); + }); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example48/index-debug.html b/1.3.0-rc.2/docs/examples/example-example48/index-debug.html new file mode 100644 index 0000000000..15202ed914 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example48/index-debug.html @@ -0,0 +1,21 @@ + + + + + Example - example-example48-debug + + + + + + + + + + + Load inlined template +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example48/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example48/index-jquery.html new file mode 100644 index 0000000000..5f8c20ce02 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example48/index-jquery.html @@ -0,0 +1,22 @@ + + + + + Example - example-example48-jquery + + + + + + + + + + + + Load inlined template +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example48/index-production.html b/1.3.0-rc.2/docs/examples/example-example48/index-production.html new file mode 100644 index 0000000000..a7241a6647 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example48/index-production.html @@ -0,0 +1,21 @@ + + + + + Example - example-example48-production + + + + + + + + + + + Load inlined template +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example48/index.html b/1.3.0-rc.2/docs/examples/example-example48/index.html new file mode 100644 index 0000000000..5d5add5955 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example48/index.html @@ -0,0 +1,21 @@ + + + + + Example - example-example48 + + + + + + + + + + + Load inlined template +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example48/manifest.json b/1.3.0-rc.2/docs/examples/example-example48/manifest.json new file mode 100644 index 0000000000..eb0528a18a --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example48/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example48", + "files": [ + "index-production.html", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example48/protractor.js b/1.3.0-rc.2/docs/examples/example-example48/protractor.js new file mode 100644 index 0000000000..a42438787a --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example48/protractor.js @@ -0,0 +1,4 @@ + it('should load template defined inside script tag', function() { + element(by.css('#tpl-link')).click(); + expect(element(by.css('#tpl-content')).getText()).toMatch(/Content of the template/); + }); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example49/index-debug.html b/1.3.0-rc.2/docs/examples/example-example49/index-debug.html new file mode 100644 index 0000000000..a7255e340b --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example49/index-debug.html @@ -0,0 +1,61 @@ + + + + + Example - example-example49-debug + + + + + + + + + +
+
    +
  • + Name: + [X] +
  • +
  • + [add] +
  • +
+
+ Color (null not allowed): +
+ + Color (null allowed): + + +
+ + Color grouped by shade: +
+ + + Select bogus.
+
+ Currently selected: {{ {selected_color:myColor} }} +
+
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example49/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example49/index-jquery.html new file mode 100644 index 0000000000..8e24061e4a --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example49/index-jquery.html @@ -0,0 +1,62 @@ + + + + + Example - example-example49-jquery + + + + + + + + + + +
+
    +
  • + Name: + [X] +
  • +
  • + [add] +
  • +
+
+ Color (null not allowed): +
+ + Color (null allowed): + + +
+ + Color grouped by shade: +
+ + + Select bogus.
+
+ Currently selected: {{ {selected_color:myColor} }} +
+
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example49/index-production.html b/1.3.0-rc.2/docs/examples/example-example49/index-production.html new file mode 100644 index 0000000000..9cc9ff7682 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example49/index-production.html @@ -0,0 +1,61 @@ + + + + + Example - example-example49-production + + + + + + + + + +
+
    +
  • + Name: + [X] +
  • +
  • + [add] +
  • +
+
+ Color (null not allowed): +
+ + Color (null allowed): + + +
+ + Color grouped by shade: +
+ + + Select bogus.
+
+ Currently selected: {{ {selected_color:myColor} }} +
+
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example49/index.html b/1.3.0-rc.2/docs/examples/example-example49/index.html new file mode 100644 index 0000000000..b9e9f67d18 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example49/index.html @@ -0,0 +1,61 @@ + + + + + Example - example-example49 + + + + + + + + + +
+
    +
  • + Name: + [X] +
  • +
  • + [add] +
  • +
+
+ Color (null not allowed): +
+ + Color (null allowed): + + +
+ + Color grouped by shade: +
+ + + Select bogus.
+
+ Currently selected: {{ {selected_color:myColor} }} +
+
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example49/manifest.json b/1.3.0-rc.2/docs/examples/example-example49/manifest.json new file mode 100644 index 0000000000..9f665c34aa --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example49/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example49", + "files": [ + "index-production.html", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example49/protractor.js b/1.3.0-rc.2/docs/examples/example-example49/protractor.js new file mode 100644 index 0000000000..f5d74334f0 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example49/protractor.js @@ -0,0 +1,9 @@ + it('should check ng-options', function() { + expect(element(by.binding('{selected_color:myColor}')).getText()).toMatch('red'); + element.all(by.model('myColor')).first().click(); + element.all(by.css('select[ng-model="myColor"] option')).first().click(); + expect(element(by.binding('{selected_color:myColor}')).getText()).toMatch('black'); + element(by.css('.nullable select[ng-model="myColor"]')).click(); + element.all(by.css('.nullable select[ng-model="myColor"] option')).first().click(); + expect(element(by.binding('{selected_color:myColor}')).getText()).toMatch('null'); + }); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example5/index-debug.html b/1.3.0-rc.2/docs/examples/example-example5/index-debug.html new file mode 100644 index 0000000000..9fe211ac17 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example5/index-debug.html @@ -0,0 +1,52 @@ + + + + + Example - example-example5-debug + + + + + + + + + +
+
+
+
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example5/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example5/index-jquery.html new file mode 100644 index 0000000000..8e5366bc3a --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example5/index-jquery.html @@ -0,0 +1,53 @@ + + + + + Example - example-example5-jquery + + + + + + + + + + +
+
+
+
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example5/index-production.html b/1.3.0-rc.2/docs/examples/example-example5/index-production.html new file mode 100644 index 0000000000..91f13c48f2 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example5/index-production.html @@ -0,0 +1,52 @@ + + + + + Example - example-example5-production + + + + + + + + + +
+
+
+
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example5/index.html b/1.3.0-rc.2/docs/examples/example-example5/index.html new file mode 100644 index 0000000000..ed0189f03b --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example5/index.html @@ -0,0 +1,52 @@ + + + + + Example - example-example5 + + + + + + + + + +
+
+
+
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example5/manifest.json b/1.3.0-rc.2/docs/examples/example-example5/manifest.json new file mode 100644 index 0000000000..7939d7bd71 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example5/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example5", + "files": [ + "index-production.html", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example5/protractor.js b/1.3.0-rc.2/docs/examples/example-example5/protractor.js new file mode 100644 index 0000000000..f04c931a99 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example5/protractor.js @@ -0,0 +1,9 @@ + it('should auto compile', function() { + var textarea = $('textarea'); + var output = $('div[compile]'); + // The initial state reads 'Hello Angular'. + expect(output.getText()).toBe('Hello Angular'); + textarea.clear(); + textarea.sendKeys('{{name}}!'); + expect(output.getText()).toBe('Angular!'); + }); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example50/index-debug.html b/1.3.0-rc.2/docs/examples/example-example50/index-debug.html new file mode 100644 index 0000000000..b4e9d1ed98 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example50/index-debug.html @@ -0,0 +1,20 @@ + + + + + Example - example-example50-debug + + + + + + + + + +
+

$document title:

+

window.document title:

+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example50/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example50/index-jquery.html new file mode 100644 index 0000000000..929f8308a0 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example50/index-jquery.html @@ -0,0 +1,21 @@ + + + + + Example - example-example50-jquery + + + + + + + + + + +
+

$document title:

+

window.document title:

+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example50/index-production.html b/1.3.0-rc.2/docs/examples/example-example50/index-production.html new file mode 100644 index 0000000000..788352f766 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example50/index-production.html @@ -0,0 +1,20 @@ + + + + + Example - example-example50-production + + + + + + + + + +
+

$document title:

+

window.document title:

+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example50/index.html b/1.3.0-rc.2/docs/examples/example-example50/index.html new file mode 100644 index 0000000000..5951a8ef39 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example50/index.html @@ -0,0 +1,20 @@ + + + + + Example - example-example50 + + + + + + + + + +
+

$document title:

+

window.document title:

+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example50/manifest.json b/1.3.0-rc.2/docs/examples/example-example50/manifest.json new file mode 100644 index 0000000000..4dd117a347 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example50/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example50", + "files": [ + "index-production.html", + "script.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example50/script.js b/1.3.0-rc.2/docs/examples/example-example50/script.js new file mode 100644 index 0000000000..7764817122 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example50/script.js @@ -0,0 +1,5 @@ + angular.module('documentExample', []) + .controller('ExampleController', ['$scope', '$document', function($scope, $document) { + $scope.title = $document[0].title; + $scope.windowTitle = angular.element(window.document)[0].title; + }]); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example51/index-debug.html b/1.3.0-rc.2/docs/examples/example-example51/index-debug.html new file mode 100644 index 0000000000..810372b909 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example51/index-debug.html @@ -0,0 +1,42 @@ + + + + + Example - example-example51-debug + + + + + + + + +
+ + Search: + + + + + + +
NamePhone
{{friend.name}}{{friend.phone}}
+
+ Any:
+ Name only
+ Phone only
+ Equality
+ + + + + + +
NamePhone
{{friendObj.name}}{{friendObj.phone}}
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example51/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example51/index-jquery.html new file mode 100644 index 0000000000..a23920415f --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example51/index-jquery.html @@ -0,0 +1,43 @@ + + + + + Example - example-example51-jquery + + + + + + + + + +
+ + Search: + + + + + + +
NamePhone
{{friend.name}}{{friend.phone}}
+
+ Any:
+ Name only
+ Phone only
+ Equality
+ + + + + + +
NamePhone
{{friendObj.name}}{{friendObj.phone}}
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example51/index-production.html b/1.3.0-rc.2/docs/examples/example-example51/index-production.html new file mode 100644 index 0000000000..9c765da8e6 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example51/index-production.html @@ -0,0 +1,42 @@ + + + + + Example - example-example51-production + + + + + + + + +
+ + Search: + + + + + + +
NamePhone
{{friend.name}}{{friend.phone}}
+
+ Any:
+ Name only
+ Phone only
+ Equality
+ + + + + + +
NamePhone
{{friendObj.name}}{{friendObj.phone}}
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example51/index.html b/1.3.0-rc.2/docs/examples/example-example51/index.html new file mode 100644 index 0000000000..29a6020057 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example51/index.html @@ -0,0 +1,42 @@ + + + + + Example - example-example51 + + + + + + + + +
+ + Search: + + + + + + +
NamePhone
{{friend.name}}{{friend.phone}}
+
+ Any:
+ Name only
+ Phone only
+ Equality
+ + + + + + +
NamePhone
{{friendObj.name}}{{friendObj.phone}}
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example51/manifest.json b/1.3.0-rc.2/docs/examples/example-example51/manifest.json new file mode 100644 index 0000000000..d1edf9cf3c --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example51/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example51", + "files": [ + "index-production.html", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example51/protractor.js b/1.3.0-rc.2/docs/examples/example-example51/protractor.js new file mode 100644 index 0000000000..6dcd056616 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example51/protractor.js @@ -0,0 +1,33 @@ + var expectFriendNames = function(expectedNames, key) { + element.all(by.repeater(key + ' in friends').column(key + '.name')).then(function(arr) { + arr.forEach(function(wd, i) { + expect(wd.getText()).toMatch(expectedNames[i]); + }); + }); + }; + + it('should search across all fields when filtering with a string', function() { + var searchText = element(by.model('searchText')); + searchText.clear(); + searchText.sendKeys('m'); + expectFriendNames(['Mary', 'Mike', 'Adam'], 'friend'); + + searchText.clear(); + searchText.sendKeys('76'); + expectFriendNames(['John', 'Julie'], 'friend'); + }); + + it('should search in specific fields when filtering with a predicate object', function() { + var searchAny = element(by.model('search.$')); + searchAny.clear(); + searchAny.sendKeys('i'); + expectFriendNames(['Mary', 'Mike', 'Julie', 'Juliette'], 'friendObj'); + }); + it('should use a equal comparison when comparator is true', function() { + var searchName = element(by.model('search.name')); + var strict = element(by.model('strict')); + searchName.clear(); + searchName.sendKeys('Julie'); + strict.click(); + expectFriendNames(['Julie'], 'friendObj'); + }); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example52/index-debug.html b/1.3.0-rc.2/docs/examples/example-example52/index-debug.html new file mode 100644 index 0000000000..5753cdad38 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example52/index-debug.html @@ -0,0 +1,26 @@ + + + + + Example - example-example52-debug + + + + + + + + + +
+
+ default currency symbol ($): {{amount | currency}}
+ custom currency identifier (USD$): {{amount | currency:"USD$"}} +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example52/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example52/index-jquery.html new file mode 100644 index 0000000000..a41117fdb9 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example52/index-jquery.html @@ -0,0 +1,27 @@ + + + + + Example - example-example52-jquery + + + + + + + + + + +
+
+ default currency symbol ($): {{amount | currency}}
+ custom currency identifier (USD$): {{amount | currency:"USD$"}} +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example52/index-production.html b/1.3.0-rc.2/docs/examples/example-example52/index-production.html new file mode 100644 index 0000000000..1d00adb5ac --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example52/index-production.html @@ -0,0 +1,26 @@ + + + + + Example - example-example52-production + + + + + + + + + +
+
+ default currency symbol ($): {{amount | currency}}
+ custom currency identifier (USD$): {{amount | currency:"USD$"}} +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example52/index.html b/1.3.0-rc.2/docs/examples/example-example52/index.html new file mode 100644 index 0000000000..bd8dae2e0d --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example52/index.html @@ -0,0 +1,26 @@ + + + + + Example - example-example52 + + + + + + + + + +
+
+ default currency symbol ($): {{amount | currency}}
+ custom currency identifier (USD$): {{amount | currency:"USD$"}} +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example52/manifest.json b/1.3.0-rc.2/docs/examples/example-example52/manifest.json new file mode 100644 index 0000000000..b63d0c84e6 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example52/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example52", + "files": [ + "index-production.html", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example52/protractor.js b/1.3.0-rc.2/docs/examples/example-example52/protractor.js new file mode 100644 index 0000000000..f5be614890 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example52/protractor.js @@ -0,0 +1,15 @@ + it('should init with 1234.56', function() { + expect(element(by.id('currency-default')).getText()).toBe('$1,234.56'); + expect(element(by.binding('amount | currency:"USD$"')).getText()).toBe('USD$1,234.56'); + }); + it('should update', function() { + if (browser.params.browser == 'safari') { + // Safari does not understand the minus key. See + // https://github.com/angular/protractor/issues/481 + return; + } + element(by.model('amount')).clear(); + element(by.model('amount')).sendKeys('-1234'); + expect(element(by.id('currency-default')).getText()).toBe('($1,234.00)'); + expect(element(by.binding('amount | currency:"USD$"')).getText()).toBe('(USD$1,234.00)'); + }); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example53/index-debug.html b/1.3.0-rc.2/docs/examples/example-example53/index-debug.html new file mode 100644 index 0000000000..29e8eecd05 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example53/index-debug.html @@ -0,0 +1,27 @@ + + + + + Example - example-example53-debug + + + + + + + + + +
+ Enter number:
+ Default formatting: {{val | number}}
+ No fractions: {{val | number:0}}
+ Negative number: {{-val | number:4}} +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example53/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example53/index-jquery.html new file mode 100644 index 0000000000..03802ed1de --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example53/index-jquery.html @@ -0,0 +1,28 @@ + + + + + Example - example-example53-jquery + + + + + + + + + + +
+ Enter number:
+ Default formatting: {{val | number}}
+ No fractions: {{val | number:0}}
+ Negative number: {{-val | number:4}} +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example53/index-production.html b/1.3.0-rc.2/docs/examples/example-example53/index-production.html new file mode 100644 index 0000000000..408daba627 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example53/index-production.html @@ -0,0 +1,27 @@ + + + + + Example - example-example53-production + + + + + + + + + +
+ Enter number:
+ Default formatting: {{val | number}}
+ No fractions: {{val | number:0}}
+ Negative number: {{-val | number:4}} +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example53/index.html b/1.3.0-rc.2/docs/examples/example-example53/index.html new file mode 100644 index 0000000000..f2197af00e --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example53/index.html @@ -0,0 +1,27 @@ + + + + + Example - example-example53 + + + + + + + + + +
+ Enter number:
+ Default formatting: {{val | number}}
+ No fractions: {{val | number:0}}
+ Negative number: {{-val | number:4}} +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example53/manifest.json b/1.3.0-rc.2/docs/examples/example-example53/manifest.json new file mode 100644 index 0000000000..f8f469763c --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example53/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example53", + "files": [ + "index-production.html", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example53/protractor.js b/1.3.0-rc.2/docs/examples/example-example53/protractor.js new file mode 100644 index 0000000000..167435649d --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example53/protractor.js @@ -0,0 +1,13 @@ + it('should format numbers', function() { + expect(element(by.id('number-default')).getText()).toBe('1,234.568'); + expect(element(by.binding('val | number:0')).getText()).toBe('1,235'); + expect(element(by.binding('-val | number:4')).getText()).toBe('-1,234.5679'); + }); + + it('should update', function() { + element(by.model('val')).clear(); + element(by.model('val')).sendKeys('3374.333'); + expect(element(by.id('number-default')).getText()).toBe('3,374.333'); + expect(element(by.binding('val | number:0')).getText()).toBe('3,374'); + expect(element(by.binding('-val | number:4')).getText()).toBe('-3,374.3330'); + }); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example54/index-debug.html b/1.3.0-rc.2/docs/examples/example-example54/index-debug.html new file mode 100644 index 0000000000..2b121d25d1 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example54/index-debug.html @@ -0,0 +1,23 @@ + + + + + Example - example-example54-debug + + + + + + + + + {{1288323623006 | date:'medium'}}: + {{1288323623006 | date:'medium'}}
+ {{1288323623006 | date:'yyyy-MM-dd HH:mm:ss Z'}}: + {{1288323623006 | date:'yyyy-MM-dd HH:mm:ss Z'}}
+ {{1288323623006 | date:'MM/dd/yyyy @ h:mma'}}: + {{'1288323623006' | date:'MM/dd/yyyy @ h:mma'}}
+ {{1288323623006 | date:"MM/dd/yyyy 'at' h:mma"}}: + {{'1288323623006' | date:"MM/dd/yyyy 'at' h:mma"}}
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example54/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example54/index-jquery.html new file mode 100644 index 0000000000..9d84518e7f --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example54/index-jquery.html @@ -0,0 +1,24 @@ + + + + + Example - example-example54-jquery + + + + + + + + + + {{1288323623006 | date:'medium'}}: + {{1288323623006 | date:'medium'}}
+ {{1288323623006 | date:'yyyy-MM-dd HH:mm:ss Z'}}: + {{1288323623006 | date:'yyyy-MM-dd HH:mm:ss Z'}}
+ {{1288323623006 | date:'MM/dd/yyyy @ h:mma'}}: + {{'1288323623006' | date:'MM/dd/yyyy @ h:mma'}}
+ {{1288323623006 | date:"MM/dd/yyyy 'at' h:mma"}}: + {{'1288323623006' | date:"MM/dd/yyyy 'at' h:mma"}}
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example54/index-production.html b/1.3.0-rc.2/docs/examples/example-example54/index-production.html new file mode 100644 index 0000000000..7ea17181cb --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example54/index-production.html @@ -0,0 +1,23 @@ + + + + + Example - example-example54-production + + + + + + + + + {{1288323623006 | date:'medium'}}: + {{1288323623006 | date:'medium'}}
+ {{1288323623006 | date:'yyyy-MM-dd HH:mm:ss Z'}}: + {{1288323623006 | date:'yyyy-MM-dd HH:mm:ss Z'}}
+ {{1288323623006 | date:'MM/dd/yyyy @ h:mma'}}: + {{'1288323623006' | date:'MM/dd/yyyy @ h:mma'}}
+ {{1288323623006 | date:"MM/dd/yyyy 'at' h:mma"}}: + {{'1288323623006' | date:"MM/dd/yyyy 'at' h:mma"}}
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example54/index.html b/1.3.0-rc.2/docs/examples/example-example54/index.html new file mode 100644 index 0000000000..4285326839 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example54/index.html @@ -0,0 +1,23 @@ + + + + + Example - example-example54 + + + + + + + + + {{1288323623006 | date:'medium'}}: + {{1288323623006 | date:'medium'}}
+ {{1288323623006 | date:'yyyy-MM-dd HH:mm:ss Z'}}: + {{1288323623006 | date:'yyyy-MM-dd HH:mm:ss Z'}}
+ {{1288323623006 | date:'MM/dd/yyyy @ h:mma'}}: + {{'1288323623006' | date:'MM/dd/yyyy @ h:mma'}}
+ {{1288323623006 | date:"MM/dd/yyyy 'at' h:mma"}}: + {{'1288323623006' | date:"MM/dd/yyyy 'at' h:mma"}}
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example54/manifest.json b/1.3.0-rc.2/docs/examples/example-example54/manifest.json new file mode 100644 index 0000000000..622adc4325 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example54/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example54", + "files": [ + "index-production.html", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example54/protractor.js b/1.3.0-rc.2/docs/examples/example-example54/protractor.js new file mode 100644 index 0000000000..4d2d2a2cca --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example54/protractor.js @@ -0,0 +1,10 @@ + it('should format date', function() { + expect(element(by.binding("1288323623006 | date:'medium'")).getText()). + toMatch(/Oct 2\d, 2010 \d{1,2}:\d{2}:\d{2} (AM|PM)/); + expect(element(by.binding("1288323623006 | date:'yyyy-MM-dd HH:mm:ss Z'")).getText()). + toMatch(/2010\-10\-2\d \d{2}:\d{2}:\d{2} (\-|\+)?\d{4}/); + expect(element(by.binding("'1288323623006' | date:'MM/dd/yyyy @ h:mma'")).getText()). + toMatch(/10\/2\d\/2010 @ \d{1,2}:\d{2}(AM|PM)/); + expect(element(by.binding("'1288323623006' | date:\"MM/dd/yyyy 'at' h:mma\"")).getText()). + toMatch(/10\/2\d\/2010 at \d{1,2}:\d{2}(AM|PM)/); + }); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example55/index-debug.html b/1.3.0-rc.2/docs/examples/example-example55/index-debug.html new file mode 100644 index 0000000000..239353f807 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example55/index-debug.html @@ -0,0 +1,16 @@ + + + + + Example - example-example55-debug + + + + + + + + +
{{ {'name':'value'} | json }}
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example55/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example55/index-jquery.html new file mode 100644 index 0000000000..dfef4d56c7 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example55/index-jquery.html @@ -0,0 +1,17 @@ + + + + + Example - example-example55-jquery + + + + + + + + + +
{{ {'name':'value'} | json }}
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example55/index-production.html b/1.3.0-rc.2/docs/examples/example-example55/index-production.html new file mode 100644 index 0000000000..036b6750b3 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example55/index-production.html @@ -0,0 +1,16 @@ + + + + + Example - example-example55-production + + + + + + + + +
{{ {'name':'value'} | json }}
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example55/index.html b/1.3.0-rc.2/docs/examples/example-example55/index.html new file mode 100644 index 0000000000..e889bbb5db --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example55/index.html @@ -0,0 +1,16 @@ + + + + + Example - example-example55 + + + + + + + + +
{{ {'name':'value'} | json }}
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example55/manifest.json b/1.3.0-rc.2/docs/examples/example-example55/manifest.json new file mode 100644 index 0000000000..faf2f32099 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example55/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example55", + "files": [ + "index-production.html", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example55/protractor.js b/1.3.0-rc.2/docs/examples/example-example55/protractor.js new file mode 100644 index 0000000000..b4f5b33fda --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example55/protractor.js @@ -0,0 +1,3 @@ + it('should jsonify filtered objects', function() { + expect(element(by.binding("{'name':'value'}")).getText()).toMatch(/\{\n "name": ?"value"\n}/); + }); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example56/index-debug.html b/1.3.0-rc.2/docs/examples/example-example56/index-debug.html new file mode 100644 index 0000000000..e9b7031cb2 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example56/index-debug.html @@ -0,0 +1,34 @@ + + + + + Example - example-example56-debug + + + + + + + + + +
+ Limit {{numbers}} to: +

Output numbers: {{ numbers | limitTo:numLimit }}

+ Limit {{letters}} to: +

Output letters: {{ letters | limitTo:letterLimit }}

+ Limit {{longNumber}} to: +

Output long number: {{ longNumber | limitTo:longNumberLimit }}

+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example56/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example56/index-jquery.html new file mode 100644 index 0000000000..06e1c66caf --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example56/index-jquery.html @@ -0,0 +1,35 @@ + + + + + Example - example-example56-jquery + + + + + + + + + + +
+ Limit {{numbers}} to: +

Output numbers: {{ numbers | limitTo:numLimit }}

+ Limit {{letters}} to: +

Output letters: {{ letters | limitTo:letterLimit }}

+ Limit {{longNumber}} to: +

Output long number: {{ longNumber | limitTo:longNumberLimit }}

+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example56/index-production.html b/1.3.0-rc.2/docs/examples/example-example56/index-production.html new file mode 100644 index 0000000000..4b15bc0f11 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example56/index-production.html @@ -0,0 +1,34 @@ + + + + + Example - example-example56-production + + + + + + + + + +
+ Limit {{numbers}} to: +

Output numbers: {{ numbers | limitTo:numLimit }}

+ Limit {{letters}} to: +

Output letters: {{ letters | limitTo:letterLimit }}

+ Limit {{longNumber}} to: +

Output long number: {{ longNumber | limitTo:longNumberLimit }}

+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example56/index.html b/1.3.0-rc.2/docs/examples/example-example56/index.html new file mode 100644 index 0000000000..a054890be6 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example56/index.html @@ -0,0 +1,34 @@ + + + + + Example - example-example56 + + + + + + + + + +
+ Limit {{numbers}} to: +

Output numbers: {{ numbers | limitTo:numLimit }}

+ Limit {{letters}} to: +

Output letters: {{ letters | limitTo:letterLimit }}

+ Limit {{longNumber}} to: +

Output long number: {{ longNumber | limitTo:longNumberLimit }}

+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example56/manifest.json b/1.3.0-rc.2/docs/examples/example-example56/manifest.json new file mode 100644 index 0000000000..883ac7d8f3 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example56/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example56", + "files": [ + "index-production.html", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example56/protractor.js b/1.3.0-rc.2/docs/examples/example-example56/protractor.js new file mode 100644 index 0000000000..41fcff425b --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example56/protractor.js @@ -0,0 +1,39 @@ + var numLimitInput = element(by.model('numLimit')); + var letterLimitInput = element(by.model('letterLimit')); + var longNumberLimitInput = element(by.model('longNumberLimit')); + var limitedNumbers = element(by.binding('numbers | limitTo:numLimit')); + var limitedLetters = element(by.binding('letters | limitTo:letterLimit')); + var limitedLongNumber = element(by.binding('longNumber | limitTo:longNumberLimit')); + + it('should limit the number array to first three items', function() { + expect(numLimitInput.getAttribute('value')).toBe('3'); + expect(letterLimitInput.getAttribute('value')).toBe('3'); + expect(longNumberLimitInput.getAttribute('value')).toBe('3'); + expect(limitedNumbers.getText()).toEqual('Output numbers: [1,2,3]'); + expect(limitedLetters.getText()).toEqual('Output letters: abc'); + expect(limitedLongNumber.getText()).toEqual('Output long number: 234'); + }); + + it('should update the output when -3 is entered', function() { + numLimitInput.clear(); + numLimitInput.sendKeys('-3'); + letterLimitInput.clear(); + letterLimitInput.sendKeys('-3'); + longNumberLimitInput.clear(); + longNumberLimitInput.sendKeys('-3'); + expect(limitedNumbers.getText()).toEqual('Output numbers: [7,8,9]'); + expect(limitedLetters.getText()).toEqual('Output letters: ghi'); + expect(limitedLongNumber.getText()).toEqual('Output long number: 342'); + }); + + it('should not exceed the maximum size of input array', function() { + numLimitInput.clear(); + numLimitInput.sendKeys('100'); + letterLimitInput.clear(); + letterLimitInput.sendKeys('100'); + longNumberLimitInput.clear(); + longNumberLimitInput.sendKeys('100'); + expect(limitedNumbers.getText()).toEqual('Output numbers: [1,2,3,4,5,6,7,8,9]'); + expect(limitedLetters.getText()).toEqual('Output letters: abcdefghi'); + expect(limitedLongNumber.getText()).toEqual('Output long number: 2345432342'); + }); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example57/index-debug.html b/1.3.0-rc.2/docs/examples/example-example57/index-debug.html new file mode 100644 index 0000000000..9cff5257e2 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example57/index-debug.html @@ -0,0 +1,45 @@ + + + + + Example - example-example57-debug + + + + + + + + + +
+
Sorting predicate = {{predicate}}; reverse = {{reverse}}
+
+ [ unsorted ] + + + + + + + + + + + +
Name + (^)Phone NumberAge
{{friend.name}}{{friend.phone}}{{friend.age}}
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example57/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example57/index-jquery.html new file mode 100644 index 0000000000..fcf19fbd19 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example57/index-jquery.html @@ -0,0 +1,46 @@ + + + + + Example - example-example57-jquery + + + + + + + + + + +
+
Sorting predicate = {{predicate}}; reverse = {{reverse}}
+
+ [ unsorted ] + + + + + + + + + + + +
Name + (^)Phone NumberAge
{{friend.name}}{{friend.phone}}{{friend.age}}
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example57/index-production.html b/1.3.0-rc.2/docs/examples/example-example57/index-production.html new file mode 100644 index 0000000000..d10c679f93 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example57/index-production.html @@ -0,0 +1,45 @@ + + + + + Example - example-example57-production + + + + + + + + + +
+
Sorting predicate = {{predicate}}; reverse = {{reverse}}
+
+ [ unsorted ] + + + + + + + + + + + +
Name + (^)Phone NumberAge
{{friend.name}}{{friend.phone}}{{friend.age}}
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example57/index.html b/1.3.0-rc.2/docs/examples/example-example57/index.html new file mode 100644 index 0000000000..3fd7ca5d1c --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example57/index.html @@ -0,0 +1,45 @@ + + + + + Example - example-example57 + + + + + + + + + +
+
Sorting predicate = {{predicate}}; reverse = {{reverse}}
+
+ [ unsorted ] + + + + + + + + + + + +
Name + (^)Phone NumberAge
{{friend.name}}{{friend.phone}}{{friend.age}}
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example57/manifest.json b/1.3.0-rc.2/docs/examples/example-example57/manifest.json new file mode 100644 index 0000000000..d3b7b0e61e --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example57/manifest.json @@ -0,0 +1,6 @@ +{ + "name": "example-example57", + "files": [ + "index-production.html" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example58/index-debug.html b/1.3.0-rc.2/docs/examples/example-example58/index-debug.html new file mode 100644 index 0000000000..5b02e54b44 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example58/index-debug.html @@ -0,0 +1,31 @@ + + + + + Example - example-example58-debug + + + + + + + + + +
+ + + + + + + + + + + +
Name + (^)Phone NumberAge
{{friend.name}}{{friend.phone}}{{friend.age}}
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example58/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example58/index-jquery.html new file mode 100644 index 0000000000..a2b45398dd --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example58/index-jquery.html @@ -0,0 +1,32 @@ + + + + + Example - example-example58-jquery + + + + + + + + + + +
+ + + + + + + + + + + +
Name + (^)Phone NumberAge
{{friend.name}}{{friend.phone}}{{friend.age}}
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example58/index-production.html b/1.3.0-rc.2/docs/examples/example-example58/index-production.html new file mode 100644 index 0000000000..6ded19c563 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example58/index-production.html @@ -0,0 +1,31 @@ + + + + + Example - example-example58-production + + + + + + + + + +
+ + + + + + + + + + + +
Name + (^)Phone NumberAge
{{friend.name}}{{friend.phone}}{{friend.age}}
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example58/index.html b/1.3.0-rc.2/docs/examples/example-example58/index.html new file mode 100644 index 0000000000..faf84fcc25 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example58/index.html @@ -0,0 +1,31 @@ + + + + + Example - example-example58 + + + + + + + + + +
+ + + + + + + + + + + +
Name + (^)Phone NumberAge
{{friend.name}}{{friend.phone}}{{friend.age}}
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example58/manifest.json b/1.3.0-rc.2/docs/examples/example-example58/manifest.json new file mode 100644 index 0000000000..d9f3c170af --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example58/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example58", + "files": [ + "index-production.html", + "script.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example58/script.js b/1.3.0-rc.2/docs/examples/example-example58/script.js new file mode 100644 index 0000000000..697fab5052 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example58/script.js @@ -0,0 +1,15 @@ + angular.module('orderByExample', []) + .controller('ExampleController', ['$scope', '$filter', function($scope, $filter) { + var orderBy = $filter('orderBy'); + $scope.friends = [ + { name: 'John', phone: '555-1212', age: 10 }, + { name: 'Mary', phone: '555-9876', age: 19 }, + { name: 'Mike', phone: '555-4321', age: 21 }, + { name: 'Adam', phone: '555-5678', age: 35 }, + { name: 'Julie', phone: '555-8765', age: 29 } + ]; + $scope.order = function(predicate, reverse) { + $scope.friends = orderBy($scope.friends, predicate, reverse); + }; + $scope.order('-age',false); + }]); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example59/http-hello.html b/1.3.0-rc.2/docs/examples/example-example59/http-hello.html new file mode 100644 index 0000000000..7b24164aa1 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example59/http-hello.html @@ -0,0 +1 @@ +Hello, $http! \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example59/index-debug.html b/1.3.0-rc.2/docs/examples/example-example59/index-debug.html new file mode 100644 index 0000000000..cf3d5cbd68 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example59/index-debug.html @@ -0,0 +1,36 @@ + + + + + Example - example-example59-debug + + + + + + + + + +
+ + +
+ + + +
http status code: {{status}}
+
http response data: {{data}}
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example59/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example59/index-jquery.html new file mode 100644 index 0000000000..de42034bc4 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example59/index-jquery.html @@ -0,0 +1,37 @@ + + + + + Example - example-example59-jquery + + + + + + + + + + +
+ + +
+ + + +
http status code: {{status}}
+
http response data: {{data}}
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example59/index-production.html b/1.3.0-rc.2/docs/examples/example-example59/index-production.html new file mode 100644 index 0000000000..1ac229ca7d --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example59/index-production.html @@ -0,0 +1,36 @@ + + + + + Example - example-example59-production + + + + + + + + + +
+ + +
+ + + +
http status code: {{status}}
+
http response data: {{data}}
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example59/index.html b/1.3.0-rc.2/docs/examples/example-example59/index.html new file mode 100644 index 0000000000..bf6892cb47 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example59/index.html @@ -0,0 +1,36 @@ + + + + + Example - example-example59 + + + + + + + + + +
+ + +
+ + + +
http status code: {{status}}
+
http response data: {{data}}
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example59/manifest.json b/1.3.0-rc.2/docs/examples/example-example59/manifest.json new file mode 100644 index 0000000000..b1f9c2c21a --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example59/manifest.json @@ -0,0 +1,9 @@ +{ + "name": "example-example59", + "files": [ + "index-production.html", + "script.js", + "http-hello.html", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example59/protractor.js b/1.3.0-rc.2/docs/examples/example-example59/protractor.js new file mode 100644 index 0000000000..60aa1f5a31 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example59/protractor.js @@ -0,0 +1,28 @@ +var status = element(by.binding('status')); +var data = element(by.binding('data')); +var fetchBtn = element(by.id('fetchbtn')); +var sampleGetBtn = element(by.id('samplegetbtn')); +var sampleJsonpBtn = element(by.id('samplejsonpbtn')); +var invalidJsonpBtn = element(by.id('invalidjsonpbtn')); + +it('should make an xhr GET request', function() { + sampleGetBtn.click(); + fetchBtn.click(); + expect(status.getText()).toMatch('200'); + expect(data.getText()).toMatch(/Hello, \$http!/); +}); + +it('should make a JSONP request to angularjs.org', function() { + sampleJsonpBtn.click(); + fetchBtn.click(); + expect(status.getText()).toMatch('200'); + expect(data.getText()).toMatch(/Super Hero!/); +}); + +it('should make JSONP request to invalid URL and invoke the error handler', + function() { + invalidJsonpBtn.click(); + fetchBtn.click(); + expect(status.getText()).toMatch('0'); + expect(data.getText()).toMatch('Request failed'); +}); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example59/script.js b/1.3.0-rc.2/docs/examples/example-example59/script.js new file mode 100644 index 0000000000..7194e6e5ea --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example59/script.js @@ -0,0 +1,26 @@ +angular.module('httpExample', []) + .controller('FetchController', ['$scope', '$http', '$templateCache', + function($scope, $http, $templateCache) { + $scope.method = 'GET'; + $scope.url = 'http-hello.html'; + + $scope.fetch = function() { + $scope.code = null; + $scope.response = null; + + $http({method: $scope.method, url: $scope.url, cache: $templateCache}). + success(function(data, status) { + $scope.status = status; + $scope.data = data; + }). + error(function(data, status) { + $scope.data = data || "Request failed"; + $scope.status = status; + }); + }; + + $scope.updateModel = function(method, url) { + $scope.method = method; + $scope.url = url; + }; + }]); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example6/index-debug.html b/1.3.0-rc.2/docs/examples/example-example6/index-debug.html new file mode 100644 index 0000000000..8f88289cb3 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example6/index-debug.html @@ -0,0 +1,22 @@ + + + + + Example - example-example6-debug + + + + + + + + +
+ link 1 (link, don't reload)
+ link 2 (link, don't reload)
+ link 3 (link, reload!)
+ anchor (link, don't reload)
+ anchor (no link)
+ link (link, change location) + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example6/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example6/index-jquery.html new file mode 100644 index 0000000000..95852f76e2 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example6/index-jquery.html @@ -0,0 +1,23 @@ + + + + + Example - example-example6-jquery + + + + + + + + + +
+ link 1 (link, don't reload)
+ link 2 (link, don't reload)
+ link 3 (link, reload!)
+ anchor (link, don't reload)
+ anchor (no link)
+ link (link, change location) + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example6/index-production.html b/1.3.0-rc.2/docs/examples/example-example6/index-production.html new file mode 100644 index 0000000000..39ddaf423a --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example6/index-production.html @@ -0,0 +1,22 @@ + + + + + Example - example-example6-production + + + + + + + + +
+ link 1 (link, don't reload)
+ link 2 (link, don't reload)
+ link 3 (link, reload!)
+ anchor (link, don't reload)
+ anchor (no link)
+ link (link, change location) + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example6/index.html b/1.3.0-rc.2/docs/examples/example-example6/index.html new file mode 100644 index 0000000000..1d526128c0 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example6/index.html @@ -0,0 +1,22 @@ + + + + + Example - example-example6 + + + + + + + + +
+ link 1 (link, don't reload)
+ link 2 (link, don't reload)
+ link 3 (link, reload!)
+ anchor (link, don't reload)
+ anchor (no link)
+ link (link, change location) + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example6/manifest.json b/1.3.0-rc.2/docs/examples/example-example6/manifest.json new file mode 100644 index 0000000000..a341d49f13 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example6/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example6", + "files": [ + "index-production.html", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example6/protractor.js b/1.3.0-rc.2/docs/examples/example-example6/protractor.js new file mode 100644 index 0000000000..bc0baf6ec3 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example6/protractor.js @@ -0,0 +1,54 @@ + it('should execute ng-click but not reload when href without value', function() { + element(by.id('link-1')).click(); + expect(element(by.model('value')).getAttribute('value')).toEqual('1'); + expect(element(by.id('link-1')).getAttribute('href')).toBe(''); + }); + + it('should execute ng-click but not reload when href empty string', function() { + element(by.id('link-2')).click(); + expect(element(by.model('value')).getAttribute('value')).toEqual('2'); + expect(element(by.id('link-2')).getAttribute('href')).toBe(''); + }); + + it('should execute ng-click and change url when ng-href specified', function() { + expect(element(by.id('link-3')).getAttribute('href')).toMatch(/\/123$/); + + element(by.id('link-3')).click(); + + // At this point, we navigate away from an Angular page, so we need + // to use browser.driver to get the base webdriver. + + browser.wait(function() { + return browser.driver.getCurrentUrl().then(function(url) { + return url.match(/\/123$/); + }); + }, 5000, 'page should navigate to /123'); + }); + + xit('should execute ng-click but not reload when href empty string and name specified', function() { + element(by.id('link-4')).click(); + expect(element(by.model('value')).getAttribute('value')).toEqual('4'); + expect(element(by.id('link-4')).getAttribute('href')).toBe(''); + }); + + it('should execute ng-click but not reload when no href but name specified', function() { + element(by.id('link-5')).click(); + expect(element(by.model('value')).getAttribute('value')).toEqual('5'); + expect(element(by.id('link-5')).getAttribute('href')).toBe(null); + }); + + it('should only change url when only ng-href', function() { + element(by.model('value')).clear(); + element(by.model('value')).sendKeys('6'); + expect(element(by.id('link-6')).getAttribute('href')).toMatch(/\/6$/); + + element(by.id('link-6')).click(); + + // At this point, we navigate away from an Angular page, so we need + // to use browser.driver to get the base webdriver. + browser.wait(function() { + return browser.driver.getCurrentUrl().then(function(url) { + return url.match(/\/6$/); + }); + }, 5000, 'page should navigate to /6'); + }); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example60/index-debug.html b/1.3.0-rc.2/docs/examples/example-example60/index-debug.html new file mode 100644 index 0000000000..430567487a --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example60/index-debug.html @@ -0,0 +1,31 @@ + + + + + Example - example-example60-debug + + + + + + + + + +
+ //demo.label// +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example60/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example60/index-jquery.html new file mode 100644 index 0000000000..f4dc77d6a4 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example60/index-jquery.html @@ -0,0 +1,32 @@ + + + + + Example - example-example60-jquery + + + + + + + + + + +
+ //demo.label// +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example60/index-production.html b/1.3.0-rc.2/docs/examples/example-example60/index-production.html new file mode 100644 index 0000000000..8ad484e0a8 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example60/index-production.html @@ -0,0 +1,31 @@ + + + + + Example - example-example60-production + + + + + + + + + +
+ //demo.label// +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example60/index.html b/1.3.0-rc.2/docs/examples/example-example60/index.html new file mode 100644 index 0000000000..fd2c180a78 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example60/index.html @@ -0,0 +1,31 @@ + + + + + Example - example-example60 + + + + + + + + + +
+ //demo.label// +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example60/manifest.json b/1.3.0-rc.2/docs/examples/example-example60/manifest.json new file mode 100644 index 0000000000..c41e550b73 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example60/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example60", + "files": [ + "index-production.html", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example60/protractor.js b/1.3.0-rc.2/docs/examples/example-example60/protractor.js new file mode 100644 index 0000000000..088c6693da --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example60/protractor.js @@ -0,0 +1,3 @@ +it('should interpolate binding with custom symbols', function() { + expect(element(by.binding('demo.label')).getText()).toBe('This binding is brought you by // interpolation symbols.'); +}); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example61/index-debug.html b/1.3.0-rc.2/docs/examples/example-example61/index-debug.html new file mode 100644 index 0000000000..27f4549c42 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example61/index-debug.html @@ -0,0 +1,25 @@ + + + + + Example - example-example61-debug + + + + + + + + +
+

{{apptitle}}: \{\{ username = "defaced value"; \}\} +

+

{{username}} attempts to inject code which will deface the + application, but fails to accomplish their task, because the server has correctly + escaped the interpolation start/end markers with REVERSE SOLIDUS U+005C (backslash) + characters.

+

Instead, the result of the attempted script injection is visible, and can be removed + from the database by an administrator.

+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example61/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example61/index-jquery.html new file mode 100644 index 0000000000..34c1e765a0 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example61/index-jquery.html @@ -0,0 +1,26 @@ + + + + + Example - example-example61-jquery + + + + + + + + + +
+

{{apptitle}}: \{\{ username = "defaced value"; \}\} +

+

{{username}} attempts to inject code which will deface the + application, but fails to accomplish their task, because the server has correctly + escaped the interpolation start/end markers with REVERSE SOLIDUS U+005C (backslash) + characters.

+

Instead, the result of the attempted script injection is visible, and can be removed + from the database by an administrator.

+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example61/index-production.html b/1.3.0-rc.2/docs/examples/example-example61/index-production.html new file mode 100644 index 0000000000..6a3a236a68 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example61/index-production.html @@ -0,0 +1,25 @@ + + + + + Example - example-example61-production + + + + + + + + +
+

{{apptitle}}: \{\{ username = "defaced value"; \}\} +

+

{{username}} attempts to inject code which will deface the + application, but fails to accomplish their task, because the server has correctly + escaped the interpolation start/end markers with REVERSE SOLIDUS U+005C (backslash) + characters.

+

Instead, the result of the attempted script injection is visible, and can be removed + from the database by an administrator.

+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example61/index.html b/1.3.0-rc.2/docs/examples/example-example61/index.html new file mode 100644 index 0000000000..ec37807298 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example61/index.html @@ -0,0 +1,25 @@ + + + + + Example - example-example61 + + + + + + + + +
+

{{apptitle}}: \{\{ username = "defaced value"; \}\} +

+

{{username}} attempts to inject code which will deface the + application, but fails to accomplish their task, because the server has correctly + escaped the interpolation start/end markers with REVERSE SOLIDUS U+005C (backslash) + characters.

+

Instead, the result of the attempted script injection is visible, and can be removed + from the database by an administrator.

+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example61/manifest.json b/1.3.0-rc.2/docs/examples/example-example61/manifest.json new file mode 100644 index 0000000000..e453dc5ede --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example61/manifest.json @@ -0,0 +1,6 @@ +{ + "name": "example-example61", + "files": [ + "index-production.html" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example62/index-debug.html b/1.3.0-rc.2/docs/examples/example-example62/index-debug.html new file mode 100644 index 0000000000..c6e44d3eb6 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example62/index-debug.html @@ -0,0 +1,98 @@ + + + + + Example - example-example62-debug + + + + + + + + + + +
+
+ Date format:
+ Current time is: +
+ Blood 1 : {{blood_1}} + Blood 2 : {{blood_2}} + + + +
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example62/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example62/index-jquery.html new file mode 100644 index 0000000000..c7148014b4 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example62/index-jquery.html @@ -0,0 +1,99 @@ + + + + + Example - example-example62-jquery + + + + + + + + + + + +
+
+ Date format:
+ Current time is: +
+ Blood 1 : {{blood_1}} + Blood 2 : {{blood_2}} + + + +
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example62/index-production.html b/1.3.0-rc.2/docs/examples/example-example62/index-production.html new file mode 100644 index 0000000000..f86f817b66 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example62/index-production.html @@ -0,0 +1,98 @@ + + + + + Example - example-example62-production + + + + + + + + + + +
+
+ Date format:
+ Current time is: +
+ Blood 1 : {{blood_1}} + Blood 2 : {{blood_2}} + + + +
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example62/index.html b/1.3.0-rc.2/docs/examples/example-example62/index.html new file mode 100644 index 0000000000..e50b436e70 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example62/index.html @@ -0,0 +1,98 @@ + + + + + Example - example-example62 + + + + + + + + + + +
+
+ Date format:
+ Current time is: +
+ Blood 1 : {{blood_1}} + Blood 2 : {{blood_2}} + + + +
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example62/manifest.json b/1.3.0-rc.2/docs/examples/example-example62/manifest.json new file mode 100644 index 0000000000..8e491fc3cd --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example62/manifest.json @@ -0,0 +1,6 @@ +{ + "name": "example-example62", + "files": [ + "index-production.html" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example63/index-debug.html b/1.3.0-rc.2/docs/examples/example-example63/index-debug.html new file mode 100644 index 0000000000..6e3c2d1236 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example63/index-debug.html @@ -0,0 +1,25 @@ + + + + + Example - example-example63-debug + + + + + + + + + +
+

Reload this page with open console, enter text and hit the log button...

+ Message: + + + + + +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example63/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example63/index-jquery.html new file mode 100644 index 0000000000..c87c260095 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example63/index-jquery.html @@ -0,0 +1,26 @@ + + + + + Example - example-example63-jquery + + + + + + + + + + +
+

Reload this page with open console, enter text and hit the log button...

+ Message: + + + + + +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example63/index-production.html b/1.3.0-rc.2/docs/examples/example-example63/index-production.html new file mode 100644 index 0000000000..62deea0695 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example63/index-production.html @@ -0,0 +1,25 @@ + + + + + Example - example-example63-production + + + + + + + + + +
+

Reload this page with open console, enter text and hit the log button...

+ Message: + + + + + +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example63/index.html b/1.3.0-rc.2/docs/examples/example-example63/index.html new file mode 100644 index 0000000000..f0b1332413 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example63/index.html @@ -0,0 +1,25 @@ + + + + + Example - example-example63 + + + + + + + + + +
+

Reload this page with open console, enter text and hit the log button...

+ Message: + + + + + +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example63/manifest.json b/1.3.0-rc.2/docs/examples/example-example63/manifest.json new file mode 100644 index 0000000000..17fa2ea97f --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example63/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example63", + "files": [ + "index-production.html", + "script.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example63/script.js b/1.3.0-rc.2/docs/examples/example-example63/script.js new file mode 100644 index 0000000000..10d06307c4 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example63/script.js @@ -0,0 +1,5 @@ + angular.module('logExample', []) + .controller('LogController', ['$scope', '$log', function($scope, $log) { + $scope.$log = $log; + $scope.message = 'Hello World!'; + }]); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example64/index-debug.html b/1.3.0-rc.2/docs/examples/example-example64/index-debug.html new file mode 100644 index 0000000000..6e1786cbed --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example64/index-debug.html @@ -0,0 +1,31 @@ + + + + + Example - example-example64-debug + + + + + + + + + + +
+

+ User comments
+ By default, HTML that isn't explicitly trusted (e.g. Alice's comment) is sanitized when + $sanitize is available. If $sanitize isn't available, this results in an error instead of an + exploit. +
+
+ {{userComment.name}}: + +
+
+
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example64/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example64/index-jquery.html new file mode 100644 index 0000000000..741d19fe5b --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example64/index-jquery.html @@ -0,0 +1,32 @@ + + + + + Example - example-example64-jquery + + + + + + + + + + + +
+

+ User comments
+ By default, HTML that isn't explicitly trusted (e.g. Alice's comment) is sanitized when + $sanitize is available. If $sanitize isn't available, this results in an error instead of an + exploit. +
+
+ {{userComment.name}}: + +
+
+
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example64/index-production.html b/1.3.0-rc.2/docs/examples/example-example64/index-production.html new file mode 100644 index 0000000000..3c6a8ad188 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example64/index-production.html @@ -0,0 +1,31 @@ + + + + + Example - example-example64-production + + + + + + + + + + +
+

+ User comments
+ By default, HTML that isn't explicitly trusted (e.g. Alice's comment) is sanitized when + $sanitize is available. If $sanitize isn't available, this results in an error instead of an + exploit. +
+
+ {{userComment.name}}: + +
+
+
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example64/index.html b/1.3.0-rc.2/docs/examples/example-example64/index.html new file mode 100644 index 0000000000..e9013ffafc --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example64/index.html @@ -0,0 +1,31 @@ + + + + + Example - example-example64 + + + + + + + + + + +
+

+ User comments
+ By default, HTML that isn't explicitly trusted (e.g. Alice's comment) is sanitized when + $sanitize is available. If $sanitize isn't available, this results in an error instead of an + exploit. +
+
+ {{userComment.name}}: + +
+
+
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example64/manifest.json b/1.3.0-rc.2/docs/examples/example-example64/manifest.json new file mode 100644 index 0000000000..738c3be308 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example64/manifest.json @@ -0,0 +1,9 @@ +{ + "name": "example-example64", + "files": [ + "index-production.html", + "script.js", + "test_data.json", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example64/protractor.js b/1.3.0-rc.2/docs/examples/example-example64/protractor.js new file mode 100644 index 0000000000..2fea13e447 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example64/protractor.js @@ -0,0 +1,12 @@ +describe('SCE doc demo', function() { + it('should sanitize untrusted values', function() { + expect(element.all(by.css('.htmlComment')).first().getInnerHtml()) + .toBe('Is anyone reading this?'); + }); + + it('should NOT sanitize explicitly trusted values', function() { + expect(element(by.id('explicitlyTrustedHtml')).getInnerHtml()).toBe( + 'Hover over this text.'); + }); +}); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example64/script.js b/1.3.0-rc.2/docs/examples/example-example64/script.js new file mode 100644 index 0000000000..df4d91062b --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example64/script.js @@ -0,0 +1,11 @@ +angular.module('mySceApp', ['ngSanitize']) + .controller('AppController', ['$http', '$templateCache', '$sce', + function($http, $templateCache, $sce) { + var self = this; + $http.get("test_data.json", {cache: $templateCache}).success(function(userComments) { + self.userComments = userComments; + }); + self.explicitlyTrustedHtml = $sce.trustAsHtml( + 'Hover over this text.'); + }]); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example64/test_data.json b/1.3.0-rc.2/docs/examples/example-example64/test_data.json new file mode 100644 index 0000000000..e086b707e3 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example64/test_data.json @@ -0,0 +1,9 @@ +[ + { "name": "Alice", + "htmlComment": + "Is anyone reading this?" + }, + { "name": "Bob", + "htmlComment": "Yes! Am I the only other one?" + } +] \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example65/index-debug.html b/1.3.0-rc.2/docs/examples/example-example65/index-debug.html new file mode 100644 index 0000000000..770e4de5f0 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example65/index-debug.html @@ -0,0 +1,28 @@ + + + + + Example - example-example65-debug + + + + + + + + + +
+ + +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example65/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example65/index-jquery.html new file mode 100644 index 0000000000..f9ca07f6c0 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example65/index-jquery.html @@ -0,0 +1,29 @@ + + + + + Example - example-example65-jquery + + + + + + + + + + +
+ + +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example65/index-production.html b/1.3.0-rc.2/docs/examples/example-example65/index-production.html new file mode 100644 index 0000000000..bf68465606 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example65/index-production.html @@ -0,0 +1,28 @@ + + + + + Example - example-example65-production + + + + + + + + + +
+ + +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example65/index.html b/1.3.0-rc.2/docs/examples/example-example65/index.html new file mode 100644 index 0000000000..357f726eaa --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example65/index.html @@ -0,0 +1,28 @@ + + + + + Example - example-example65 + + + + + + + + + +
+ + +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example65/manifest.json b/1.3.0-rc.2/docs/examples/example-example65/manifest.json new file mode 100644 index 0000000000..9211e06155 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example65/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example65", + "files": [ + "index-production.html", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example65/protractor.js b/1.3.0-rc.2/docs/examples/example-example65/protractor.js new file mode 100644 index 0000000000..112232d7cf --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example65/protractor.js @@ -0,0 +1,5 @@ + it('should display the greeting in the input box', function() { + element(by.model('greeting')).sendKeys('Hello, E2E Tests'); + // If we click the button it will block the test runner + // element(':button').click(); + }); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example66/index-debug.html b/1.3.0-rc.2/docs/examples/example-example66/index-debug.html new file mode 100644 index 0000000000..850b12d16e --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example66/index-debug.html @@ -0,0 +1,60 @@ + + + + + Example - example-example66-debug + + + + + + + + + + +
+ Snippet: + + + + + + + + + + + + + + + + + + + + + +
FilterSourceRendered
linky filter +
<div ng-bind-html="snippet | linky">
</div>
+
+
+
linky target +
<div ng-bind-html="snippetWithTarget | linky:'_blank'">
</div>
+
+
+
no filter
<div ng-bind="snippet">
</div>
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example66/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example66/index-jquery.html new file mode 100644 index 0000000000..4a66af8210 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example66/index-jquery.html @@ -0,0 +1,61 @@ + + + + + Example - example-example66-jquery + + + + + + + + + + + +
+ Snippet: + + + + + + + + + + + + + + + + + + + + + +
FilterSourceRendered
linky filter +
<div ng-bind-html="snippet | linky">
</div>
+
+
+
linky target +
<div ng-bind-html="snippetWithTarget | linky:'_blank'">
</div>
+
+
+
no filter
<div ng-bind="snippet">
</div>
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example66/index-production.html b/1.3.0-rc.2/docs/examples/example-example66/index-production.html new file mode 100644 index 0000000000..4e4dfb535b --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example66/index-production.html @@ -0,0 +1,60 @@ + + + + + Example - example-example66-production + + + + + + + + + + +
+ Snippet: + + + + + + + + + + + + + + + + + + + + + +
FilterSourceRendered
linky filter +
<div ng-bind-html="snippet | linky">
</div>
+
+
+
linky target +
<div ng-bind-html="snippetWithTarget | linky:'_blank'">
</div>
+
+
+
no filter
<div ng-bind="snippet">
</div>
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example66/index.html b/1.3.0-rc.2/docs/examples/example-example66/index.html new file mode 100644 index 0000000000..3c91dc219b --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example66/index.html @@ -0,0 +1,60 @@ + + + + + Example - example-example66 + + + + + + + + + + +
+ Snippet: + + + + + + + + + + + + + + + + + + + + + +
FilterSourceRendered
linky filter +
<div ng-bind-html="snippet | linky">
</div>
+
+
+
linky target +
<div ng-bind-html="snippetWithTarget | linky:'_blank'">
</div>
+
+
+
no filter
<div ng-bind="snippet">
</div>
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example66/manifest.json b/1.3.0-rc.2/docs/examples/example-example66/manifest.json new file mode 100644 index 0000000000..e9f018641d --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example66/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example66", + "files": [ + "index-production.html", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example66/protractor.js b/1.3.0-rc.2/docs/examples/example-example66/protractor.js new file mode 100644 index 0000000000..c6e5a68926 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example66/protractor.js @@ -0,0 +1,30 @@ + it('should linkify the snippet with urls', function() { + expect(element(by.id('linky-filter')).element(by.binding('snippet | linky')).getText()). + toBe('Pretty text with some links: http://angularjs.org/, us@somewhere.org, ' + + 'another@somewhere.org, and one more: ftp://127.0.0.1/.'); + expect(element.all(by.css('#linky-filter a')).count()).toEqual(4); + }); + + it('should not linkify snippet without the linky filter', function() { + expect(element(by.id('escaped-html')).element(by.binding('snippet')).getText()). + toBe('Pretty text with some links: http://angularjs.org/, mailto:us@somewhere.org, ' + + 'another@somewhere.org, and one more: ftp://127.0.0.1/.'); + expect(element.all(by.css('#escaped-html a')).count()).toEqual(0); + }); + + it('should update', function() { + element(by.model('snippet')).clear(); + element(by.model('snippet')).sendKeys('new http://link.'); + expect(element(by.id('linky-filter')).element(by.binding('snippet | linky')).getText()). + toBe('new http://link.'); + expect(element.all(by.css('#linky-filter a')).count()).toEqual(1); + expect(element(by.id('escaped-html')).element(by.binding('snippet')).getText()) + .toBe('new http://link.'); + }); + + it('should work with the target property', function() { + expect(element(by.id('linky-target')). + element(by.binding("snippetWithTarget | linky:'_blank'")).getText()). + toBe('http://angularjs.org/'); + expect(element(by.css('#linky-target a')).getAttribute('target')).toEqual('_blank'); + }); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example67/index-debug.html b/1.3.0-rc.2/docs/examples/example-example67/index-debug.html new file mode 100644 index 0000000000..630f354708 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example67/index-debug.html @@ -0,0 +1,60 @@ + + + + + Example - example-example67-debug + + + + + + + + + + +
+ Snippet: + + + + + + + + + + + + + + + + + + + + + + + + + +
DirectiveHowSourceRendered
ng-bind-htmlAutomatically uses $sanitize
<div ng-bind-html="snippet">
</div>
ng-bind-htmlBypass $sanitize by explicitly trusting the dangerous value +
<div ng-bind-html="deliberatelyTrustDangerousSnippet()">
+</div>
+
ng-bindAutomatically escapes
<div ng-bind="snippet">
</div>
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example67/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example67/index-jquery.html new file mode 100644 index 0000000000..5f06163597 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example67/index-jquery.html @@ -0,0 +1,61 @@ + + + + + Example - example-example67-jquery + + + + + + + + + + + +
+ Snippet: + + + + + + + + + + + + + + + + + + + + + + + + + +
DirectiveHowSourceRendered
ng-bind-htmlAutomatically uses $sanitize
<div ng-bind-html="snippet">
</div>
ng-bind-htmlBypass $sanitize by explicitly trusting the dangerous value +
<div ng-bind-html="deliberatelyTrustDangerousSnippet()">
+</div>
+
ng-bindAutomatically escapes
<div ng-bind="snippet">
</div>
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example67/index-production.html b/1.3.0-rc.2/docs/examples/example-example67/index-production.html new file mode 100644 index 0000000000..17a6c06cf8 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example67/index-production.html @@ -0,0 +1,60 @@ + + + + + Example - example-example67-production + + + + + + + + + + +
+ Snippet: + + + + + + + + + + + + + + + + + + + + + + + + + +
DirectiveHowSourceRendered
ng-bind-htmlAutomatically uses $sanitize
<div ng-bind-html="snippet">
</div>
ng-bind-htmlBypass $sanitize by explicitly trusting the dangerous value +
<div ng-bind-html="deliberatelyTrustDangerousSnippet()">
+</div>
+
ng-bindAutomatically escapes
<div ng-bind="snippet">
</div>
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example67/index.html b/1.3.0-rc.2/docs/examples/example-example67/index.html new file mode 100644 index 0000000000..78d8f2923a --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example67/index.html @@ -0,0 +1,60 @@ + + + + + Example - example-example67 + + + + + + + + + + +
+ Snippet: + + + + + + + + + + + + + + + + + + + + + + + + + +
DirectiveHowSourceRendered
ng-bind-htmlAutomatically uses $sanitize
<div ng-bind-html="snippet">
</div>
ng-bind-htmlBypass $sanitize by explicitly trusting the dangerous value +
<div ng-bind-html="deliberatelyTrustDangerousSnippet()">
+</div>
+
ng-bindAutomatically escapes
<div ng-bind="snippet">
</div>
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example67/manifest.json b/1.3.0-rc.2/docs/examples/example-example67/manifest.json new file mode 100644 index 0000000000..0ded652b12 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example67/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example67", + "files": [ + "index-production.html", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example67/protractor.js b/1.3.0-rc.2/docs/examples/example-example67/protractor.js new file mode 100644 index 0000000000..b7c6ff71f8 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example67/protractor.js @@ -0,0 +1,29 @@ + it('should sanitize the html snippet by default', function() { + expect(element(by.css('#bind-html-with-sanitize div')).getInnerHtml()). + toBe('

an html\nclick here\nsnippet

'); + }); + + it('should inline raw snippet if bound to a trusted value', function() { + expect(element(by.css('#bind-html-with-trust div')).getInnerHtml()). + toBe("

an html\n" + + "click here\n" + + "snippet

"); + }); + + it('should escape snippet without any filter', function() { + expect(element(by.css('#bind-default div')).getInnerHtml()). + toBe("<p style=\"color:blue\">an html\n" + + "<em onmouseover=\"this.textContent='PWN3D!'\">click here</em>\n" + + "snippet</p>"); + }); + + it('should update', function() { + element(by.model('snippet')).clear(); + element(by.model('snippet')).sendKeys('new text'); + expect(element(by.css('#bind-html-with-sanitize div')).getInnerHtml()). + toBe('new text'); + expect(element(by.css('#bind-html-with-trust div')).getInnerHtml()).toBe( + 'new text'); + expect(element(by.css('#bind-default div')).getInnerHtml()).toBe( + "new <b onclick=\"alert(1)\">text</b>"); + }); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example68/index-debug.html b/1.3.0-rc.2/docs/examples/example-example68/index-debug.html new file mode 100644 index 0000000000..a841c62da5 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example68/index-debug.html @@ -0,0 +1,21 @@ + + + + + Example - example-example68-debug + + + + + + + + + + + + count: {{ count }} + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example68/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example68/index-jquery.html new file mode 100644 index 0000000000..a8384a79cb --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example68/index-jquery.html @@ -0,0 +1,22 @@ + + + + + Example - example-example68-jquery + + + + + + + + + + + + + count: {{ count }} + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example68/index-production.html b/1.3.0-rc.2/docs/examples/example-example68/index-production.html new file mode 100644 index 0000000000..b6c77e3b48 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example68/index-production.html @@ -0,0 +1,21 @@ + + + + + Example - example-example68-production + + + + + + + + + + + + count: {{ count }} + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example68/index.html b/1.3.0-rc.2/docs/examples/example-example68/index.html new file mode 100644 index 0000000000..f363beda3a --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example68/index.html @@ -0,0 +1,21 @@ + + + + + Example - example-example68 + + + + + + + + + + + + count: {{ count }} + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example68/manifest.json b/1.3.0-rc.2/docs/examples/example-example68/manifest.json new file mode 100644 index 0000000000..e93facd577 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example68/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example68", + "files": [ + "index-production.html", + "script.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example68/script.js b/1.3.0-rc.2/docs/examples/example-example68/script.js new file mode 100644 index 0000000000..7d2b294632 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example68/script.js @@ -0,0 +1 @@ + angular.module('ngClickExample', ['ngTouch']); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example69/index-debug.html b/1.3.0-rc.2/docs/examples/example-example69/index-debug.html new file mode 100644 index 0000000000..a17cec3c2f --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example69/index-debug.html @@ -0,0 +1,24 @@ + + + + + Example - example-example69-debug + + + + + + + + + + +
+ Some list content, like an email in the inbox +
+
+ + +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example69/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example69/index-jquery.html new file mode 100644 index 0000000000..f74cf8008d --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example69/index-jquery.html @@ -0,0 +1,25 @@ + + + + + Example - example-example69-jquery + + + + + + + + + + + +
+ Some list content, like an email in the inbox +
+
+ + +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example69/index-production.html b/1.3.0-rc.2/docs/examples/example-example69/index-production.html new file mode 100644 index 0000000000..805b5feac7 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example69/index-production.html @@ -0,0 +1,24 @@ + + + + + Example - example-example69-production + + + + + + + + + + +
+ Some list content, like an email in the inbox +
+
+ + +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example69/index.html b/1.3.0-rc.2/docs/examples/example-example69/index.html new file mode 100644 index 0000000000..d446d978a1 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example69/index.html @@ -0,0 +1,24 @@ + + + + + Example - example-example69 + + + + + + + + + + +
+ Some list content, like an email in the inbox +
+
+ + +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example69/manifest.json b/1.3.0-rc.2/docs/examples/example-example69/manifest.json new file mode 100644 index 0000000000..c0a85bfab4 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example69/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example69", + "files": [ + "index-production.html", + "script.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example69/script.js b/1.3.0-rc.2/docs/examples/example-example69/script.js new file mode 100644 index 0000000000..520623ff8b --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example69/script.js @@ -0,0 +1 @@ + angular.module('ngSwipeLeftExample', ['ngTouch']); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example7/index-debug.html b/1.3.0-rc.2/docs/examples/example-example7/index-debug.html new file mode 100644 index 0000000000..b1fe76e7b5 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example7/index-debug.html @@ -0,0 +1,17 @@ + + + + + Example - example-example7-debug + + + + + + + + + Click me to toggle:
+ + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example7/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example7/index-jquery.html new file mode 100644 index 0000000000..3c46528abb --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example7/index-jquery.html @@ -0,0 +1,18 @@ + + + + + Example - example-example7-jquery + + + + + + + + + + Click me to toggle:
+ + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example7/index-production.html b/1.3.0-rc.2/docs/examples/example-example7/index-production.html new file mode 100644 index 0000000000..cb26a1c1cf --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example7/index-production.html @@ -0,0 +1,17 @@ + + + + + Example - example-example7-production + + + + + + + + + Click me to toggle:
+ + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example7/index.html b/1.3.0-rc.2/docs/examples/example-example7/index.html new file mode 100644 index 0000000000..f0a7c66d70 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example7/index.html @@ -0,0 +1,17 @@ + + + + + Example - example-example7 + + + + + + + + + Click me to toggle:
+ + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example7/manifest.json b/1.3.0-rc.2/docs/examples/example-example7/manifest.json new file mode 100644 index 0000000000..7829614265 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example7/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example7", + "files": [ + "index-production.html", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example7/protractor.js b/1.3.0-rc.2/docs/examples/example-example7/protractor.js new file mode 100644 index 0000000000..30944fc732 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example7/protractor.js @@ -0,0 +1,5 @@ + it('should toggle button', function() { + expect(element(by.css('button')).getAttribute('disabled')).toBeFalsy(); + element(by.model('checked')).click(); + expect(element(by.css('button')).getAttribute('disabled')).toBeTruthy(); + }); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example70/index-debug.html b/1.3.0-rc.2/docs/examples/example-example70/index-debug.html new file mode 100644 index 0000000000..e4368466ec --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example70/index-debug.html @@ -0,0 +1,24 @@ + + + + + Example - example-example70-debug + + + + + + + + + + +
+ Some list content, like an email in the inbox +
+
+ + +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example70/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example70/index-jquery.html new file mode 100644 index 0000000000..8eaa3cd7c6 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example70/index-jquery.html @@ -0,0 +1,25 @@ + + + + + Example - example-example70-jquery + + + + + + + + + + + +
+ Some list content, like an email in the inbox +
+
+ + +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example70/index-production.html b/1.3.0-rc.2/docs/examples/example-example70/index-production.html new file mode 100644 index 0000000000..6e79ef102c --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example70/index-production.html @@ -0,0 +1,24 @@ + + + + + Example - example-example70-production + + + + + + + + + + +
+ Some list content, like an email in the inbox +
+
+ + +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example70/index.html b/1.3.0-rc.2/docs/examples/example-example70/index.html new file mode 100644 index 0000000000..ea54bbb373 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example70/index.html @@ -0,0 +1,24 @@ + + + + + Example - example-example70 + + + + + + + + + + +
+ Some list content, like an email in the inbox +
+
+ + +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example70/manifest.json b/1.3.0-rc.2/docs/examples/example-example70/manifest.json new file mode 100644 index 0000000000..243c407a07 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example70/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example70", + "files": [ + "index-production.html", + "script.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example70/script.js b/1.3.0-rc.2/docs/examples/example-example70/script.js new file mode 100644 index 0000000000..f60025a7ea --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example70/script.js @@ -0,0 +1 @@ + angular.module('ngSwipeRightExample', ['ngTouch']); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example71/index-debug.html b/1.3.0-rc.2/docs/examples/example-example71/index-debug.html new file mode 100644 index 0000000000..8d967e0d41 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example71/index-debug.html @@ -0,0 +1,19 @@ + + + + + Example - example-example71-debug + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example71/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example71/index-jquery.html new file mode 100644 index 0000000000..f34a9be6b1 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example71/index-jquery.html @@ -0,0 +1,20 @@ + + + + + Example - example-example71-jquery + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example71/index-production.html b/1.3.0-rc.2/docs/examples/example-example71/index-production.html new file mode 100644 index 0000000000..75b70dd489 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example71/index-production.html @@ -0,0 +1,19 @@ + + + + + Example - example-example71-production + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example71/index.html b/1.3.0-rc.2/docs/examples/example-example71/index.html new file mode 100644 index 0000000000..4a0def4d3e --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example71/index.html @@ -0,0 +1,19 @@ + + + + + Example - example-example71 + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example71/manifest.json b/1.3.0-rc.2/docs/examples/example-example71/manifest.json new file mode 100644 index 0000000000..e5dc91ccc0 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example71/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example71", + "files": [ + "index-production.html", + "script.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example71/script.js b/1.3.0-rc.2/docs/examples/example-example71/script.js new file mode 100644 index 0000000000..829f430d80 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example71/script.js @@ -0,0 +1,6 @@ +angular.module('locationExample', []) + .controller('LocationController', ['$scope', '$location', function($scope, $location) { + $scope.locationPath = function (newLocation) { + return $location.path(newLocation); + }; + }]); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example72/animations.css b/1.3.0-rc.2/docs/examples/example-example72/animations.css new file mode 100644 index 0000000000..dfd330e06a --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example72/animations.css @@ -0,0 +1,14 @@ + .sample-show-hide { + padding:10px; + border:1px solid black; + background:white; + } + + .sample-show-hide { + -webkit-transition:all linear 0.5s; + transition:all linear 0.5s; + } + + .sample-show-hide.ng-hide { + opacity:0; + } \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example72/index-debug.html b/1.3.0-rc.2/docs/examples/example-example72/index-debug.html new file mode 100644 index 0000000000..4e82e70a7d --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example72/index-debug.html @@ -0,0 +1,25 @@ + + + + + Example - example-example72-debug + + + + + + + + + + +
+ +
+ Visible... +
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example72/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example72/index-jquery.html new file mode 100644 index 0000000000..be4c7b7fca --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example72/index-jquery.html @@ -0,0 +1,26 @@ + + + + + Example - example-example72-jquery + + + + + + + + + + + +
+ +
+ Visible... +
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example72/index-production.html b/1.3.0-rc.2/docs/examples/example-example72/index-production.html new file mode 100644 index 0000000000..1c2551383d --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example72/index-production.html @@ -0,0 +1,25 @@ + + + + + Example - example-example72-production + + + + + + + + + + +
+ +
+ Visible... +
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example72/index.html b/1.3.0-rc.2/docs/examples/example-example72/index.html new file mode 100644 index 0000000000..e1fff5d042 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example72/index.html @@ -0,0 +1,25 @@ + + + + + Example - example-example72 + + + + + + + + + + +
+ +
+ Visible... +
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example72/manifest.json b/1.3.0-rc.2/docs/examples/example-example72/manifest.json new file mode 100644 index 0000000000..815e454413 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example72/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example72", + "files": [ + "index-production.html", + "animations.css" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example73/index-debug.html b/1.3.0-rc.2/docs/examples/example-example73/index-debug.html new file mode 100644 index 0000000000..4afd312c6d --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example73/index-debug.html @@ -0,0 +1,23 @@ + + + + + Example - example-example73-debug + + + + + + + + + + +

+ + +
+ CSS-Animated Text +

+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example73/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example73/index-jquery.html new file mode 100644 index 0000000000..05fbbce222 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example73/index-jquery.html @@ -0,0 +1,24 @@ + + + + + Example - example-example73-jquery + + + + + + + + + + + +

+ + +
+ CSS-Animated Text +

+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example73/index-production.html b/1.3.0-rc.2/docs/examples/example-example73/index-production.html new file mode 100644 index 0000000000..d7eae4620c --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example73/index-production.html @@ -0,0 +1,23 @@ + + + + + Example - example-example73-production + + + + + + + + + + +

+ + +
+ CSS-Animated Text +

+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example73/index.html b/1.3.0-rc.2/docs/examples/example-example73/index.html new file mode 100644 index 0000000000..af566b72a3 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example73/index.html @@ -0,0 +1,23 @@ + + + + + Example - example-example73 + + + + + + + + + + +

+ + +
+ CSS-Animated Text +

+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example73/manifest.json b/1.3.0-rc.2/docs/examples/example-example73/manifest.json new file mode 100644 index 0000000000..388b18a972 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example73/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example73", + "files": [ + "index-production.html", + "style.css" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example73/style.css b/1.3.0-rc.2/docs/examples/example-example73/style.css new file mode 100644 index 0000000000..f2edcab030 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example73/style.css @@ -0,0 +1,17 @@ + .css-class-add, .css-class-remove { + -webkit-transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s; + -moz-transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s; + -o-transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s; + transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s; + } + + .css-class, + .css-class-add.css-class-add-active { + color: red; + font-size:3em; + } + + .css-class-remove.css-class-remove-active { + font-size:1.0em; + color:black; + } \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example74/index-debug.html b/1.3.0-rc.2/docs/examples/example-example74/index-debug.html new file mode 100644 index 0000000000..56f57f0465 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example74/index-debug.html @@ -0,0 +1,17 @@ + + + + + Example - example-example74-debug + + + + + + + + + + Drag ME + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example74/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example74/index-jquery.html new file mode 100644 index 0000000000..746235674d --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example74/index-jquery.html @@ -0,0 +1,18 @@ + + + + + Example - example-example74-jquery + + + + + + + + + + + Drag ME + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example74/index-production.html b/1.3.0-rc.2/docs/examples/example-example74/index-production.html new file mode 100644 index 0000000000..cd585ffc94 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example74/index-production.html @@ -0,0 +1,17 @@ + + + + + Example - example-example74-production + + + + + + + + + + Drag ME + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example74/index.html b/1.3.0-rc.2/docs/examples/example-example74/index.html new file mode 100644 index 0000000000..63a8deb0df --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example74/index.html @@ -0,0 +1,17 @@ + + + + + Example - example-example74 + + + + + + + + + + Drag ME + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example74/manifest.json b/1.3.0-rc.2/docs/examples/example-example74/manifest.json new file mode 100644 index 0000000000..19f9d39d90 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example74/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example74", + "files": [ + "index-production.html", + "script.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example74/script.js b/1.3.0-rc.2/docs/examples/example-example74/script.js new file mode 100644 index 0000000000..73b02f3071 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example74/script.js @@ -0,0 +1,34 @@ + angular.module('drag', []). + directive('draggable', function($document) { + return function(scope, element, attr) { + var startX = 0, startY = 0, x = 0, y = 0; + element.css({ + position: 'relative', + border: '1px solid red', + backgroundColor: 'lightgrey', + cursor: 'pointer' + }); + element.on('mousedown', function(event) { + // Prevent default dragging of selected content + event.preventDefault(); + startX = event.screenX - x; + startY = event.screenY - y; + $document.on('mousemove', mousemove); + $document.on('mouseup', mouseup); + }); + + function mousemove(event) { + y = event.screenY - startY; + x = event.screenX - startX; + element.css({ + top: y + 'px', + left: x + 'px' + }); + } + + function mouseup() { + $document.off('mousemove', mousemove); + $document.off('mouseup', mouseup); + } + }; + }); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example75/app.js b/1.3.0-rc.2/docs/examples/example-example75/app.js new file mode 100644 index 0000000000..02a28d9a32 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example75/app.js @@ -0,0 +1,13 @@ + var myApp = angular.module('spicyApp1', []); + + myApp.controller('SpicyController', ['$scope', function($scope) { + $scope.spice = 'very'; + + $scope.chiliSpicy = function() { + $scope.spice = 'chili'; + }; + + $scope.jalapenoSpicy = function() { + $scope.spice = 'jalapeño'; + }; + }]); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example75/index-debug.html b/1.3.0-rc.2/docs/examples/example-example75/index-debug.html new file mode 100644 index 0000000000..10775e330f --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example75/index-debug.html @@ -0,0 +1,21 @@ + + + + + Example - example-example75-debug + + + + + + + + + +
+ + +

The food is {{spice}} spicy!

+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example75/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example75/index-jquery.html new file mode 100644 index 0000000000..b5313299ac --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example75/index-jquery.html @@ -0,0 +1,22 @@ + + + + + Example - example-example75-jquery + + + + + + + + + + +
+ + +

The food is {{spice}} spicy!

+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example75/index-production.html b/1.3.0-rc.2/docs/examples/example-example75/index-production.html new file mode 100644 index 0000000000..cad66ebaad --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example75/index-production.html @@ -0,0 +1,21 @@ + + + + + Example - example-example75-production + + + + + + + + + +
+ + +

The food is {{spice}} spicy!

+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example75/index.html b/1.3.0-rc.2/docs/examples/example-example75/index.html new file mode 100644 index 0000000000..213913ec1a --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example75/index.html @@ -0,0 +1,21 @@ + + + + + Example - example-example75 + + + + + + + + + +
+ + +

The food is {{spice}} spicy!

+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example75/manifest.json b/1.3.0-rc.2/docs/examples/example-example75/manifest.json new file mode 100644 index 0000000000..c987b51b9f --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example75/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example75", + "files": [ + "index-production.html", + "app.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example76/app.js b/1.3.0-rc.2/docs/examples/example-example76/app.js new file mode 100644 index 0000000000..7f190a715a --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example76/app.js @@ -0,0 +1,10 @@ + var myApp = angular.module('spicyApp2', []); + + myApp.controller('SpicyController', ['$scope', function($scope) { + $scope.customSpice = "wasabi"; + $scope.spice = 'very'; + + $scope.spicy = function(spice) { + $scope.spice = spice; + }; + }]); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example76/index-debug.html b/1.3.0-rc.2/docs/examples/example-example76/index-debug.html new file mode 100644 index 0000000000..8daf0d1209 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example76/index-debug.html @@ -0,0 +1,22 @@ + + + + + Example - example-example76-debug + + + + + + + + + +
+ + + +

The food is {{spice}} spicy!

+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example76/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example76/index-jquery.html new file mode 100644 index 0000000000..8536c9346d --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example76/index-jquery.html @@ -0,0 +1,23 @@ + + + + + Example - example-example76-jquery + + + + + + + + + + +
+ + + +

The food is {{spice}} spicy!

+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example76/index-production.html b/1.3.0-rc.2/docs/examples/example-example76/index-production.html new file mode 100644 index 0000000000..50327b5f37 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example76/index-production.html @@ -0,0 +1,22 @@ + + + + + Example - example-example76-production + + + + + + + + + +
+ + + +

The food is {{spice}} spicy!

+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example76/index.html b/1.3.0-rc.2/docs/examples/example-example76/index.html new file mode 100644 index 0000000000..0645806281 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example76/index.html @@ -0,0 +1,22 @@ + + + + + Example - example-example76 + + + + + + + + + +
+ + + +

The food is {{spice}} spicy!

+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example76/manifest.json b/1.3.0-rc.2/docs/examples/example-example76/manifest.json new file mode 100644 index 0000000000..92c3546b6a --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example76/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example76", + "files": [ + "index-production.html", + "app.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example77/app.css b/1.3.0-rc.2/docs/examples/example-example77/app.css new file mode 100644 index 0000000000..a0b18351dc --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example77/app.css @@ -0,0 +1,4 @@ + div.spicy div { + padding: 10px; + border: solid 2px blue; + } \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example77/app.js b/1.3.0-rc.2/docs/examples/example-example77/app.js new file mode 100644 index 0000000000..4ed3297e38 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example77/app.js @@ -0,0 +1,12 @@ + var myApp = angular.module('scopeInheritance', []); + myApp.controller('MainController', ['$scope', function($scope) { + $scope.timeOfDay = 'morning'; + $scope.name = 'Nikki'; + }]); + myApp.controller('ChildController', ['$scope', function($scope) { + $scope.name = 'Mattie'; + }]); + myApp.controller('GrandChildController', ['$scope', function($scope) { + $scope.timeOfDay = 'evening'; + $scope.name = 'Gingerbread Baby'; + }]); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example77/index-debug.html b/1.3.0-rc.2/docs/examples/example-example77/index-debug.html new file mode 100644 index 0000000000..23bb06746e --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example77/index-debug.html @@ -0,0 +1,30 @@ + + + + + Example - example-example77-debug + + + + + + + + + + +
+
+

Good {{timeOfDay}}, {{name}}!

+ +
+

Good {{timeOfDay}}, {{name}}!

+ +
+

Good {{timeOfDay}}, {{name}}!

+
+
+
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example77/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example77/index-jquery.html new file mode 100644 index 0000000000..186ffffe93 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example77/index-jquery.html @@ -0,0 +1,31 @@ + + + + + Example - example-example77-jquery + + + + + + + + + + + +
+
+

Good {{timeOfDay}}, {{name}}!

+ +
+

Good {{timeOfDay}}, {{name}}!

+ +
+

Good {{timeOfDay}}, {{name}}!

+
+
+
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example77/index-production.html b/1.3.0-rc.2/docs/examples/example-example77/index-production.html new file mode 100644 index 0000000000..a3b0ec5200 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example77/index-production.html @@ -0,0 +1,30 @@ + + + + + Example - example-example77-production + + + + + + + + + + +
+
+

Good {{timeOfDay}}, {{name}}!

+ +
+

Good {{timeOfDay}}, {{name}}!

+ +
+

Good {{timeOfDay}}, {{name}}!

+
+
+
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example77/index.html b/1.3.0-rc.2/docs/examples/example-example77/index.html new file mode 100644 index 0000000000..bcfc6d01b7 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example77/index.html @@ -0,0 +1,30 @@ + + + + + Example - example-example77 + + + + + + + + + + +
+
+

Good {{timeOfDay}}, {{name}}!

+ +
+

Good {{timeOfDay}}, {{name}}!

+ +
+

Good {{timeOfDay}}, {{name}}!

+
+
+
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example77/manifest.json b/1.3.0-rc.2/docs/examples/example-example77/manifest.json new file mode 100644 index 0000000000..6e4b533122 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example77/manifest.json @@ -0,0 +1,8 @@ +{ + "name": "example-example77", + "files": [ + "index-production.html", + "app.css", + "app.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example78/index-debug.html b/1.3.0-rc.2/docs/examples/example-example78/index-debug.html new file mode 100644 index 0000000000..0364f0782a --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example78/index-debug.html @@ -0,0 +1,24 @@ + + + + + Example - example-example78-debug + + + + + + + + + +
+ Hello
+
+
+
+
+
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example78/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example78/index-jquery.html new file mode 100644 index 0000000000..0ae4a071d6 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example78/index-jquery.html @@ -0,0 +1,25 @@ + + + + + Example - example-example78-jquery + + + + + + + + + + +
+ Hello
+
+
+
+
+
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example78/index-production.html b/1.3.0-rc.2/docs/examples/example-example78/index-production.html new file mode 100644 index 0000000000..a7c36d17d8 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example78/index-production.html @@ -0,0 +1,24 @@ + + + + + Example - example-example78-production + + + + + + + + + +
+ Hello
+
+
+
+
+
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example78/index.html b/1.3.0-rc.2/docs/examples/example-example78/index.html new file mode 100644 index 0000000000..ecc76a44a2 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example78/index.html @@ -0,0 +1,24 @@ + + + + + Example - example-example78 + + + + + + + + + +
+ Hello
+
+
+
+
+
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example78/manifest.json b/1.3.0-rc.2/docs/examples/example-example78/manifest.json new file mode 100644 index 0000000000..54a2f2c1df --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example78/manifest.json @@ -0,0 +1,8 @@ +{ + "name": "example-example78", + "files": [ + "index-production.html", + "script.js", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example78/protractor.js b/1.3.0-rc.2/docs/examples/example-example78/protractor.js new file mode 100644 index 0000000000..21ddb4594a --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example78/protractor.js @@ -0,0 +1,4 @@ + it('should show off bindings', function() { + expect(element(by.css('div[ng-controller="Controller"] span[ng-bind]')).getText()) + .toBe('Max Karl Ernst Ludwig Planck (April 23, 1858 – October 4, 1947)'); + }); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example78/script.js b/1.3.0-rc.2/docs/examples/example-example78/script.js new file mode 100644 index 0000000000..5e18c6c932 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example78/script.js @@ -0,0 +1,4 @@ + angular.module('docsBindExample', []) + .controller('Controller', ['$scope', function($scope) { + $scope.name = 'Max Karl Ernst Ludwig Planck (April 23, 1858 – October 4, 1947)'; + }]); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example79/index-debug.html b/1.3.0-rc.2/docs/examples/example-example79/index-debug.html new file mode 100644 index 0000000000..fb946a2583 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example79/index-debug.html @@ -0,0 +1,19 @@ + + + + + Example - example-example79-debug + + + + + + + + + +
+
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example79/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example79/index-jquery.html new file mode 100644 index 0000000000..1048b917fd --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example79/index-jquery.html @@ -0,0 +1,20 @@ + + + + + Example - example-example79-jquery + + + + + + + + + + +
+
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example79/index-production.html b/1.3.0-rc.2/docs/examples/example-example79/index-production.html new file mode 100644 index 0000000000..69afda8c05 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example79/index-production.html @@ -0,0 +1,19 @@ + + + + + Example - example-example79-production + + + + + + + + + +
+
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example79/index.html b/1.3.0-rc.2/docs/examples/example-example79/index.html new file mode 100644 index 0000000000..0b21bd35f1 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example79/index.html @@ -0,0 +1,19 @@ + + + + + Example - example-example79 + + + + + + + + + +
+
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example79/manifest.json b/1.3.0-rc.2/docs/examples/example-example79/manifest.json new file mode 100644 index 0000000000..2db54edf27 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example79/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example79", + "files": [ + "index-production.html", + "script.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example79/script.js b/1.3.0-rc.2/docs/examples/example-example79/script.js new file mode 100644 index 0000000000..79becdf4d1 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example79/script.js @@ -0,0 +1,12 @@ + angular.module('docsSimpleDirective', []) + .controller('Controller', ['$scope', function($scope) { + $scope.customer = { + name: 'Naomi', + address: '1600 Amphitheatre' + }; + }]) + .directive('myCustomer', function() { + return { + template: 'Name: {{customer.name}} Address: {{customer.address}}' + }; + }); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example8/index-debug.html b/1.3.0-rc.2/docs/examples/example-example8/index-debug.html new file mode 100644 index 0000000000..b00350c865 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example8/index-debug.html @@ -0,0 +1,17 @@ + + + + + Example - example-example8-debug + + + + + + + + + Check me to check both:
+ + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example8/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example8/index-jquery.html new file mode 100644 index 0000000000..cc87f46305 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example8/index-jquery.html @@ -0,0 +1,18 @@ + + + + + Example - example-example8-jquery + + + + + + + + + + Check me to check both:
+ + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example8/index-production.html b/1.3.0-rc.2/docs/examples/example-example8/index-production.html new file mode 100644 index 0000000000..0b075383b9 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example8/index-production.html @@ -0,0 +1,17 @@ + + + + + Example - example-example8-production + + + + + + + + + Check me to check both:
+ + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example8/index.html b/1.3.0-rc.2/docs/examples/example-example8/index.html new file mode 100644 index 0000000000..1e0f5562d8 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example8/index.html @@ -0,0 +1,17 @@ + + + + + Example - example-example8 + + + + + + + + + Check me to check both:
+ + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example8/manifest.json b/1.3.0-rc.2/docs/examples/example-example8/manifest.json new file mode 100644 index 0000000000..5bef30fecc --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example8/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example8", + "files": [ + "index-production.html", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example8/protractor.js b/1.3.0-rc.2/docs/examples/example-example8/protractor.js new file mode 100644 index 0000000000..eb76243835 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example8/protractor.js @@ -0,0 +1,5 @@ + it('should check both checkBoxes', function() { + expect(element(by.id('checkSlave')).getAttribute('checked')).toBeFalsy(); + element(by.model('master')).click(); + expect(element(by.id('checkSlave')).getAttribute('checked')).toBeTruthy(); + }); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example80/index-debug.html b/1.3.0-rc.2/docs/examples/example-example80/index-debug.html new file mode 100644 index 0000000000..9690c07cb8 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example80/index-debug.html @@ -0,0 +1,19 @@ + + + + + Example - example-example80-debug + + + + + + + + + +
+
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example80/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example80/index-jquery.html new file mode 100644 index 0000000000..10416d2ddb --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example80/index-jquery.html @@ -0,0 +1,20 @@ + + + + + Example - example-example80-jquery + + + + + + + + + + +
+
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example80/index-production.html b/1.3.0-rc.2/docs/examples/example-example80/index-production.html new file mode 100644 index 0000000000..13742a354a --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example80/index-production.html @@ -0,0 +1,19 @@ + + + + + Example - example-example80-production + + + + + + + + + +
+
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example80/index.html b/1.3.0-rc.2/docs/examples/example-example80/index.html new file mode 100644 index 0000000000..1c00f16766 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example80/index.html @@ -0,0 +1,19 @@ + + + + + Example - example-example80 + + + + + + + + + +
+
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example80/manifest.json b/1.3.0-rc.2/docs/examples/example-example80/manifest.json new file mode 100644 index 0000000000..8f8f6db1bd --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example80/manifest.json @@ -0,0 +1,8 @@ +{ + "name": "example-example80", + "files": [ + "index-production.html", + "script.js", + "my-customer.html" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example80/my-customer.html b/1.3.0-rc.2/docs/examples/example-example80/my-customer.html new file mode 100644 index 0000000000..82930dca78 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example80/my-customer.html @@ -0,0 +1 @@ + Name: {{customer.name}} Address: {{customer.address}} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example80/script.js b/1.3.0-rc.2/docs/examples/example-example80/script.js new file mode 100644 index 0000000000..75e0299e50 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example80/script.js @@ -0,0 +1,12 @@ + angular.module('docsTemplateUrlDirective', []) + .controller('Controller', ['$scope', function($scope) { + $scope.customer = { + name: 'Naomi', + address: '1600 Amphitheatre' + }; + }]) + .directive('myCustomer', function() { + return { + templateUrl: 'my-customer.html' + }; + }); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example81/index-debug.html b/1.3.0-rc.2/docs/examples/example-example81/index-debug.html new file mode 100644 index 0000000000..426dbd2a5a --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example81/index-debug.html @@ -0,0 +1,19 @@ + + + + + Example - example-example81-debug + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example81/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example81/index-jquery.html new file mode 100644 index 0000000000..904201a045 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example81/index-jquery.html @@ -0,0 +1,20 @@ + + + + + Example - example-example81-jquery + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example81/index-production.html b/1.3.0-rc.2/docs/examples/example-example81/index-production.html new file mode 100644 index 0000000000..84fb3d3778 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example81/index-production.html @@ -0,0 +1,19 @@ + + + + + Example - example-example81-production + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example81/index.html b/1.3.0-rc.2/docs/examples/example-example81/index.html new file mode 100644 index 0000000000..43a559433b --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example81/index.html @@ -0,0 +1,19 @@ + + + + + Example - example-example81 + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example81/manifest.json b/1.3.0-rc.2/docs/examples/example-example81/manifest.json new file mode 100644 index 0000000000..4df54b6ddf --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example81/manifest.json @@ -0,0 +1,8 @@ +{ + "name": "example-example81", + "files": [ + "index-production.html", + "script.js", + "my-customer.html" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example81/my-customer.html b/1.3.0-rc.2/docs/examples/example-example81/my-customer.html new file mode 100644 index 0000000000..82930dca78 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example81/my-customer.html @@ -0,0 +1 @@ + Name: {{customer.name}} Address: {{customer.address}} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example81/script.js b/1.3.0-rc.2/docs/examples/example-example81/script.js new file mode 100644 index 0000000000..255a1d2fea --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example81/script.js @@ -0,0 +1,13 @@ + angular.module('docsRestrictDirective', []) + .controller('Controller', ['$scope', function($scope) { + $scope.customer = { + name: 'Naomi', + address: '1600 Amphitheatre' + }; + }]) + .directive('myCustomer', function() { + return { + restrict: 'E', + templateUrl: 'my-customer.html' + }; + }); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example82/index-debug.html b/1.3.0-rc.2/docs/examples/example-example82/index-debug.html new file mode 100644 index 0000000000..ada682a585 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example82/index-debug.html @@ -0,0 +1,23 @@ + + + + + Example - example-example82-debug + + + + + + + + + +
+ +
+
+
+ +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example82/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example82/index-jquery.html new file mode 100644 index 0000000000..5473c7a6e3 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example82/index-jquery.html @@ -0,0 +1,24 @@ + + + + + Example - example-example82-jquery + + + + + + + + + + +
+ +
+
+
+ +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example82/index-production.html b/1.3.0-rc.2/docs/examples/example-example82/index-production.html new file mode 100644 index 0000000000..80d379267b --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example82/index-production.html @@ -0,0 +1,23 @@ + + + + + Example - example-example82-production + + + + + + + + + +
+ +
+
+
+ +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example82/index.html b/1.3.0-rc.2/docs/examples/example-example82/index.html new file mode 100644 index 0000000000..b8ed4a7eb2 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example82/index.html @@ -0,0 +1,23 @@ + + + + + Example - example-example82 + + + + + + + + + +
+ +
+
+
+ +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example82/manifest.json b/1.3.0-rc.2/docs/examples/example-example82/manifest.json new file mode 100644 index 0000000000..e22bf0a7d3 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example82/manifest.json @@ -0,0 +1,8 @@ +{ + "name": "example-example82", + "files": [ + "index-production.html", + "script.js", + "my-customer.html" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example82/my-customer.html b/1.3.0-rc.2/docs/examples/example-example82/my-customer.html new file mode 100644 index 0000000000..82930dca78 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example82/my-customer.html @@ -0,0 +1 @@ + Name: {{customer.name}} Address: {{customer.address}} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example82/script.js b/1.3.0-rc.2/docs/examples/example-example82/script.js new file mode 100644 index 0000000000..80c41e79da --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example82/script.js @@ -0,0 +1,19 @@ + angular.module('docsScopeProblemExample', []) + .controller('NaomiController', ['$scope', function($scope) { + $scope.customer = { + name: 'Naomi', + address: '1600 Amphitheatre' + }; + }]) + .controller('IgorController', ['$scope', function($scope) { + $scope.customer = { + name: 'Igor', + address: '123 Somewhere' + }; + }]) + .directive('myCustomer', function() { + return { + restrict: 'E', + templateUrl: 'my-customer.html' + }; + }); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example83/index-debug.html b/1.3.0-rc.2/docs/examples/example-example83/index-debug.html new file mode 100644 index 0000000000..651600eb82 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example83/index-debug.html @@ -0,0 +1,21 @@ + + + + + Example - example-example83-debug + + + + + + + + + +
+ +
+ +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example83/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example83/index-jquery.html new file mode 100644 index 0000000000..1eb2a5c3d7 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example83/index-jquery.html @@ -0,0 +1,22 @@ + + + + + Example - example-example83-jquery + + + + + + + + + + +
+ +
+ +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example83/index-production.html b/1.3.0-rc.2/docs/examples/example-example83/index-production.html new file mode 100644 index 0000000000..74310e7f47 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example83/index-production.html @@ -0,0 +1,21 @@ + + + + + Example - example-example83-production + + + + + + + + + +
+ +
+ +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example83/index.html b/1.3.0-rc.2/docs/examples/example-example83/index.html new file mode 100644 index 0000000000..b9fc1a3d4f --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example83/index.html @@ -0,0 +1,21 @@ + + + + + Example - example-example83 + + + + + + + + + +
+ +
+ +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example83/manifest.json b/1.3.0-rc.2/docs/examples/example-example83/manifest.json new file mode 100644 index 0000000000..96f033b29c --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example83/manifest.json @@ -0,0 +1,8 @@ +{ + "name": "example-example83", + "files": [ + "index-production.html", + "script.js", + "my-customer-iso.html" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example83/my-customer-iso.html b/1.3.0-rc.2/docs/examples/example-example83/my-customer-iso.html new file mode 100644 index 0000000000..2b0eedf2b2 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example83/my-customer-iso.html @@ -0,0 +1 @@ + Name: {{customerInfo.name}} Address: {{customerInfo.address}} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example83/script.js b/1.3.0-rc.2/docs/examples/example-example83/script.js new file mode 100644 index 0000000000..e9d0706f31 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example83/script.js @@ -0,0 +1,14 @@ + angular.module('docsIsolateScopeDirective', []) + .controller('Controller', ['$scope', function($scope) { + $scope.naomi = { name: 'Naomi', address: '1600 Amphitheatre' }; + $scope.igor = { name: 'Igor', address: '123 Somewhere' }; + }]) + .directive('myCustomer', function() { + return { + restrict: 'E', + scope: { + customerInfo: '=info' + }, + templateUrl: 'my-customer-iso.html' + }; + }); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example84/index-debug.html b/1.3.0-rc.2/docs/examples/example-example84/index-debug.html new file mode 100644 index 0000000000..c9f0da1534 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example84/index-debug.html @@ -0,0 +1,19 @@ + + + + + Example - example-example84-debug + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example84/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example84/index-jquery.html new file mode 100644 index 0000000000..2fa15a3ab2 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example84/index-jquery.html @@ -0,0 +1,20 @@ + + + + + Example - example-example84-jquery + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example84/index-production.html b/1.3.0-rc.2/docs/examples/example-example84/index-production.html new file mode 100644 index 0000000000..a9f6725e33 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example84/index-production.html @@ -0,0 +1,19 @@ + + + + + Example - example-example84-production + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example84/index.html b/1.3.0-rc.2/docs/examples/example-example84/index.html new file mode 100644 index 0000000000..8e4c31fc01 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example84/index.html @@ -0,0 +1,19 @@ + + + + + Example - example-example84 + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example84/manifest.json b/1.3.0-rc.2/docs/examples/example-example84/manifest.json new file mode 100644 index 0000000000..defe805aa8 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example84/manifest.json @@ -0,0 +1,8 @@ +{ + "name": "example-example84", + "files": [ + "index-production.html", + "script.js", + "my-customer-plus-vojta.html" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example84/my-customer-plus-vojta.html b/1.3.0-rc.2/docs/examples/example-example84/my-customer-plus-vojta.html new file mode 100644 index 0000000000..51a938b478 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example84/my-customer-plus-vojta.html @@ -0,0 +1,3 @@ + Name: {{customerInfo.name}} Address: {{customerInfo.address}} +
+ Name: {{vojta.name}} Address: {{vojta.address}} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example84/script.js b/1.3.0-rc.2/docs/examples/example-example84/script.js new file mode 100644 index 0000000000..f9c88a51bd --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example84/script.js @@ -0,0 +1,14 @@ + angular.module('docsIsolationExample', []) + .controller('Controller', ['$scope', function($scope) { + $scope.naomi = { name: 'Naomi', address: '1600 Amphitheatre' }; + $scope.vojta = { name: 'Vojta', address: '3456 Somewhere Else' }; + }]) + .directive('myCustomer', function() { + return { + restrict: 'E', + scope: { + customerInfo: '=info' + }, + templateUrl: 'my-customer-plus-vojta.html' + }; + }); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example85/index-debug.html b/1.3.0-rc.2/docs/examples/example-example85/index-debug.html new file mode 100644 index 0000000000..eeda93bdd7 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example85/index-debug.html @@ -0,0 +1,20 @@ + + + + + Example - example-example85-debug + + + + + + + + + +
+ Date format:
+ Current time is: +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example85/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example85/index-jquery.html new file mode 100644 index 0000000000..9eba1f1dab --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example85/index-jquery.html @@ -0,0 +1,21 @@ + + + + + Example - example-example85-jquery + + + + + + + + + + +
+ Date format:
+ Current time is: +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example85/index-production.html b/1.3.0-rc.2/docs/examples/example-example85/index-production.html new file mode 100644 index 0000000000..7ecd9965ef --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example85/index-production.html @@ -0,0 +1,20 @@ + + + + + Example - example-example85-production + + + + + + + + + +
+ Date format:
+ Current time is: +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example85/index.html b/1.3.0-rc.2/docs/examples/example-example85/index.html new file mode 100644 index 0000000000..9a0015be23 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example85/index.html @@ -0,0 +1,20 @@ + + + + + Example - example-example85 + + + + + + + + + +
+ Date format:
+ Current time is: +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example85/manifest.json b/1.3.0-rc.2/docs/examples/example-example85/manifest.json new file mode 100644 index 0000000000..d28a0ae28a --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example85/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example85", + "files": [ + "index-production.html", + "script.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example85/script.js b/1.3.0-rc.2/docs/examples/example-example85/script.js new file mode 100644 index 0000000000..3408c950bb --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example85/script.js @@ -0,0 +1,33 @@ + angular.module('docsTimeDirective', []) + .controller('Controller', ['$scope', function($scope) { + $scope.format = 'M/d/yy h:mm:ss a'; + }]) + .directive('myCurrentTime', ['$interval', 'dateFilter', function($interval, dateFilter) { + + function link(scope, element, attrs) { + var format, + timeoutId; + + function updateTime() { + element.text(dateFilter(new Date(), format)); + } + + scope.$watch(attrs.myCurrentTime, function(value) { + format = value; + updateTime(); + }); + + element.on('$destroy', function() { + $interval.cancel(timeoutId); + }); + + // start the UI update process; save the timeoutId for canceling + timeoutId = $interval(function() { + updateTime(); // update DOM + }, 1000); + } + + return { + link: link + }; + }]); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example86/index-debug.html b/1.3.0-rc.2/docs/examples/example-example86/index-debug.html new file mode 100644 index 0000000000..55cde082a5 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example86/index-debug.html @@ -0,0 +1,19 @@ + + + + + Example - example-example86-debug + + + + + + + + + +
+ Check out the contents, {{name}}! +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example86/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example86/index-jquery.html new file mode 100644 index 0000000000..ff5dd3b511 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example86/index-jquery.html @@ -0,0 +1,20 @@ + + + + + Example - example-example86-jquery + + + + + + + + + + +
+ Check out the contents, {{name}}! +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example86/index-production.html b/1.3.0-rc.2/docs/examples/example-example86/index-production.html new file mode 100644 index 0000000000..de06e1ede5 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example86/index-production.html @@ -0,0 +1,19 @@ + + + + + Example - example-example86-production + + + + + + + + + +
+ Check out the contents, {{name}}! +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example86/index.html b/1.3.0-rc.2/docs/examples/example-example86/index.html new file mode 100644 index 0000000000..a89a8de0a8 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example86/index.html @@ -0,0 +1,19 @@ + + + + + Example - example-example86 + + + + + + + + + +
+ Check out the contents, {{name}}! +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example86/manifest.json b/1.3.0-rc.2/docs/examples/example-example86/manifest.json new file mode 100644 index 0000000000..5e67a3e0eb --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example86/manifest.json @@ -0,0 +1,8 @@ +{ + "name": "example-example86", + "files": [ + "index-production.html", + "script.js", + "my-dialog.html" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example86/my-dialog.html b/1.3.0-rc.2/docs/examples/example-example86/my-dialog.html new file mode 100644 index 0000000000..58c4f39c28 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example86/my-dialog.html @@ -0,0 +1,2 @@ +
+
\ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example86/script.js b/1.3.0-rc.2/docs/examples/example-example86/script.js new file mode 100644 index 0000000000..966f97a434 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example86/script.js @@ -0,0 +1,11 @@ + angular.module('docsTransclusionDirective', []) + .controller('Controller', ['$scope', function($scope) { + $scope.name = 'Tobias'; + }]) + .directive('myDialog', function() { + return { + restrict: 'E', + transclude: true, + templateUrl: 'my-dialog.html' + }; + }); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example87/index-debug.html b/1.3.0-rc.2/docs/examples/example-example87/index-debug.html new file mode 100644 index 0000000000..ebbbcaa25d --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example87/index-debug.html @@ -0,0 +1,19 @@ + + + + + Example - example-example87-debug + + + + + + + + + +
+ Check out the contents, {{name}}! +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example87/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example87/index-jquery.html new file mode 100644 index 0000000000..be4d6a3ab6 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example87/index-jquery.html @@ -0,0 +1,20 @@ + + + + + Example - example-example87-jquery + + + + + + + + + + +
+ Check out the contents, {{name}}! +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example87/index-production.html b/1.3.0-rc.2/docs/examples/example-example87/index-production.html new file mode 100644 index 0000000000..2e6694318b --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example87/index-production.html @@ -0,0 +1,19 @@ + + + + + Example - example-example87-production + + + + + + + + + +
+ Check out the contents, {{name}}! +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example87/index.html b/1.3.0-rc.2/docs/examples/example-example87/index.html new file mode 100644 index 0000000000..61fec18624 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example87/index.html @@ -0,0 +1,19 @@ + + + + + Example - example-example87 + + + + + + + + + +
+ Check out the contents, {{name}}! +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example87/manifest.json b/1.3.0-rc.2/docs/examples/example-example87/manifest.json new file mode 100644 index 0000000000..4411aea038 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example87/manifest.json @@ -0,0 +1,8 @@ +{ + "name": "example-example87", + "files": [ + "index-production.html", + "script.js", + "my-dialog.html" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example87/my-dialog.html b/1.3.0-rc.2/docs/examples/example-example87/my-dialog.html new file mode 100644 index 0000000000..58c4f39c28 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example87/my-dialog.html @@ -0,0 +1,2 @@ +
+
\ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example87/script.js b/1.3.0-rc.2/docs/examples/example-example87/script.js new file mode 100644 index 0000000000..a73ba663be --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example87/script.js @@ -0,0 +1,15 @@ + angular.module('docsTransclusionExample', []) + .controller('Controller', ['$scope', function($scope) { + $scope.name = 'Tobias'; + }]) + .directive('myDialog', function() { + return { + restrict: 'E', + transclude: true, + scope: {}, + templateUrl: 'my-dialog.html', + link: function (scope, element) { + scope.name = 'Jeff'; + } + }; + }); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example88/index-debug.html b/1.3.0-rc.2/docs/examples/example-example88/index-debug.html new file mode 100644 index 0000000000..2449c85c2a --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example88/index-debug.html @@ -0,0 +1,21 @@ + + + + + Example - example-example88-debug + + + + + + + + + +
+ + Check out the contents, {{name}}! + +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example88/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example88/index-jquery.html new file mode 100644 index 0000000000..a41ad848ab --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example88/index-jquery.html @@ -0,0 +1,22 @@ + + + + + Example - example-example88-jquery + + + + + + + + + + +
+ + Check out the contents, {{name}}! + +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example88/index-production.html b/1.3.0-rc.2/docs/examples/example-example88/index-production.html new file mode 100644 index 0000000000..27ae941f5c --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example88/index-production.html @@ -0,0 +1,21 @@ + + + + + Example - example-example88-production + + + + + + + + + +
+ + Check out the contents, {{name}}! + +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example88/index.html b/1.3.0-rc.2/docs/examples/example-example88/index.html new file mode 100644 index 0000000000..2462110ef6 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example88/index.html @@ -0,0 +1,21 @@ + + + + + Example - example-example88 + + + + + + + + + +
+ + Check out the contents, {{name}}! + +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example88/manifest.json b/1.3.0-rc.2/docs/examples/example-example88/manifest.json new file mode 100644 index 0000000000..73393efd69 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example88/manifest.json @@ -0,0 +1,8 @@ +{ + "name": "example-example88", + "files": [ + "index-production.html", + "script.js", + "my-dialog-close.html" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example88/my-dialog-close.html b/1.3.0-rc.2/docs/examples/example-example88/my-dialog-close.html new file mode 100644 index 0000000000..1d12ba2b8d --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example88/my-dialog-close.html @@ -0,0 +1,4 @@ +
+ × +
+
\ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example88/script.js b/1.3.0-rc.2/docs/examples/example-example88/script.js new file mode 100644 index 0000000000..df71bddfd5 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example88/script.js @@ -0,0 +1,20 @@ + angular.module('docsIsoFnBindExample', []) + .controller('Controller', ['$scope', '$timeout', function($scope, $timeout) { + $scope.name = 'Tobias'; + $scope.hideDialog = function () { + $scope.dialogIsHidden = true; + $timeout(function () { + $scope.dialogIsHidden = false; + }, 2000); + }; + }]) + .directive('myDialog', function() { + return { + restrict: 'E', + transclude: true, + scope: { + 'close': '&onClose' + }, + templateUrl: 'my-dialog-close.html' + }; + }); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example89/index-debug.html b/1.3.0-rc.2/docs/examples/example-example89/index-debug.html new file mode 100644 index 0000000000..ebd349d7eb --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example89/index-debug.html @@ -0,0 +1,17 @@ + + + + + Example - example-example89-debug + + + + + + + + + + Drag ME + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example89/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example89/index-jquery.html new file mode 100644 index 0000000000..d07642ff02 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example89/index-jquery.html @@ -0,0 +1,18 @@ + + + + + Example - example-example89-jquery + + + + + + + + + + + Drag ME + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example89/index-production.html b/1.3.0-rc.2/docs/examples/example-example89/index-production.html new file mode 100644 index 0000000000..97d6fe7043 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example89/index-production.html @@ -0,0 +1,17 @@ + + + + + Example - example-example89-production + + + + + + + + + + Drag ME + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example89/index.html b/1.3.0-rc.2/docs/examples/example-example89/index.html new file mode 100644 index 0000000000..b5f46dca68 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example89/index.html @@ -0,0 +1,17 @@ + + + + + Example - example-example89 + + + + + + + + + + Drag ME + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example89/manifest.json b/1.3.0-rc.2/docs/examples/example-example89/manifest.json new file mode 100644 index 0000000000..fe7f812e32 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example89/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example89", + "files": [ + "index-production.html", + "script.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example89/script.js b/1.3.0-rc.2/docs/examples/example-example89/script.js new file mode 100644 index 0000000000..c6169d9af0 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example89/script.js @@ -0,0 +1,36 @@ + angular.module('dragModule', []) + .directive('myDraggable', ['$document', function($document) { + return function(scope, element, attr) { + var startX = 0, startY = 0, x = 0, y = 0; + + element.css({ + position: 'relative', + border: '1px solid red', + backgroundColor: 'lightgrey', + cursor: 'pointer' + }); + + element.on('mousedown', function(event) { + // Prevent default dragging of selected content + event.preventDefault(); + startX = event.pageX - x; + startY = event.pageY - y; + $document.on('mousemove', mousemove); + $document.on('mouseup', mouseup); + }); + + function mousemove(event) { + y = event.pageY - startY; + x = event.pageX - startX; + element.css({ + top: y + 'px', + left: x + 'px' + }); + } + + function mouseup() { + $document.off('mousemove', mousemove); + $document.off('mouseup', mouseup); + } + }; + }]); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example9/index-debug.html b/1.3.0-rc.2/docs/examples/example-example9/index-debug.html new file mode 100644 index 0000000000..3900b0c23b --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example9/index-debug.html @@ -0,0 +1,17 @@ + + + + + Example - example-example9-debug + + + + + + + + + Check me to make text readonly:
+ + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example9/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example9/index-jquery.html new file mode 100644 index 0000000000..369e7a3e00 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example9/index-jquery.html @@ -0,0 +1,18 @@ + + + + + Example - example-example9-jquery + + + + + + + + + + Check me to make text readonly:
+ + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example9/index-production.html b/1.3.0-rc.2/docs/examples/example-example9/index-production.html new file mode 100644 index 0000000000..e4c01176b5 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example9/index-production.html @@ -0,0 +1,17 @@ + + + + + Example - example-example9-production + + + + + + + + + Check me to make text readonly:
+ + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example9/index.html b/1.3.0-rc.2/docs/examples/example-example9/index.html new file mode 100644 index 0000000000..db327b65e0 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example9/index.html @@ -0,0 +1,17 @@ + + + + + Example - example-example9 + + + + + + + + + Check me to make text readonly:
+ + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example9/manifest.json b/1.3.0-rc.2/docs/examples/example-example9/manifest.json new file mode 100644 index 0000000000..3cb447e2b1 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example9/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example9", + "files": [ + "index-production.html", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example9/protractor.js b/1.3.0-rc.2/docs/examples/example-example9/protractor.js new file mode 100644 index 0000000000..0f91387342 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example9/protractor.js @@ -0,0 +1,5 @@ + it('should toggle readonly attr', function() { + expect(element(by.css('[type="text"]')).getAttribute('readonly')).toBeFalsy(); + element(by.model('checked')).click(); + expect(element(by.css('[type="text"]')).getAttribute('readonly')).toBeTruthy(); + }); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example90/index-debug.html b/1.3.0-rc.2/docs/examples/example-example90/index-debug.html new file mode 100644 index 0000000000..361a9e725d --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example90/index-debug.html @@ -0,0 +1,27 @@ + + + + + Example - example-example90-debug + + + + + + + + + + + +

Hello

+

Lorem ipsum dolor sit amet

+
+ +

World

+ Mauris elementum elementum enim at suscipit. +

counter: {{i || 0}}

+
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example90/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example90/index-jquery.html new file mode 100644 index 0000000000..b204a010c4 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example90/index-jquery.html @@ -0,0 +1,28 @@ + + + + + Example - example-example90-jquery + + + + + + + + + + + + +

Hello

+

Lorem ipsum dolor sit amet

+
+ +

World

+ Mauris elementum elementum enim at suscipit. +

counter: {{i || 0}}

+
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example90/index-production.html b/1.3.0-rc.2/docs/examples/example-example90/index-production.html new file mode 100644 index 0000000000..d987fa5a6a --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example90/index-production.html @@ -0,0 +1,27 @@ + + + + + Example - example-example90-production + + + + + + + + + + + +

Hello

+

Lorem ipsum dolor sit amet

+
+ +

World

+ Mauris elementum elementum enim at suscipit. +

counter: {{i || 0}}

+
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example90/index.html b/1.3.0-rc.2/docs/examples/example-example90/index.html new file mode 100644 index 0000000000..91b8eb8d0c --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example90/index.html @@ -0,0 +1,27 @@ + + + + + Example - example-example90 + + + + + + + + + + + +

Hello

+

Lorem ipsum dolor sit amet

+
+ +

World

+ Mauris elementum elementum enim at suscipit. +

counter: {{i || 0}}

+
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example90/manifest.json b/1.3.0-rc.2/docs/examples/example-example90/manifest.json new file mode 100644 index 0000000000..3298bf3613 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example90/manifest.json @@ -0,0 +1,9 @@ +{ + "name": "example-example90", + "files": [ + "index-production.html", + "script.js", + "my-tabs.html", + "my-pane.html" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example90/my-pane.html b/1.3.0-rc.2/docs/examples/example-example90/my-pane.html new file mode 100644 index 0000000000..1e74f5dc12 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example90/my-pane.html @@ -0,0 +1,2 @@ +
+
\ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example90/my-tabs.html b/1.3.0-rc.2/docs/examples/example-example90/my-tabs.html new file mode 100644 index 0000000000..d14f733e64 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example90/my-tabs.html @@ -0,0 +1,8 @@ +
+ +
+
\ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example90/script.js b/1.3.0-rc.2/docs/examples/example-example90/script.js new file mode 100644 index 0000000000..8c959bbfc8 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example90/script.js @@ -0,0 +1,40 @@ + angular.module('docsTabsExample', []) + .directive('myTabs', function() { + return { + restrict: 'E', + transclude: true, + scope: {}, + controller: function($scope) { + var panes = $scope.panes = []; + + $scope.select = function(pane) { + angular.forEach(panes, function(pane) { + pane.selected = false; + }); + pane.selected = true; + }; + + this.addPane = function(pane) { + if (panes.length === 0) { + $scope.select(pane); + } + panes.push(pane); + }; + }, + templateUrl: 'my-tabs.html' + }; + }) + .directive('myPane', function() { + return { + require: '^myTabs', + restrict: 'E', + transclude: true, + scope: { + title: '@' + }, + link: function(scope, element, attrs, tabsCtrl) { + tabsCtrl.addPane(scope); + }, + templateUrl: 'my-pane.html' + }; + }); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example91/index-debug.html b/1.3.0-rc.2/docs/examples/example-example91/index-debug.html new file mode 100644 index 0000000000..52dd590d98 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example91/index-debug.html @@ -0,0 +1,18 @@ + + + + + Example - example-example91-debug + + + + + + + + + + 1+2={{1+2}} + + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example91/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example91/index-jquery.html new file mode 100644 index 0000000000..cf373a6d32 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example91/index-jquery.html @@ -0,0 +1,19 @@ + + + + + Example - example-example91-jquery + + + + + + + + + + + 1+2={{1+2}} + + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example91/index-production.html b/1.3.0-rc.2/docs/examples/example-example91/index-production.html new file mode 100644 index 0000000000..9eeb0903f9 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example91/index-production.html @@ -0,0 +1,18 @@ + + + + + Example - example-example91-production + + + + + + + + + + 1+2={{1+2}} + + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example91/index.html b/1.3.0-rc.2/docs/examples/example-example91/index.html new file mode 100644 index 0000000000..dd23f44479 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example91/index.html @@ -0,0 +1,18 @@ + + + + + Example - example-example91 + + + + + + + + + + 1+2={{1+2}} + + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example91/manifest.json b/1.3.0-rc.2/docs/examples/example-example91/manifest.json new file mode 100644 index 0000000000..2f231d02ae --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example91/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example91", + "files": [ + "index-production.html", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example91/protractor.js b/1.3.0-rc.2/docs/examples/example-example91/protractor.js new file mode 100644 index 0000000000..3e639c677f --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example91/protractor.js @@ -0,0 +1,3 @@ + it('should calculate expression in binding', function() { + expect(element(by.binding('1+2')).getText()).toEqual('1+2=3'); + }); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example92/index-debug.html b/1.3.0-rc.2/docs/examples/example-example92/index-debug.html new file mode 100644 index 0000000000..1fc6b102ab --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example92/index-debug.html @@ -0,0 +1,27 @@ + + + + + Example - example-example92-debug + + + + + + + + + +
+ Expression: + + +
    +
  • + [ X ] + {{expr}} => +
  • +
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example92/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example92/index-jquery.html new file mode 100644 index 0000000000..3aa474e9d9 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example92/index-jquery.html @@ -0,0 +1,28 @@ + + + + + Example - example-example92-jquery + + + + + + + + + + +
+ Expression: + + +
    +
  • + [ X ] + {{expr}} => +
  • +
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example92/index-production.html b/1.3.0-rc.2/docs/examples/example-example92/index-production.html new file mode 100644 index 0000000000..e3658f77da --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example92/index-production.html @@ -0,0 +1,27 @@ + + + + + Example - example-example92-production + + + + + + + + + +
+ Expression: + + +
    +
  • + [ X ] + {{expr}} => +
  • +
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example92/index.html b/1.3.0-rc.2/docs/examples/example-example92/index.html new file mode 100644 index 0000000000..b365c25a99 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example92/index.html @@ -0,0 +1,27 @@ + + + + + Example - example-example92 + + + + + + + + + +
+ Expression: + + +
    +
  • + [ X ] + {{expr}} => +
  • +
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example92/manifest.json b/1.3.0-rc.2/docs/examples/example-example92/manifest.json new file mode 100644 index 0000000000..4d4a94b196 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example92/manifest.json @@ -0,0 +1,8 @@ +{ + "name": "example-example92", + "files": [ + "index-production.html", + "script.js", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example92/protractor.js b/1.3.0-rc.2/docs/examples/example-example92/protractor.js new file mode 100644 index 0000000000..1f4b38d161 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example92/protractor.js @@ -0,0 +1,6 @@ + it('should allow user expression testing', function() { + element(by.css('.expressions button')).click(); + var lis = element(by.css('.expressions ul')).all(by.repeater('expr in exprs')); + expect(lis.count()).toBe(1); + expect(lis.get(0).getText()).toEqual('[ X ] 3*10|currency => $30.00'); + }); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example92/script.js b/1.3.0-rc.2/docs/examples/example-example92/script.js new file mode 100644 index 0000000000..aa781ae87a --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example92/script.js @@ -0,0 +1,12 @@ + angular.module('expressionExample', []) + .controller('ExampleController', ['$scope', function($scope) { + var exprs = $scope.exprs = []; + $scope.expr = '3*10|currency'; + $scope.addExp = function(expr) { + exprs.push(expr); + }; + + $scope.removeExp = function(index) { + exprs.splice(index, 1); + }; + }]); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example93/index-debug.html b/1.3.0-rc.2/docs/examples/example-example93/index-debug.html new file mode 100644 index 0000000000..7ed5f6f4c8 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example93/index-debug.html @@ -0,0 +1,21 @@ + + + + + Example - example-example93-debug + + + + + + + + + +
+ Name: + + +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example93/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example93/index-jquery.html new file mode 100644 index 0000000000..eb14179148 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example93/index-jquery.html @@ -0,0 +1,22 @@ + + + + + Example - example-example93-jquery + + + + + + + + + + +
+ Name: + + +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example93/index-production.html b/1.3.0-rc.2/docs/examples/example-example93/index-production.html new file mode 100644 index 0000000000..1be8e5c069 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example93/index-production.html @@ -0,0 +1,21 @@ + + + + + Example - example-example93-production + + + + + + + + + +
+ Name: + + +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example93/index.html b/1.3.0-rc.2/docs/examples/example-example93/index.html new file mode 100644 index 0000000000..3a87f76c10 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example93/index.html @@ -0,0 +1,21 @@ + + + + + Example - example-example93 + + + + + + + + + +
+ Name: + + +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example93/manifest.json b/1.3.0-rc.2/docs/examples/example-example93/manifest.json new file mode 100644 index 0000000000..dee9c55234 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example93/manifest.json @@ -0,0 +1,8 @@ +{ + "name": "example-example93", + "files": [ + "index-production.html", + "script.js", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example93/protractor.js b/1.3.0-rc.2/docs/examples/example-example93/protractor.js new file mode 100644 index 0000000000..8c58cbe69f --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example93/protractor.js @@ -0,0 +1,13 @@ + it('should calculate expression in binding', function() { + if (browser.params.browser == 'safari') { + // Safari can't handle dialogs. + return; + } + element(by.css('[ng-click="greet()"]')).click(); + + var alertDialog = browser.switchTo().alert(); + + expect(alertDialog.getText()).toEqual('Hello World'); + + alertDialog.accept(); + }); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example93/script.js b/1.3.0-rc.2/docs/examples/example-example93/script.js new file mode 100644 index 0000000000..26d074c730 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example93/script.js @@ -0,0 +1,8 @@ + angular.module('expressionExample', []) + .controller('ExampleController', ['$window', '$scope', function($window, $scope) { + $scope.name = 'World'; + + $scope.greet = function() { + $window.alert('Hello ' + $scope.name); + }; + }]); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example94/index-debug.html b/1.3.0-rc.2/docs/examples/example-example94/index-debug.html new file mode 100644 index 0000000000..f0d3681ea5 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example94/index-debug.html @@ -0,0 +1,21 @@ + + + + + Example - example-example94-debug + + + + + + + + + +
+ +

$event:

 {{$event | json}}

+

clickEvent:

{{clickEvent | json}}

+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example94/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example94/index-jquery.html new file mode 100644 index 0000000000..84f817502e --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example94/index-jquery.html @@ -0,0 +1,22 @@ + + + + + Example - example-example94-jquery + + + + + + + + + + +
+ +

$event:

 {{$event | json}}

+

clickEvent:

{{clickEvent | json}}

+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example94/index-production.html b/1.3.0-rc.2/docs/examples/example-example94/index-production.html new file mode 100644 index 0000000000..41ebcb0444 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example94/index-production.html @@ -0,0 +1,21 @@ + + + + + Example - example-example94-production + + + + + + + + + +
+ +

$event:

 {{$event | json}}

+

clickEvent:

{{clickEvent | json}}

+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example94/index.html b/1.3.0-rc.2/docs/examples/example-example94/index.html new file mode 100644 index 0000000000..bf1ddb551d --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example94/index.html @@ -0,0 +1,21 @@ + + + + + Example - example-example94 + + + + + + + + + +
+ +

$event:

 {{$event | json}}

+

clickEvent:

{{clickEvent | json}}

+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example94/manifest.json b/1.3.0-rc.2/docs/examples/example-example94/manifest.json new file mode 100644 index 0000000000..606492f417 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example94/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example94", + "files": [ + "index-production.html", + "script.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example94/script.js b/1.3.0-rc.2/docs/examples/example-example94/script.js new file mode 100644 index 0000000000..62a9590de2 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example94/script.js @@ -0,0 +1,21 @@ + angular.module('eventExampleApp', []). + controller('EventController', ['$scope', function($scope) { + /* + * expose the event object to the scope + */ + $scope.clickMe = function(clickEvent) { + $scope.clickEvent = simpleKeys(clickEvent); + console.log(clickEvent); + }; + + /* + * return a copy of an object with only non-object keys + * we need this to avoid circular references + */ + function simpleKeys (original) { + return Object.keys(original).reduce(function (obj, key) { + obj[key] = typeof original[key] === 'object' ? '{ ... }' : original[key]; + return obj; + }, {}); + } + }]); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example95/index-debug.html b/1.3.0-rc.2/docs/examples/example-example95/index-debug.html new file mode 100644 index 0000000000..579b0c215a --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example95/index-debug.html @@ -0,0 +1,21 @@ + + + + + Example - example-example95-debug + + + + + + + + + +
+ +

One time binding: {{::name}}

+

Normal binding: {{name}}

+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example95/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example95/index-jquery.html new file mode 100644 index 0000000000..78b3208e2a --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example95/index-jquery.html @@ -0,0 +1,22 @@ + + + + + Example - example-example95-jquery + + + + + + + + + + +
+ +

One time binding: {{::name}}

+

Normal binding: {{name}}

+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example95/index-production.html b/1.3.0-rc.2/docs/examples/example-example95/index-production.html new file mode 100644 index 0000000000..ae52f3f109 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example95/index-production.html @@ -0,0 +1,21 @@ + + + + + Example - example-example95-production + + + + + + + + + +
+ +

One time binding: {{::name}}

+

Normal binding: {{name}}

+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example95/index.html b/1.3.0-rc.2/docs/examples/example-example95/index.html new file mode 100644 index 0000000000..b683b60e3e --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example95/index.html @@ -0,0 +1,21 @@ + + + + + Example - example-example95 + + + + + + + + + +
+ +

One time binding: {{::name}}

+

Normal binding: {{name}}

+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example95/manifest.json b/1.3.0-rc.2/docs/examples/example-example95/manifest.json new file mode 100644 index 0000000000..5656293161 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example95/manifest.json @@ -0,0 +1,8 @@ +{ + "name": "example-example95", + "files": [ + "index-production.html", + "script.js", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example95/protractor.js b/1.3.0-rc.2/docs/examples/example-example95/protractor.js new file mode 100644 index 0000000000..01a0759cb4 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example95/protractor.js @@ -0,0 +1,21 @@ + it('should freeze binding after its value has stabilized', function() { + var oneTimeBiding = element(by.id('one-time-binding-example')); + var normalBinding = element(by.id('normal-binding-example')); + + expect(oneTimeBiding.getText()).toEqual('One time binding:'); + expect(normalBinding.getText()).toEqual('Normal binding:'); + element(by.buttonText('Click Me')).click(); + + expect(oneTimeBiding.getText()).toEqual('One time binding: Igor'); + expect(normalBinding.getText()).toEqual('Normal binding: Igor'); + element(by.buttonText('Click Me')).click(); + + expect(oneTimeBiding.getText()).toEqual('One time binding: Igor'); + expect(normalBinding.getText()).toEqual('Normal binding: Misko'); + + element(by.buttonText('Click Me')).click(); + element(by.buttonText('Click Me')).click(); + + expect(oneTimeBiding.getText()).toEqual('One time binding: Igor'); + expect(normalBinding.getText()).toEqual('Normal binding: Lucas'); + }); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example95/script.js b/1.3.0-rc.2/docs/examples/example-example95/script.js new file mode 100644 index 0000000000..9cc252e10d --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example95/script.js @@ -0,0 +1,12 @@ + angular.module('oneTimeBidingExampleApp', []). + controller('EventController', ['$scope', function($scope) { + var counter = 0; + var names = ['Igor', 'Misko', 'Chirayu', 'Lucas']; + /* + * expose the event object to the scope + */ + $scope.clickMe = function(clickEvent) { + $scope.name = names[counter % names.length]; + counter++; + }; + }]); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example96/index-debug.html b/1.3.0-rc.2/docs/examples/example-example96/index-debug.html new file mode 100644 index 0000000000..18bd7991ad --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example96/index-debug.html @@ -0,0 +1,26 @@ + + + + + Example - example-example96-debug + + + + + + + + + +
+
+ All entries: + {{entry.name}} +
+
+ Entries that contain an "a": + {{entry.name}} +
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example96/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example96/index-jquery.html new file mode 100644 index 0000000000..78488f5680 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example96/index-jquery.html @@ -0,0 +1,27 @@ + + + + + Example - example-example96-jquery + + + + + + + + + + +
+
+ All entries: + {{entry.name}} +
+
+ Entries that contain an "a": + {{entry.name}} +
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example96/index-production.html b/1.3.0-rc.2/docs/examples/example-example96/index-production.html new file mode 100644 index 0000000000..808e97c779 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example96/index-production.html @@ -0,0 +1,26 @@ + + + + + Example - example-example96-production + + + + + + + + + +
+
+ All entries: + {{entry.name}} +
+
+ Entries that contain an "a": + {{entry.name}} +
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example96/index.html b/1.3.0-rc.2/docs/examples/example-example96/index.html new file mode 100644 index 0000000000..6701052412 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example96/index.html @@ -0,0 +1,26 @@ + + + + + Example - example-example96 + + + + + + + + + +
+
+ All entries: + {{entry.name}} +
+
+ Entries that contain an "a": + {{entry.name}} +
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example96/manifest.json b/1.3.0-rc.2/docs/examples/example-example96/manifest.json new file mode 100644 index 0000000000..678da01494 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example96/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example96", + "files": [ + "index-production.html", + "script.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example96/script.js b/1.3.0-rc.2/docs/examples/example-example96/script.js new file mode 100644 index 0000000000..7a28c9b184 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example96/script.js @@ -0,0 +1,12 @@ + angular.module('FilterInControllerModule', []). + controller('FilterController', ['filterFilter', function(filterFilter) { + this.array = [ + {name: 'Tobias'}, + {name: 'Jeff'}, + {name: 'Brian'}, + {name: 'Igor'}, + {name: 'James'}, + {name: 'Brad'} + ]; + this.filteredArray = filterFilter(this.array, 'a'); + }]); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example97/index-debug.html b/1.3.0-rc.2/docs/examples/example-example97/index-debug.html new file mode 100644 index 0000000000..6275df3ae5 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example97/index-debug.html @@ -0,0 +1,22 @@ + + + + + Example - example-example97-debug + + + + + + + + + +
+
+ No filter: {{greeting}}
+ Reverse: {{greeting|reverse}}
+ Reverse + uppercase: {{greeting|reverse:true}}
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example97/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example97/index-jquery.html new file mode 100644 index 0000000000..322f9e4c92 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example97/index-jquery.html @@ -0,0 +1,23 @@ + + + + + Example - example-example97-jquery + + + + + + + + + + +
+
+ No filter: {{greeting}}
+ Reverse: {{greeting|reverse}}
+ Reverse + uppercase: {{greeting|reverse:true}}
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example97/index-production.html b/1.3.0-rc.2/docs/examples/example-example97/index-production.html new file mode 100644 index 0000000000..84f54a125c --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example97/index-production.html @@ -0,0 +1,22 @@ + + + + + Example - example-example97-production + + + + + + + + + +
+
+ No filter: {{greeting}}
+ Reverse: {{greeting|reverse}}
+ Reverse + uppercase: {{greeting|reverse:true}}
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example97/index.html b/1.3.0-rc.2/docs/examples/example-example97/index.html new file mode 100644 index 0000000000..09c850af57 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example97/index.html @@ -0,0 +1,22 @@ + + + + + Example - example-example97 + + + + + + + + + +
+
+ No filter: {{greeting}}
+ Reverse: {{greeting|reverse}}
+ Reverse + uppercase: {{greeting|reverse:true}}
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example97/manifest.json b/1.3.0-rc.2/docs/examples/example-example97/manifest.json new file mode 100644 index 0000000000..e546d0bb42 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example97/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example97", + "files": [ + "index-production.html", + "script.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example97/script.js b/1.3.0-rc.2/docs/examples/example-example97/script.js new file mode 100644 index 0000000000..6b746ca9b2 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example97/script.js @@ -0,0 +1,18 @@ + angular.module('myReverseFilterApp', []) + .filter('reverse', function() { + return function(input, uppercase) { + input = input || ''; + var out = ""; + for (var i = 0; i < input.length; i++) { + out = input.charAt(i) + out; + } + // conditional based on optional argument + if (uppercase) { + out = out.toUpperCase(); + } + return out; + }; + }) + .controller('MyController', ['$scope', function($scope) { + $scope.greeting = 'hello'; + }]); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example98/index-debug.html b/1.3.0-rc.2/docs/examples/example-example98/index-debug.html new file mode 100644 index 0000000000..b62a569bc4 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example98/index-debug.html @@ -0,0 +1,22 @@ + + + + + Example - example-example98-debug + + + + + + + + + +
+ Input:
+ Decoration:
+ No filter: {{greeting}}
+ Reverse: {{greeting | decorate}}
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example98/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example98/index-jquery.html new file mode 100644 index 0000000000..b1f37f3a5c --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example98/index-jquery.html @@ -0,0 +1,23 @@ + + + + + Example - example-example98-jquery + + + + + + + + + + +
+ Input:
+ Decoration:
+ No filter: {{greeting}}
+ Reverse: {{greeting | decorate}}
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example98/index-production.html b/1.3.0-rc.2/docs/examples/example-example98/index-production.html new file mode 100644 index 0000000000..029cffb152 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example98/index-production.html @@ -0,0 +1,22 @@ + + + + + Example - example-example98-production + + + + + + + + + +
+ Input:
+ Decoration:
+ No filter: {{greeting}}
+ Reverse: {{greeting | decorate}}
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example98/index.html b/1.3.0-rc.2/docs/examples/example-example98/index.html new file mode 100644 index 0000000000..d8edca6be8 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example98/index.html @@ -0,0 +1,22 @@ + + + + + Example - example-example98 + + + + + + + + + +
+ Input:
+ Decoration:
+ No filter: {{greeting}}
+ Reverse: {{greeting | decorate}}
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example98/manifest.json b/1.3.0-rc.2/docs/examples/example-example98/manifest.json new file mode 100644 index 0000000000..dc90892fd3 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example98/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example98", + "files": [ + "index-production.html", + "script.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example98/script.js b/1.3.0-rc.2/docs/examples/example-example98/script.js new file mode 100644 index 0000000000..7ecced753f --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example98/script.js @@ -0,0 +1,15 @@ + angular.module('myStatefulFilterApp', []) + .filter('decorate', ['decoration', function(decoration) { + + function decorateFilter(input) { + return decoration.symbol + input + decoration.symbol; + } + decorateFilter.$stateful = true; + + return decorateFilter; + }]) + .controller('MyController', ['$scope', 'decoration', function($scope, decoration) { + $scope.greeting = 'hello'; + $scope.decoration = decoration; + }]) + .value('decoration', {symbol: '*'}); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example99/index-debug.html b/1.3.0-rc.2/docs/examples/example-example99/index-debug.html new file mode 100644 index 0000000000..3aefc5fc5a --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example99/index-debug.html @@ -0,0 +1,44 @@ + + + + + Example - example-example99-debug + + + + + + + + +
+
+ Name:
+ E-mail:
+ Gender: male + female
+ + +
+
form = {{user | json}}
+
master = {{master | json}}
+
+ + + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example99/index-jquery.html b/1.3.0-rc.2/docs/examples/example-example99/index-jquery.html new file mode 100644 index 0000000000..d9eabe04a8 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example99/index-jquery.html @@ -0,0 +1,45 @@ + + + + + Example - example-example99-jquery + + + + + + + + + +
+
+ Name:
+ E-mail:
+ Gender: male + female
+ + +
+
form = {{user | json}}
+
master = {{master | json}}
+
+ + + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example99/index-production.html b/1.3.0-rc.2/docs/examples/example-example99/index-production.html new file mode 100644 index 0000000000..9328ab6846 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example99/index-production.html @@ -0,0 +1,44 @@ + + + + + Example - example-example99-production + + + + + + + + +
+
+ Name:
+ E-mail:
+ Gender: male + female
+ + +
+
form = {{user | json}}
+
master = {{master | json}}
+
+ + + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example99/index.html b/1.3.0-rc.2/docs/examples/example-example99/index.html new file mode 100644 index 0000000000..5900bd937d --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example99/index.html @@ -0,0 +1,44 @@ + + + + + Example - example-example99 + + + + + + + + +
+
+ Name:
+ E-mail:
+ Gender: male + female
+ + +
+
form = {{user | json}}
+
master = {{master | json}}
+
+ + + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-example99/manifest.json b/1.3.0-rc.2/docs/examples/example-example99/manifest.json new file mode 100644 index 0000000000..f14d04ca1c --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-example99/manifest.json @@ -0,0 +1,6 @@ +{ + "name": "example-example99", + "files": [ + "index-production.html" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-guide-concepts-1/index-debug.html b/1.3.0-rc.2/docs/examples/example-guide-concepts-1/index-debug.html new file mode 100644 index 0000000000..ef2e362032 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-guide-concepts-1/index-debug.html @@ -0,0 +1,27 @@ + + + + + Example - example-guide-concepts-1-debug + + + + + + + + +
+ Invoice: +
+ Quantity: +
+
+ Costs: +
+
+ Total: {{qty * cost | currency}} +
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-guide-concepts-1/index-jquery.html b/1.3.0-rc.2/docs/examples/example-guide-concepts-1/index-jquery.html new file mode 100644 index 0000000000..2059182899 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-guide-concepts-1/index-jquery.html @@ -0,0 +1,28 @@ + + + + + Example - example-guide-concepts-1-jquery + + + + + + + + + +
+ Invoice: +
+ Quantity: +
+
+ Costs: +
+
+ Total: {{qty * cost | currency}} +
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-guide-concepts-1/index-production.html b/1.3.0-rc.2/docs/examples/example-guide-concepts-1/index-production.html new file mode 100644 index 0000000000..15358a8f7a --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-guide-concepts-1/index-production.html @@ -0,0 +1,27 @@ + + + + + Example - example-guide-concepts-1-production + + + + + + + + +
+ Invoice: +
+ Quantity: +
+
+ Costs: +
+
+ Total: {{qty * cost | currency}} +
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-guide-concepts-1/index.html b/1.3.0-rc.2/docs/examples/example-guide-concepts-1/index.html new file mode 100644 index 0000000000..52f982663a --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-guide-concepts-1/index.html @@ -0,0 +1,27 @@ + + + + + Example - example-guide-concepts-1 + + + + + + + + +
+ Invoice: +
+ Quantity: +
+
+ Costs: +
+
+ Total: {{qty * cost | currency}} +
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-guide-concepts-1/manifest.json b/1.3.0-rc.2/docs/examples/example-guide-concepts-1/manifest.json new file mode 100644 index 0000000000..f4c83905a1 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-guide-concepts-1/manifest.json @@ -0,0 +1,6 @@ +{ + "name": "example-guide-concepts-1", + "files": [ + "index-production.html" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-guide-concepts-2/index-debug.html b/1.3.0-rc.2/docs/examples/example-guide-concepts-2/index-debug.html new file mode 100644 index 0000000000..e654e392a6 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-guide-concepts-2/index-debug.html @@ -0,0 +1,35 @@ + + + + + Example - example-guide-concepts-2-debug + + + + + + + + + +
+ Invoice: +
+ Quantity: +
+
+ Costs: + +
+
+ Total: + + {{invoice.total(c) | currency:c}} + + +
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-guide-concepts-2/index-jquery.html b/1.3.0-rc.2/docs/examples/example-guide-concepts-2/index-jquery.html new file mode 100644 index 0000000000..2b72cd1562 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-guide-concepts-2/index-jquery.html @@ -0,0 +1,36 @@ + + + + + Example - example-guide-concepts-2-jquery + + + + + + + + + + +
+ Invoice: +
+ Quantity: +
+
+ Costs: + +
+
+ Total: + + {{invoice.total(c) | currency:c}} + + +
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-guide-concepts-2/index-production.html b/1.3.0-rc.2/docs/examples/example-guide-concepts-2/index-production.html new file mode 100644 index 0000000000..1d87174d1f --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-guide-concepts-2/index-production.html @@ -0,0 +1,35 @@ + + + + + Example - example-guide-concepts-2-production + + + + + + + + + +
+ Invoice: +
+ Quantity: +
+
+ Costs: + +
+
+ Total: + + {{invoice.total(c) | currency:c}} + + +
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-guide-concepts-2/index.html b/1.3.0-rc.2/docs/examples/example-guide-concepts-2/index.html new file mode 100644 index 0000000000..07dd1decd7 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-guide-concepts-2/index.html @@ -0,0 +1,35 @@ + + + + + Example - example-guide-concepts-2 + + + + + + + + + +
+ Invoice: +
+ Quantity: +
+
+ Costs: + +
+
+ Total: + + {{invoice.total(c) | currency:c}} + + +
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-guide-concepts-2/invoice1.js b/1.3.0-rc.2/docs/examples/example-guide-concepts-2/invoice1.js new file mode 100644 index 0000000000..4d65f22276 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-guide-concepts-2/invoice1.js @@ -0,0 +1,22 @@ + angular.module('invoice1', []) + .controller('InvoiceController', function() { + this.qty = 1; + this.cost = 2; + this.inCurr = 'EUR'; + this.currencies = ['USD', 'EUR', 'CNY']; + this.usdToForeignRates = { + USD: 1, + EUR: 0.74, + CNY: 6.09 + }; + + this.total = function total(outCurr) { + return this.convertCurrency(this.qty * this.cost, this.inCurr, outCurr); + }; + this.convertCurrency = function convertCurrency(amount, inCurr, outCurr) { + return amount * this.usdToForeignRates[outCurr] / this.usdToForeignRates[inCurr]; + }; + this.pay = function pay() { + window.alert("Thanks!"); + }; + }); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-guide-concepts-2/manifest.json b/1.3.0-rc.2/docs/examples/example-guide-concepts-2/manifest.json new file mode 100644 index 0000000000..9c6af114cc --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-guide-concepts-2/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-guide-concepts-2", + "files": [ + "index-production.html", + "invoice1.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-guide-concepts-21/finance2.js b/1.3.0-rc.2/docs/examples/example-guide-concepts-21/finance2.js new file mode 100644 index 0000000000..270108aedb --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-guide-concepts-21/finance2.js @@ -0,0 +1,17 @@ + angular.module('finance2', []) + .factory('currencyConverter', function() { + var currencies = ['USD', 'EUR', 'CNY']; + var usdToForeignRates = { + USD: 1, + EUR: 0.74, + CNY: 6.09 + }; + var convert = function (amount, inCurr, outCurr) { + return amount * usdToForeignRates[outCurr] / usdToForeignRates[inCurr]; + }; + + return { + currencies: currencies, + convert: convert + }; + }); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-guide-concepts-21/index-debug.html b/1.3.0-rc.2/docs/examples/example-guide-concepts-21/index-debug.html new file mode 100644 index 0000000000..9cf4b21977 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-guide-concepts-21/index-debug.html @@ -0,0 +1,36 @@ + + + + + Example - example-guide-concepts-21-debug + + + + + + + + + + +
+ Invoice: +
+ Quantity: +
+
+ Costs: + +
+
+ Total: + + {{invoice.total(c) | currency:c}} + + +
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-guide-concepts-21/index-jquery.html b/1.3.0-rc.2/docs/examples/example-guide-concepts-21/index-jquery.html new file mode 100644 index 0000000000..7e217839c6 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-guide-concepts-21/index-jquery.html @@ -0,0 +1,37 @@ + + + + + Example - example-guide-concepts-21-jquery + + + + + + + + + + + +
+ Invoice: +
+ Quantity: +
+
+ Costs: + +
+
+ Total: + + {{invoice.total(c) | currency:c}} + + +
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-guide-concepts-21/index-production.html b/1.3.0-rc.2/docs/examples/example-guide-concepts-21/index-production.html new file mode 100644 index 0000000000..94f2ef9f34 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-guide-concepts-21/index-production.html @@ -0,0 +1,36 @@ + + + + + Example - example-guide-concepts-21-production + + + + + + + + + + +
+ Invoice: +
+ Quantity: +
+
+ Costs: + +
+
+ Total: + + {{invoice.total(c) | currency:c}} + + +
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-guide-concepts-21/index.html b/1.3.0-rc.2/docs/examples/example-guide-concepts-21/index.html new file mode 100644 index 0000000000..6db7750472 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-guide-concepts-21/index.html @@ -0,0 +1,36 @@ + + + + + Example - example-guide-concepts-21 + + + + + + + + + + +
+ Invoice: +
+ Quantity: +
+
+ Costs: + +
+
+ Total: + + {{invoice.total(c) | currency:c}} + + +
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-guide-concepts-21/invoice2.js b/1.3.0-rc.2/docs/examples/example-guide-concepts-21/invoice2.js new file mode 100644 index 0000000000..77caa7ebf0 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-guide-concepts-21/invoice2.js @@ -0,0 +1,14 @@ + angular.module('invoice2', ['finance2']) + .controller('InvoiceController', ['currencyConverter', function(currencyConverter) { + this.qty = 1; + this.cost = 2; + this.inCurr = 'EUR'; + this.currencies = currencyConverter.currencies; + + this.total = function total(outCurr) { + return currencyConverter.convert(this.qty * this.cost, this.inCurr, outCurr); + }; + this.pay = function pay() { + window.alert("Thanks!"); + }; + }]); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-guide-concepts-21/manifest.json b/1.3.0-rc.2/docs/examples/example-guide-concepts-21/manifest.json new file mode 100644 index 0000000000..036dcd520a --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-guide-concepts-21/manifest.json @@ -0,0 +1,8 @@ +{ + "name": "example-guide-concepts-21", + "files": [ + "index-production.html", + "finance2.js", + "invoice2.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-guide-concepts-3/finance3.js b/1.3.0-rc.2/docs/examples/example-guide-concepts-3/finance3.js new file mode 100644 index 0000000000..c768dd1893 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-guide-concepts-3/finance3.js @@ -0,0 +1,34 @@ + angular.module('finance3', []) + .factory('currencyConverter', ['$http', function($http) { + var YAHOO_FINANCE_URL_PATTERN = + '//query.yahooapis.com/v1/public/yql?q=select * from '+ + 'yahoo.finance.xchange where pair in ("PAIRS")&format=json&'+ + 'env=store://datatables.org/alltableswithkeys&callback=JSON_CALLBACK'; + var currencies = ['USD', 'EUR', 'CNY']; + var usdToForeignRates = {}; + + var convert = function (amount, inCurr, outCurr) { + return amount * usdToForeignRates[outCurr] / usdToForeignRates[inCurr]; + }; + + var refresh = function() { + var url = YAHOO_FINANCE_URL_PATTERN. + replace('PAIRS', 'USD' + currencies.join('","USD')); + return $http.jsonp(url).success(function(data) { + var newUsdToForeignRates = {}; + angular.forEach(data.query.results.rate, function(rate) { + var currency = rate.id.substring(3,6); + newUsdToForeignRates[currency] = window.parseFloat(rate.Rate); + }); + usdToForeignRates = newUsdToForeignRates; + }); + }; + + refresh(); + + return { + currencies: currencies, + convert: convert, + refresh: refresh + }; + }]); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-guide-concepts-3/index-debug.html b/1.3.0-rc.2/docs/examples/example-guide-concepts-3/index-debug.html new file mode 100644 index 0000000000..95583dfdac --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-guide-concepts-3/index-debug.html @@ -0,0 +1,36 @@ + + + + + Example - example-guide-concepts-3-debug + + + + + + + + + + +
+ Invoice: +
+ Quantity: +
+
+ Costs: + +
+
+ Total: + + {{invoice.total(c) | currency:c}} + + +
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-guide-concepts-3/index-jquery.html b/1.3.0-rc.2/docs/examples/example-guide-concepts-3/index-jquery.html new file mode 100644 index 0000000000..bd925e92aa --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-guide-concepts-3/index-jquery.html @@ -0,0 +1,37 @@ + + + + + Example - example-guide-concepts-3-jquery + + + + + + + + + + + +
+ Invoice: +
+ Quantity: +
+
+ Costs: + +
+
+ Total: + + {{invoice.total(c) | currency:c}} + + +
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-guide-concepts-3/index-production.html b/1.3.0-rc.2/docs/examples/example-guide-concepts-3/index-production.html new file mode 100644 index 0000000000..763a80c72b --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-guide-concepts-3/index-production.html @@ -0,0 +1,36 @@ + + + + + Example - example-guide-concepts-3-production + + + + + + + + + + +
+ Invoice: +
+ Quantity: +
+
+ Costs: + +
+
+ Total: + + {{invoice.total(c) | currency:c}} + + +
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-guide-concepts-3/index.html b/1.3.0-rc.2/docs/examples/example-guide-concepts-3/index.html new file mode 100644 index 0000000000..9480e5c379 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-guide-concepts-3/index.html @@ -0,0 +1,36 @@ + + + + + Example - example-guide-concepts-3 + + + + + + + + + + +
+ Invoice: +
+ Quantity: +
+
+ Costs: + +
+
+ Total: + + {{invoice.total(c) | currency:c}} + + +
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-guide-concepts-3/invoice3.js b/1.3.0-rc.2/docs/examples/example-guide-concepts-3/invoice3.js new file mode 100644 index 0000000000..d9b1640be0 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-guide-concepts-3/invoice3.js @@ -0,0 +1,14 @@ + angular.module('invoice3', ['finance3']) + .controller('InvoiceController', ['currencyConverter', function(currencyConverter) { + this.qty = 1; + this.cost = 2; + this.inCurr = 'EUR'; + this.currencies = currencyConverter.currencies; + + this.total = function total(outCurr) { + return currencyConverter.convert(this.qty * this.cost, this.inCurr, outCurr); + }; + this.pay = function pay() { + window.alert("Thanks!"); + }; + }]); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-guide-concepts-3/manifest.json b/1.3.0-rc.2/docs/examples/example-guide-concepts-3/manifest.json new file mode 100644 index 0000000000..4581d36108 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-guide-concepts-3/manifest.json @@ -0,0 +1,8 @@ +{ + "name": "example-guide-concepts-3", + "files": [ + "index-production.html", + "invoice3.js", + "finance3.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-input-directive/index-debug.html b/1.3.0-rc.2/docs/examples/example-input-directive/index-debug.html new file mode 100644 index 0000000000..9a2fd647bd --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-input-directive/index-debug.html @@ -0,0 +1,44 @@ + + + + + Example - example-input-directive-debug + + + + + + + + + +
+
+ User name: + + Required!
+ Last name: + + Too short! + + Too long!
+
+
+ user = {{user}}
+ myForm.userName.$valid = {{myForm.userName.$valid}}
+ myForm.userName.$error = {{myForm.userName.$error}}
+ myForm.lastName.$valid = {{myForm.lastName.$valid}}
+ myForm.lastName.$error = {{myForm.lastName.$error}}
+ myForm.$valid = {{myForm.$valid}}
+ myForm.$error.required = {{!!myForm.$error.required}}
+ myForm.$error.minlength = {{!!myForm.$error.minlength}}
+ myForm.$error.maxlength = {{!!myForm.$error.maxlength}}
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-input-directive/index-jquery.html b/1.3.0-rc.2/docs/examples/example-input-directive/index-jquery.html new file mode 100644 index 0000000000..ff49180caa --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-input-directive/index-jquery.html @@ -0,0 +1,45 @@ + + + + + Example - example-input-directive-jquery + + + + + + + + + + +
+
+ User name: + + Required!
+ Last name: + + Too short! + + Too long!
+
+
+ user = {{user}}
+ myForm.userName.$valid = {{myForm.userName.$valid}}
+ myForm.userName.$error = {{myForm.userName.$error}}
+ myForm.lastName.$valid = {{myForm.lastName.$valid}}
+ myForm.lastName.$error = {{myForm.lastName.$error}}
+ myForm.$valid = {{myForm.$valid}}
+ myForm.$error.required = {{!!myForm.$error.required}}
+ myForm.$error.minlength = {{!!myForm.$error.minlength}}
+ myForm.$error.maxlength = {{!!myForm.$error.maxlength}}
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-input-directive/index-production.html b/1.3.0-rc.2/docs/examples/example-input-directive/index-production.html new file mode 100644 index 0000000000..009873d40b --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-input-directive/index-production.html @@ -0,0 +1,44 @@ + + + + + Example - example-input-directive-production + + + + + + + + + +
+
+ User name: + + Required!
+ Last name: + + Too short! + + Too long!
+
+
+ user = {{user}}
+ myForm.userName.$valid = {{myForm.userName.$valid}}
+ myForm.userName.$error = {{myForm.userName.$error}}
+ myForm.lastName.$valid = {{myForm.lastName.$valid}}
+ myForm.lastName.$error = {{myForm.lastName.$error}}
+ myForm.$valid = {{myForm.$valid}}
+ myForm.$error.required = {{!!myForm.$error.required}}
+ myForm.$error.minlength = {{!!myForm.$error.minlength}}
+ myForm.$error.maxlength = {{!!myForm.$error.maxlength}}
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-input-directive/index.html b/1.3.0-rc.2/docs/examples/example-input-directive/index.html new file mode 100644 index 0000000000..bf756c240d --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-input-directive/index.html @@ -0,0 +1,44 @@ + + + + + Example - example-input-directive + + + + + + + + + +
+
+ User name: + + Required!
+ Last name: + + Too short! + + Too long!
+
+
+ user = {{user}}
+ myForm.userName.$valid = {{myForm.userName.$valid}}
+ myForm.userName.$error = {{myForm.userName.$error}}
+ myForm.lastName.$valid = {{myForm.lastName.$valid}}
+ myForm.lastName.$error = {{myForm.lastName.$error}}
+ myForm.$valid = {{myForm.$valid}}
+ myForm.$error.required = {{!!myForm.$error.required}}
+ myForm.$error.minlength = {{!!myForm.$error.minlength}}
+ myForm.$error.maxlength = {{!!myForm.$error.maxlength}}
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-input-directive/manifest.json b/1.3.0-rc.2/docs/examples/example-input-directive/manifest.json new file mode 100644 index 0000000000..b4c6da9122 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-input-directive/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-input-directive", + "files": [ + "index-production.html", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-input-directive/protractor.js b/1.3.0-rc.2/docs/examples/example-input-directive/protractor.js new file mode 100644 index 0000000000..d591e61566 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-input-directive/protractor.js @@ -0,0 +1,51 @@ + var user = element(by.exactBinding('user')); + var userNameValid = element(by.binding('myForm.userName.$valid')); + var lastNameValid = element(by.binding('myForm.lastName.$valid')); + var lastNameError = element(by.binding('myForm.lastName.$error')); + var formValid = element(by.binding('myForm.$valid')); + var userNameInput = element(by.model('user.name')); + var userLastInput = element(by.model('user.last')); + + it('should initialize to model', function() { + expect(user.getText()).toContain('{"name":"guest","last":"visitor"}'); + expect(userNameValid.getText()).toContain('true'); + expect(formValid.getText()).toContain('true'); + }); + + it('should be invalid if empty when required', function() { + userNameInput.clear(); + userNameInput.sendKeys(''); + + expect(user.getText()).toContain('{"last":"visitor"}'); + expect(userNameValid.getText()).toContain('false'); + expect(formValid.getText()).toContain('false'); + }); + + it('should be valid if empty when min length is set', function() { + userLastInput.clear(); + userLastInput.sendKeys(''); + + expect(user.getText()).toContain('{"name":"guest","last":""}'); + expect(lastNameValid.getText()).toContain('true'); + expect(formValid.getText()).toContain('true'); + }); + + it('should be invalid if less than required min length', function() { + userLastInput.clear(); + userLastInput.sendKeys('xx'); + + expect(user.getText()).toContain('{"name":"guest"}'); + expect(lastNameValid.getText()).toContain('false'); + expect(lastNameError.getText()).toContain('minlength'); + expect(formValid.getText()).toContain('false'); + }); + + it('should be invalid if longer than max length', function() { + userLastInput.clear(); + userLastInput.sendKeys('some ridiculously long name'); + + expect(user.getText()).toContain('{"name":"guest"}'); + expect(lastNameValid.getText()).toContain('false'); + expect(lastNameError.getText()).toContain('maxlength'); + expect(formValid.getText()).toContain('false'); + }); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-location-hashbang-mode/addressBar.js b/1.3.0-rc.2/docs/examples/example-location-hashbang-mode/addressBar.js new file mode 100644 index 0000000000..18d61630bc --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-location-hashbang-mode/addressBar.js @@ -0,0 +1,24 @@ + angular.module('address-bar', []) + .directive('ngAddressBar', function($browser, $timeout) { + return { + template: 'Address: ', + link: function(scope, element, attrs){ + var input = element.children("input"), delay; + + input.on('keypress keyup keydown', function(event) { + delay = (!delay ? $timeout(fireUrlChange, 250) : null); + event.stopPropagation(); + }) + .val($browser.url()); + + $browser.url = function(url) { + return url ? input.val(url) : input.val(); + }; + + function fireUrlChange() { + delay = null; + $browser.urlChange(input.val()); + } + } + }; + }); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-location-hashbang-mode/app.js b/1.3.0-rc.2/docs/examples/example-location-hashbang-mode/app.js new file mode 100644 index 0000000000..2e6189741c --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-location-hashbang-mode/app.js @@ -0,0 +1,25 @@ + angular.module('hashbang-mode', ['fake-browser', 'address-bar']) + + .constant('initUrl', 'http://www.example.com/base/index.html#!/path?a=b#h') + .constant('baseHref', '/base/index.html') + .value('$sniffer', { history: false }) + + .config(function($locationProvider) { + $locationProvider.html5Mode(true).hashPrefix('!'); + }) + + .controller("LocationController", function($scope, $location) { + $scope.$location = {}; + angular.forEach("protocol host port path search hash".split(" "), function(method){ + $scope.$location[method] = function(){ + var result = $location[method].call($location); + return angular.isObject(result) ? angular.toJson(result) : result; + }; + }); + }) + + .run(function($rootElement) { + $rootElement.on('click', function(e) { + e.stopPropagation(); + }); + }); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-location-hashbang-mode/fakeBrowser.js b/1.3.0-rc.2/docs/examples/example-location-hashbang-mode/fakeBrowser.js new file mode 100644 index 0000000000..5522847cca --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-location-hashbang-mode/fakeBrowser.js @@ -0,0 +1,24 @@ + angular.module('fake-browser', []) + + .config(function($provide) { + $provide.decorator('$browser', function($delegate, baseHref, initUrl) { + + $delegate.onUrlChange = function(fn) { + this.urlChange = fn; + }; + + $delegate.url = function() { + return initUrl; + }; + + $delegate.defer = function(fn, delay) { + setTimeout(function() { fn(); }, delay || 0); + }; + + $delegate.baseHref = function() { + return baseHref; + }; + + return $delegate; + }); + }); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-location-hashbang-mode/index-debug.html b/1.3.0-rc.2/docs/examples/example-location-hashbang-mode/index-debug.html new file mode 100644 index 0000000000..92b995afac --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-location-hashbang-mode/index-debug.html @@ -0,0 +1,34 @@ + + + + + Example - example-location-hashbang-mode-debug + + + + + + + + + + + +
+


+
+ $location.protocol() =
+ $location.host() =
+ $location.port() =
+ $location.path() =
+ $location.search() =
+ $location.hash() =
+
+ +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-location-hashbang-mode/index-jquery.html b/1.3.0-rc.2/docs/examples/example-location-hashbang-mode/index-jquery.html new file mode 100644 index 0000000000..dcfc3b8b11 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-location-hashbang-mode/index-jquery.html @@ -0,0 +1,35 @@ + + + + + Example - example-location-hashbang-mode-jquery + + + + + + + + + + + + +
+


+
+ $location.protocol() =
+ $location.host() =
+ $location.port() =
+ $location.path() =
+ $location.search() =
+ $location.hash() =
+
+ +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-location-hashbang-mode/index-production.html b/1.3.0-rc.2/docs/examples/example-location-hashbang-mode/index-production.html new file mode 100644 index 0000000000..b24b0df3d4 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-location-hashbang-mode/index-production.html @@ -0,0 +1,34 @@ + + + + + Example - example-location-hashbang-mode-production + + + + + + + + + + + +
+


+
+ $location.protocol() =
+ $location.host() =
+ $location.port() =
+ $location.path() =
+ $location.search() =
+ $location.hash() =
+
+ +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-location-hashbang-mode/index.html b/1.3.0-rc.2/docs/examples/example-location-hashbang-mode/index.html new file mode 100644 index 0000000000..404e03d687 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-location-hashbang-mode/index.html @@ -0,0 +1,34 @@ + + + + + Example - example-location-hashbang-mode + + + + + + + + + + + +
+


+
+ $location.protocol() =
+ $location.host() =
+ $location.port() =
+ $location.path() =
+ $location.search() =
+ $location.hash() =
+
+ +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-location-hashbang-mode/manifest.json b/1.3.0-rc.2/docs/examples/example-location-hashbang-mode/manifest.json new file mode 100644 index 0000000000..504da50af8 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-location-hashbang-mode/manifest.json @@ -0,0 +1,10 @@ +{ + "name": "example-location-hashbang-mode", + "files": [ + "index-production.html", + "app.js", + "fakeBrowser.js", + "addressBar.js", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-location-hashbang-mode/protractor.js b/1.3.0-rc.2/docs/examples/example-location-hashbang-mode/protractor.js new file mode 100644 index 0000000000..3eb909ee64 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-location-hashbang-mode/protractor.js @@ -0,0 +1,42 @@ + var addressBar = element(by.css("#addressBar")), + url = 'http://www.example.com/base/index.html#!/path?a=b#h'; + + it("should show fake browser info on load", function(){ + expect(addressBar.getAttribute('value')).toBe(url); + + expect(element(by.binding('$location.protocol()')).getText()).toBe('http'); + expect(element(by.binding('$location.host()')).getText()).toBe('www.example.com'); + expect(element(by.binding('$location.port()')).getText()).toBe('80'); + expect(element(by.binding('$location.path()')).getText()).toBe('/path'); + expect(element(by.binding('$location.search()')).getText()).toBe('{"a":"b"}'); + expect(element(by.binding('$location.hash()')).getText()).toBe('h'); + + }); + + it("should change $location accordingly", function(){ + var navigation = element.all(by.css("#navigation a")); + + navigation.get(0).click(); + + expect(addressBar.getAttribute('value')).toBe("http://www.example.com/base/index.html#!/first?a=b"); + + expect(element(by.binding('$location.protocol()')).getText()).toBe('http'); + expect(element(by.binding('$location.host()')).getText()).toBe('www.example.com'); + expect(element(by.binding('$location.port()')).getText()).toBe('80'); + expect(element(by.binding('$location.path()')).getText()).toBe('/first'); + expect(element(by.binding('$location.search()')).getText()).toBe('{"a":"b"}'); + expect(element(by.binding('$location.hash()')).getText()).toBe(''); + + + navigation.get(1).click(); + + expect(addressBar.getAttribute('value')).toBe("http://www.example.com/base/index.html#!/sec/ond?flag#hash"); + + expect(element(by.binding('$location.protocol()')).getText()).toBe('http'); + expect(element(by.binding('$location.host()')).getText()).toBe('www.example.com'); + expect(element(by.binding('$location.port()')).getText()).toBe('80'); + expect(element(by.binding('$location.path()')).getText()).toBe('/sec/ond'); + expect(element(by.binding('$location.search()')).getText()).toBe('{"flag":true}'); + expect(element(by.binding('$location.hash()')).getText()).toBe('hash'); + + }); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-location-html5-mode/addressBar.js b/1.3.0-rc.2/docs/examples/example-location-html5-mode/addressBar.js new file mode 100644 index 0000000000..18d61630bc --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-location-html5-mode/addressBar.js @@ -0,0 +1,24 @@ + angular.module('address-bar', []) + .directive('ngAddressBar', function($browser, $timeout) { + return { + template: 'Address: ', + link: function(scope, element, attrs){ + var input = element.children("input"), delay; + + input.on('keypress keyup keydown', function(event) { + delay = (!delay ? $timeout(fireUrlChange, 250) : null); + event.stopPropagation(); + }) + .val($browser.url()); + + $browser.url = function(url) { + return url ? input.val(url) : input.val(); + }; + + function fireUrlChange() { + delay = null; + $browser.urlChange(input.val()); + } + } + }; + }); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-location-html5-mode/app.js b/1.3.0-rc.2/docs/examples/example-location-html5-mode/app.js new file mode 100644 index 0000000000..d4b08b1f87 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-location-html5-mode/app.js @@ -0,0 +1,23 @@ + angular.module('html5-mode', ['fake-browser', 'address-bar']) + + .constant('initUrl', 'http://www.example.com/base/path?a=b#h') + .constant('baseHref', '/base/index.html') + .value('$sniffer', { history: true }) + + .controller("LocationController", function($scope, $location) { + $scope.$location = {}; + angular.forEach("protocol host port path search hash".split(" "), function(method){ + $scope.$location[method] = function(){ + var result = $location[method].call($location); + return angular.isObject(result) ? angular.toJson(result) : result; + }; + }); + }) + + .config(function($locationProvider) { + $locationProvider.html5Mode(true).hashPrefix('!'); + }) + + .run(function($rootElement) { + $rootElement.on('click', function(e) { e.stopPropagation(); }); + }); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-location-html5-mode/fakeBrowser.js b/1.3.0-rc.2/docs/examples/example-location-html5-mode/fakeBrowser.js new file mode 100644 index 0000000000..72a24e2656 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-location-html5-mode/fakeBrowser.js @@ -0,0 +1,24 @@ +angular.module('fake-browser', []) + +.config(function($provide) { + $provide.decorator('$browser', function($delegate, baseHref, initUrl) { + + $delegate.onUrlChange = function(fn) { + this.urlChange = fn; + }; + + $delegate.url = function() { + return initUrl; + }; + + $delegate.defer = function(fn, delay) { + setTimeout(function() { fn(); }, delay || 0); + }; + + $delegate.baseHref = function() { + return baseHref; + }; + + return $delegate; + }); +}); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-location-html5-mode/index-debug.html b/1.3.0-rc.2/docs/examples/example-location-html5-mode/index-debug.html new file mode 100644 index 0000000000..a3539a00f0 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-location-html5-mode/index-debug.html @@ -0,0 +1,34 @@ + + + + + Example - example-location-html5-mode-debug + + + + + + + + + + + +
+


+
+ $location.protocol() =
+ $location.host() =
+ $location.port() =
+ $location.path() =
+ $location.search() =
+ $location.hash() =
+
+ +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-location-html5-mode/index-jquery.html b/1.3.0-rc.2/docs/examples/example-location-html5-mode/index-jquery.html new file mode 100644 index 0000000000..000324ea2f --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-location-html5-mode/index-jquery.html @@ -0,0 +1,35 @@ + + + + + Example - example-location-html5-mode-jquery + + + + + + + + + + + + +
+


+
+ $location.protocol() =
+ $location.host() =
+ $location.port() =
+ $location.path() =
+ $location.search() =
+ $location.hash() =
+
+ +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-location-html5-mode/index-production.html b/1.3.0-rc.2/docs/examples/example-location-html5-mode/index-production.html new file mode 100644 index 0000000000..36bfc81739 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-location-html5-mode/index-production.html @@ -0,0 +1,34 @@ + + + + + Example - example-location-html5-mode-production + + + + + + + + + + + +
+


+
+ $location.protocol() =
+ $location.host() =
+ $location.port() =
+ $location.path() =
+ $location.search() =
+ $location.hash() =
+
+ +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-location-html5-mode/index.html b/1.3.0-rc.2/docs/examples/example-location-html5-mode/index.html new file mode 100644 index 0000000000..e2d053cf86 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-location-html5-mode/index.html @@ -0,0 +1,34 @@ + + + + + Example - example-location-html5-mode + + + + + + + + + + + +
+


+
+ $location.protocol() =
+ $location.host() =
+ $location.port() =
+ $location.path() =
+ $location.search() =
+ $location.hash() =
+
+ +
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-location-html5-mode/manifest.json b/1.3.0-rc.2/docs/examples/example-location-html5-mode/manifest.json new file mode 100644 index 0000000000..d8e7e30e19 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-location-html5-mode/manifest.json @@ -0,0 +1,10 @@ +{ + "name": "example-location-html5-mode", + "files": [ + "index-production.html", + "app.js", + "fakeBrowser.js", + "addressBar.js", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-location-html5-mode/protractor.js b/1.3.0-rc.2/docs/examples/example-location-html5-mode/protractor.js new file mode 100644 index 0000000000..83021b992d --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-location-html5-mode/protractor.js @@ -0,0 +1,42 @@ + var addressBar = element(by.css("#addressBar")), + url = 'http://www.example.com/base/path?a=b#h'; + + + it("should show fake browser info on load", function(){ + expect(addressBar.getAttribute('value')).toBe(url); + + expect(element(by.binding('$location.protocol()')).getText()).toBe('http'); + expect(element(by.binding('$location.host()')).getText()).toBe('www.example.com'); + expect(element(by.binding('$location.port()')).getText()).toBe('80'); + expect(element(by.binding('$location.path()')).getText()).toBe('/path'); + expect(element(by.binding('$location.search()')).getText()).toBe('{"a":"b"}'); + expect(element(by.binding('$location.hash()')).getText()).toBe('h'); + + }); + + it("should change $location accordingly", function(){ + var navigation = element.all(by.css("#navigation a")); + + navigation.get(0).click(); + + expect(addressBar.getAttribute('value')).toBe("http://www.example.com/base/first?a=b"); + + expect(element(by.binding('$location.protocol()')).getText()).toBe('http'); + expect(element(by.binding('$location.host()')).getText()).toBe('www.example.com'); + expect(element(by.binding('$location.port()')).getText()).toBe('80'); + expect(element(by.binding('$location.path()')).getText()).toBe('/first'); + expect(element(by.binding('$location.search()')).getText()).toBe('{"a":"b"}'); + expect(element(by.binding('$location.hash()')).getText()).toBe(''); + + + navigation.get(1).click(); + + expect(addressBar.getAttribute('value')).toBe("http://www.example.com/base/sec/ond?flag#hash"); + + expect(element(by.binding('$location.protocol()')).getText()).toBe('http'); + expect(element(by.binding('$location.host()')).getText()).toBe('www.example.com'); + expect(element(by.binding('$location.port()')).getText()).toBe('80'); + expect(element(by.binding('$location.path()')).getText()).toBe('/sec/ond'); + expect(element(by.binding('$location.search()')).getText()).toBe('{"flag":true}'); + expect(element(by.binding('$location.hash()')).getText()).toBe('hash'); + }); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-month-input-directive/index-debug.html b/1.3.0-rc.2/docs/examples/example-month-input-directive/index-debug.html new file mode 100644 index 0000000000..d00f0ea2f8 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-month-input-directive/index-debug.html @@ -0,0 +1,35 @@ + + + + + Example - example-month-input-directive-debug + + + + + + + + + +
+ Pick a month int 2013: + + + Required! + + Not a valid month! + value = {{value | date: "yyyy-MM"}}
+ myForm.input.$valid = {{myForm.input.$valid}}
+ myForm.input.$error = {{myForm.input.$error}}
+ myForm.$valid = {{myForm.$valid}}
+ myForm.$error.required = {{!!myForm.$error.required}}
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-month-input-directive/index-jquery.html b/1.3.0-rc.2/docs/examples/example-month-input-directive/index-jquery.html new file mode 100644 index 0000000000..cf4fefdca6 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-month-input-directive/index-jquery.html @@ -0,0 +1,36 @@ + + + + + Example - example-month-input-directive-jquery + + + + + + + + + + +
+ Pick a month int 2013: + + + Required! + + Not a valid month! + value = {{value | date: "yyyy-MM"}}
+ myForm.input.$valid = {{myForm.input.$valid}}
+ myForm.input.$error = {{myForm.input.$error}}
+ myForm.$valid = {{myForm.$valid}}
+ myForm.$error.required = {{!!myForm.$error.required}}
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-month-input-directive/index-production.html b/1.3.0-rc.2/docs/examples/example-month-input-directive/index-production.html new file mode 100644 index 0000000000..867fa38eff --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-month-input-directive/index-production.html @@ -0,0 +1,35 @@ + + + + + Example - example-month-input-directive-production + + + + + + + + + +
+ Pick a month int 2013: + + + Required! + + Not a valid month! + value = {{value | date: "yyyy-MM"}}
+ myForm.input.$valid = {{myForm.input.$valid}}
+ myForm.input.$error = {{myForm.input.$error}}
+ myForm.$valid = {{myForm.$valid}}
+ myForm.$error.required = {{!!myForm.$error.required}}
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-month-input-directive/index.html b/1.3.0-rc.2/docs/examples/example-month-input-directive/index.html new file mode 100644 index 0000000000..289a616c25 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-month-input-directive/index.html @@ -0,0 +1,35 @@ + + + + + Example - example-month-input-directive + + + + + + + + + +
+ Pick a month int 2013: + + + Required! + + Not a valid month! + value = {{value | date: "yyyy-MM"}}
+ myForm.input.$valid = {{myForm.input.$valid}}
+ myForm.input.$error = {{myForm.input.$error}}
+ myForm.$valid = {{myForm.$valid}}
+ myForm.$error.required = {{!!myForm.$error.required}}
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-month-input-directive/manifest.json b/1.3.0-rc.2/docs/examples/example-month-input-directive/manifest.json new file mode 100644 index 0000000000..ba45a6069e --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-month-input-directive/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-month-input-directive", + "files": [ + "index-production.html", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-month-input-directive/protractor.js b/1.3.0-rc.2/docs/examples/example-month-input-directive/protractor.js new file mode 100644 index 0000000000..b6ca264e2c --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-month-input-directive/protractor.js @@ -0,0 +1,31 @@ + var value = element(by.binding('value | date: "yyyy-MM"')); + var valid = element(by.binding('myForm.input.$valid')); + var input = element(by.model('value')); + + // currently protractor/webdriver does not support + // sending keys to all known HTML5 input controls + // for various browsers (https://github.com/angular/protractor/issues/562). + function setInput(val) { + // set the value of the element and force validation. + var scr = "var ipt = document.getElementById('exampleInput'); " + + "ipt.value = '" + val + "';" + + "angular.element(ipt).scope().$apply(function(s) { s.myForm[ipt.name].$setViewValue('" + val + "'); });"; + browser.executeScript(scr); + } + + it('should initialize to model', function() { + expect(value.getText()).toContain('2013-10'); + expect(valid.getText()).toContain('myForm.input.$valid = true'); + }); + + it('should be invalid if empty', function() { + setInput(''); + expect(value.getText()).toEqual('value ='); + expect(valid.getText()).toContain('myForm.input.$valid = false'); + }); + + it('should be invalid if over max', function() { + setInput('2015-01'); + expect(value.getText()).toContain(''); + expect(valid.getText()).toContain('myForm.input.$valid = false'); + }); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-ng-model-cancel-update/app.js b/1.3.0-rc.2/docs/examples/example-ng-model-cancel-update/app.js new file mode 100644 index 0000000000..2f90b672db --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-ng-model-cancel-update/app.js @@ -0,0 +1,15 @@ + angular.module('cancel-update-example', []) + + .controller('CancelUpdateController', ['$scope', function($scope) { + $scope.resetWithCancel = function (e) { + if (e.keyCode == 27) { + $scope.myForm.myInput1.$rollbackViewValue(); + $scope.myValue = ''; + } + }; + $scope.resetWithoutCancel = function (e) { + if (e.keyCode == 27) { + $scope.myValue = ''; + } + }; + }]); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-ng-model-cancel-update/index-debug.html b/1.3.0-rc.2/docs/examples/example-ng-model-cancel-update/index-debug.html new file mode 100644 index 0000000000..9acd940d4b --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-ng-model-cancel-update/index-debug.html @@ -0,0 +1,32 @@ + + + + + Example - example-ng-model-cancel-update-debug + + + + + + + + + +
+

Try typing something in each input. See that the model only updates when you + blur off the input. +

+

Now see what happens if you start typing then press the Escape key

+ +
+

With $rollbackViewValue()

+
+ myValue: "{{ myValue }}" + +

Without $rollbackViewValue()

+
+ myValue: "{{ myValue }}" +
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-ng-model-cancel-update/index-jquery.html b/1.3.0-rc.2/docs/examples/example-ng-model-cancel-update/index-jquery.html new file mode 100644 index 0000000000..a76a830f2a --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-ng-model-cancel-update/index-jquery.html @@ -0,0 +1,33 @@ + + + + + Example - example-ng-model-cancel-update-jquery + + + + + + + + + + +
+

Try typing something in each input. See that the model only updates when you + blur off the input. +

+

Now see what happens if you start typing then press the Escape key

+ +
+

With $rollbackViewValue()

+
+ myValue: "{{ myValue }}" + +

Without $rollbackViewValue()

+
+ myValue: "{{ myValue }}" +
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-ng-model-cancel-update/index-production.html b/1.3.0-rc.2/docs/examples/example-ng-model-cancel-update/index-production.html new file mode 100644 index 0000000000..90faac2509 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-ng-model-cancel-update/index-production.html @@ -0,0 +1,32 @@ + + + + + Example - example-ng-model-cancel-update-production + + + + + + + + + +
+

Try typing something in each input. See that the model only updates when you + blur off the input. +

+

Now see what happens if you start typing then press the Escape key

+ +
+

With $rollbackViewValue()

+
+ myValue: "{{ myValue }}" + +

Without $rollbackViewValue()

+
+ myValue: "{{ myValue }}" +
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-ng-model-cancel-update/index.html b/1.3.0-rc.2/docs/examples/example-ng-model-cancel-update/index.html new file mode 100644 index 0000000000..f61716dd1b --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-ng-model-cancel-update/index.html @@ -0,0 +1,32 @@ + + + + + Example - example-ng-model-cancel-update + + + + + + + + + +
+

Try typing something in each input. See that the model only updates when you + blur off the input. +

+

Now see what happens if you start typing then press the Escape key

+ +
+

With $rollbackViewValue()

+
+ myValue: "{{ myValue }}" + +

Without $rollbackViewValue()

+
+ myValue: "{{ myValue }}" +
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-ng-model-cancel-update/manifest.json b/1.3.0-rc.2/docs/examples/example-ng-model-cancel-update/manifest.json new file mode 100644 index 0000000000..2ddfa1a812 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-ng-model-cancel-update/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-ng-model-cancel-update", + "files": [ + "index-production.html", + "app.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-ngChange-directive/index-debug.html b/1.3.0-rc.2/docs/examples/example-ngChange-directive/index-debug.html new file mode 100644 index 0000000000..92f9be620a --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-ngChange-directive/index-debug.html @@ -0,0 +1,31 @@ + + + + + Example - example-ngChange-directive-debug + + + + + + + + + +
+ + +
+ debug = {{confirmed}}
+ counter = {{counter}}
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-ngChange-directive/index-jquery.html b/1.3.0-rc.2/docs/examples/example-ngChange-directive/index-jquery.html new file mode 100644 index 0000000000..c91026cf0c --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-ngChange-directive/index-jquery.html @@ -0,0 +1,32 @@ + + + + + Example - example-ngChange-directive-jquery + + + + + + + + + + +
+ + +
+ debug = {{confirmed}}
+ counter = {{counter}}
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-ngChange-directive/index-production.html b/1.3.0-rc.2/docs/examples/example-ngChange-directive/index-production.html new file mode 100644 index 0000000000..bc1da7fa73 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-ngChange-directive/index-production.html @@ -0,0 +1,31 @@ + + + + + Example - example-ngChange-directive-production + + + + + + + + + +
+ + +
+ debug = {{confirmed}}
+ counter = {{counter}}
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-ngChange-directive/index.html b/1.3.0-rc.2/docs/examples/example-ngChange-directive/index.html new file mode 100644 index 0000000000..d6b803bb3d --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-ngChange-directive/index.html @@ -0,0 +1,31 @@ + + + + + Example - example-ngChange-directive + + + + + + + + + +
+ + +
+ debug = {{confirmed}}
+ counter = {{counter}}
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-ngChange-directive/manifest.json b/1.3.0-rc.2/docs/examples/example-ngChange-directive/manifest.json new file mode 100644 index 0000000000..738d489cdc --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-ngChange-directive/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-ngChange-directive", + "files": [ + "index-production.html", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-ngChange-directive/protractor.js b/1.3.0-rc.2/docs/examples/example-ngChange-directive/protractor.js new file mode 100644 index 0000000000..0e8c5f71da --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-ngChange-directive/protractor.js @@ -0,0 +1,18 @@ + var counter = element(by.binding('counter')); + var debug = element(by.binding('confirmed')); + + it('should evaluate the expression if changing from view', function() { + expect(counter.getText()).toContain('0'); + + element(by.id('ng-change-example1')).click(); + + expect(counter.getText()).toContain('1'); + expect(debug.getText()).toContain('true'); + }); + + it('should not evaluate the expression if changing from model', function() { + element(by.id('ng-change-example2')).click(); + + expect(counter.getText()).toContain('0'); + expect(debug.getText()).toContain('true'); + }); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-ngController/app.js b/1.3.0-rc.2/docs/examples/example-ngController/app.js new file mode 100644 index 0000000000..f9f5b3e4b8 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-ngController/app.js @@ -0,0 +1,27 @@ + angular.module('controllerExample', []) + .controller('SettingsController2', ['$scope', SettingsController2]); + + function SettingsController2($scope) { + $scope.name = "John Smith"; + $scope.contacts = [ + {type:'phone', value:'408 555 1212'}, + {type:'email', value:'john.smith@example.org'} ]; + + $scope.greet = function() { + alert($scope.name); + }; + + $scope.addContact = function() { + $scope.contacts.push({type:'email', value:'yourname@example.org'}); + }; + + $scope.removeContact = function(contactToRemove) { + var index = $scope.contacts.indexOf(contactToRemove); + $scope.contacts.splice(index, 1); + }; + + $scope.clearContact = function(contact) { + contact.type = 'phone'; + contact.value = ''; + }; + } \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-ngController/index-debug.html b/1.3.0-rc.2/docs/examples/example-ngController/index-debug.html new file mode 100644 index 0000000000..84f5972e44 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-ngController/index-debug.html @@ -0,0 +1,33 @@ + + + + + Example - example-ngController-debug + + + + + + + + + +
+ Name: + [ greet ]
+ Contact: +
    +
  • + + + [ clear + | X ] +
  • +
  • [ add ]
  • +
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-ngController/index-jquery.html b/1.3.0-rc.2/docs/examples/example-ngController/index-jquery.html new file mode 100644 index 0000000000..4268f791c7 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-ngController/index-jquery.html @@ -0,0 +1,34 @@ + + + + + Example - example-ngController-jquery + + + + + + + + + + +
+ Name: + [ greet ]
+ Contact: +
    +
  • + + + [ clear + | X ] +
  • +
  • [ add ]
  • +
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-ngController/index-production.html b/1.3.0-rc.2/docs/examples/example-ngController/index-production.html new file mode 100644 index 0000000000..808827c867 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-ngController/index-production.html @@ -0,0 +1,33 @@ + + + + + Example - example-ngController-production + + + + + + + + + +
+ Name: + [ greet ]
+ Contact: +
    +
  • + + + [ clear + | X ] +
  • +
  • [ add ]
  • +
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-ngController/index.html b/1.3.0-rc.2/docs/examples/example-ngController/index.html new file mode 100644 index 0000000000..8fe40aa898 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-ngController/index.html @@ -0,0 +1,33 @@ + + + + + Example - example-ngController + + + + + + + + + +
+ Name: + [ greet ]
+ Contact: +
    +
  • + + + [ clear + | X ] +
  • +
  • [ add ]
  • +
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-ngController/manifest.json b/1.3.0-rc.2/docs/examples/example-ngController/manifest.json new file mode 100644 index 0000000000..ae92ea9e23 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-ngController/manifest.json @@ -0,0 +1,8 @@ +{ + "name": "example-ngController", + "files": [ + "index-production.html", + "app.js", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-ngController/protractor.js b/1.3.0-rc.2/docs/examples/example-ngController/protractor.js new file mode 100644 index 0000000000..e8beea4100 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-ngController/protractor.js @@ -0,0 +1,28 @@ + it('should check controller', function() { + var container = element(by.id('ctrl-exmpl')); + + expect(container.element(by.model('name')) + .getAttribute('value')).toBe('John Smith'); + + var firstRepeat = + container.element(by.repeater('contact in contacts').row(0)); + var secondRepeat = + container.element(by.repeater('contact in contacts').row(1)); + + expect(firstRepeat.element(by.model('contact.value')).getAttribute('value')) + .toBe('408 555 1212'); + expect(secondRepeat.element(by.model('contact.value')).getAttribute('value')) + .toBe('john.smith@example.org'); + + firstRepeat.element(by.linkText('clear')).click(); + + expect(firstRepeat.element(by.model('contact.value')).getAttribute('value')) + .toBe(''); + + container.element(by.linkText('add')).click(); + + expect(container.element(by.repeater('contact in contacts').row(2)) + .element(by.model('contact.value')) + .getAttribute('value')) + .toBe('yourname@example.org'); + }); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-ngControllerAs/app.js b/1.3.0-rc.2/docs/examples/example-ngControllerAs/app.js new file mode 100644 index 0000000000..ef08270fee --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-ngControllerAs/app.js @@ -0,0 +1,27 @@ + angular.module('controllerAsExample', []) + .controller('SettingsController1', SettingsController1); + + function SettingsController1() { + this.name = "John Smith"; + this.contacts = [ + {type: 'phone', value: '408 555 1212'}, + {type: 'email', value: 'john.smith@example.org'} ]; + } + + SettingsController1.prototype.greet = function() { + alert(this.name); + }; + + SettingsController1.prototype.addContact = function() { + this.contacts.push({type: 'email', value: 'yourname@example.org'}); + }; + + SettingsController1.prototype.removeContact = function(contactToRemove) { + var index = this.contacts.indexOf(contactToRemove); + this.contacts.splice(index, 1); + }; + + SettingsController1.prototype.clearContact = function(contact) { + contact.type = 'phone'; + contact.value = ''; + }; \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-ngControllerAs/index-debug.html b/1.3.0-rc.2/docs/examples/example-ngControllerAs/index-debug.html new file mode 100644 index 0000000000..2b5d702645 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-ngControllerAs/index-debug.html @@ -0,0 +1,33 @@ + + + + + Example - example-ngControllerAs-debug + + + + + + + + + +
+ Name: + [ greet ]
+ Contact: +
    +
  • + + + [ clear + | X ] +
  • +
  • [ add ]
  • +
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-ngControllerAs/index-jquery.html b/1.3.0-rc.2/docs/examples/example-ngControllerAs/index-jquery.html new file mode 100644 index 0000000000..4957869228 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-ngControllerAs/index-jquery.html @@ -0,0 +1,34 @@ + + + + + Example - example-ngControllerAs-jquery + + + + + + + + + + +
+ Name: + [ greet ]
+ Contact: +
    +
  • + + + [ clear + | X ] +
  • +
  • [ add ]
  • +
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-ngControllerAs/index-production.html b/1.3.0-rc.2/docs/examples/example-ngControllerAs/index-production.html new file mode 100644 index 0000000000..0518c30848 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-ngControllerAs/index-production.html @@ -0,0 +1,33 @@ + + + + + Example - example-ngControllerAs-production + + + + + + + + + +
+ Name: + [ greet ]
+ Contact: +
    +
  • + + + [ clear + | X ] +
  • +
  • [ add ]
  • +
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-ngControllerAs/index.html b/1.3.0-rc.2/docs/examples/example-ngControllerAs/index.html new file mode 100644 index 0000000000..a3f3f60149 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-ngControllerAs/index.html @@ -0,0 +1,33 @@ + + + + + Example - example-ngControllerAs + + + + + + + + + +
+ Name: + [ greet ]
+ Contact: +
    +
  • + + + [ clear + | X ] +
  • +
  • [ add ]
  • +
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-ngControllerAs/manifest.json b/1.3.0-rc.2/docs/examples/example-ngControllerAs/manifest.json new file mode 100644 index 0000000000..b54b3acd59 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-ngControllerAs/manifest.json @@ -0,0 +1,8 @@ +{ + "name": "example-ngControllerAs", + "files": [ + "index-production.html", + "app.js", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-ngControllerAs/protractor.js b/1.3.0-rc.2/docs/examples/example-ngControllerAs/protractor.js new file mode 100644 index 0000000000..9a0b5e138f --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-ngControllerAs/protractor.js @@ -0,0 +1,28 @@ + it('should check controller as', function() { + var container = element(by.id('ctrl-as-exmpl')); + expect(container.element(by.model('settings.name')) + .getAttribute('value')).toBe('John Smith'); + + var firstRepeat = + container.element(by.repeater('contact in settings.contacts').row(0)); + var secondRepeat = + container.element(by.repeater('contact in settings.contacts').row(1)); + + expect(firstRepeat.element(by.model('contact.value')).getAttribute('value')) + .toBe('408 555 1212'); + + expect(secondRepeat.element(by.model('contact.value')).getAttribute('value')) + .toBe('john.smith@example.org'); + + firstRepeat.element(by.linkText('clear')).click(); + + expect(firstRepeat.element(by.model('contact.value')).getAttribute('value')) + .toBe(''); + + container.element(by.linkText('add')).click(); + + expect(container.element(by.repeater('contact in settings.contacts').row(2)) + .element(by.model('contact.value')) + .getAttribute('value')) + .toBe('yourname@example.org'); + }); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-ngList-directive-newlines/index-debug.html b/1.3.0-rc.2/docs/examples/example-ngList-directive-newlines/index-debug.html new file mode 100644 index 0000000000..7fb5c144a6 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-ngList-directive-newlines/index-debug.html @@ -0,0 +1,17 @@ + + + + + Example - example-ngList-directive-newlines-debug + + + + + + + + + +
{{ list | json }}
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-ngList-directive-newlines/index-jquery.html b/1.3.0-rc.2/docs/examples/example-ngList-directive-newlines/index-jquery.html new file mode 100644 index 0000000000..8e2e1a6cdc --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-ngList-directive-newlines/index-jquery.html @@ -0,0 +1,18 @@ + + + + + Example - example-ngList-directive-newlines-jquery + + + + + + + + + + +
{{ list | json }}
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-ngList-directive-newlines/index-production.html b/1.3.0-rc.2/docs/examples/example-ngList-directive-newlines/index-production.html new file mode 100644 index 0000000000..56db4e5f96 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-ngList-directive-newlines/index-production.html @@ -0,0 +1,17 @@ + + + + + Example - example-ngList-directive-newlines-production + + + + + + + + + +
{{ list | json }}
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-ngList-directive-newlines/index.html b/1.3.0-rc.2/docs/examples/example-ngList-directive-newlines/index.html new file mode 100644 index 0000000000..9c291c64d7 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-ngList-directive-newlines/index.html @@ -0,0 +1,17 @@ + + + + + Example - example-ngList-directive-newlines + + + + + + + + + +
{{ list | json }}
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-ngList-directive-newlines/manifest.json b/1.3.0-rc.2/docs/examples/example-ngList-directive-newlines/manifest.json new file mode 100644 index 0000000000..887abf2e03 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-ngList-directive-newlines/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-ngList-directive-newlines", + "files": [ + "index-production.html", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-ngList-directive-newlines/protractor.js b/1.3.0-rc.2/docs/examples/example-ngList-directive-newlines/protractor.js new file mode 100644 index 0000000000..9d1b65dcde --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-ngList-directive-newlines/protractor.js @@ -0,0 +1,6 @@ + it("should split the text by newlines", function() { + var listInput = element(by.model('list')); + var output = element(by.binding('list | json')); + listInput.sendKeys('abc\ndef\nghi'); + expect(output.getText()).toContain('[\n "abc",\n "def",\n "ghi"\n]'); + }); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-ngList-directive/app.js b/1.3.0-rc.2/docs/examples/example-ngList-directive/app.js new file mode 100644 index 0000000000..e4929aca71 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-ngList-directive/app.js @@ -0,0 +1,4 @@ + angular.module('listExample', []) + .controller('ExampleController', ['$scope', function($scope) { + $scope.names = ['morpheus', 'neo', 'trinity']; + }]); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-ngList-directive/index-debug.html b/1.3.0-rc.2/docs/examples/example-ngList-directive/index-debug.html new file mode 100644 index 0000000000..7513308a8b --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-ngList-directive/index-debug.html @@ -0,0 +1,27 @@ + + + + + Example - example-ngList-directive-debug + + + + + + + + + +
+ List: + + Required! +
+ names = {{names}}
+ myForm.namesInput.$valid = {{myForm.namesInput.$valid}}
+ myForm.namesInput.$error = {{myForm.namesInput.$error}}
+ myForm.$valid = {{myForm.$valid}}
+ myForm.$error.required = {{!!myForm.$error.required}}
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-ngList-directive/index-jquery.html b/1.3.0-rc.2/docs/examples/example-ngList-directive/index-jquery.html new file mode 100644 index 0000000000..fffa2e62c7 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-ngList-directive/index-jquery.html @@ -0,0 +1,28 @@ + + + + + Example - example-ngList-directive-jquery + + + + + + + + + + +
+ List: + + Required! +
+ names = {{names}}
+ myForm.namesInput.$valid = {{myForm.namesInput.$valid}}
+ myForm.namesInput.$error = {{myForm.namesInput.$error}}
+ myForm.$valid = {{myForm.$valid}}
+ myForm.$error.required = {{!!myForm.$error.required}}
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-ngList-directive/index-production.html b/1.3.0-rc.2/docs/examples/example-ngList-directive/index-production.html new file mode 100644 index 0000000000..ac6400a056 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-ngList-directive/index-production.html @@ -0,0 +1,27 @@ + + + + + Example - example-ngList-directive-production + + + + + + + + + +
+ List: + + Required! +
+ names = {{names}}
+ myForm.namesInput.$valid = {{myForm.namesInput.$valid}}
+ myForm.namesInput.$error = {{myForm.namesInput.$error}}
+ myForm.$valid = {{myForm.$valid}}
+ myForm.$error.required = {{!!myForm.$error.required}}
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-ngList-directive/index.html b/1.3.0-rc.2/docs/examples/example-ngList-directive/index.html new file mode 100644 index 0000000000..d5c662f3f7 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-ngList-directive/index.html @@ -0,0 +1,27 @@ + + + + + Example - example-ngList-directive + + + + + + + + + +
+ List: + + Required! +
+ names = {{names}}
+ myForm.namesInput.$valid = {{myForm.namesInput.$valid}}
+ myForm.namesInput.$error = {{myForm.namesInput.$error}}
+ myForm.$valid = {{myForm.$valid}}
+ myForm.$error.required = {{!!myForm.$error.required}}
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-ngList-directive/manifest.json b/1.3.0-rc.2/docs/examples/example-ngList-directive/manifest.json new file mode 100644 index 0000000000..46ff1d990b --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-ngList-directive/manifest.json @@ -0,0 +1,8 @@ +{ + "name": "example-ngList-directive", + "files": [ + "index-production.html", + "app.js", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-ngList-directive/protractor.js b/1.3.0-rc.2/docs/examples/example-ngList-directive/protractor.js new file mode 100644 index 0000000000..6ab8ec4ed1 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-ngList-directive/protractor.js @@ -0,0 +1,19 @@ + var listInput = element(by.model('names')); + var names = element(by.exactBinding('names')); + var valid = element(by.binding('myForm.namesInput.$valid')); + var error = element(by.css('span.error')); + + it('should initialize to model', function() { + expect(names.getText()).toContain('["morpheus","neo","trinity"]'); + expect(valid.getText()).toContain('true'); + expect(error.getCssValue('display')).toBe('none'); + }); + + it('should be invalid if empty', function() { + listInput.clear(); + listInput.sendKeys(''); + + expect(names.getText()).toContain(''); + expect(valid.getText()).toContain('false'); + expect(error.getCssValue('display')).not.toBe('none'); + }); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-ngMessages-directive/index-debug.html b/1.3.0-rc.2/docs/examples/example-ngMessages-directive/index-debug.html new file mode 100644 index 0000000000..78bb1255ad --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-ngMessages-directive/index-debug.html @@ -0,0 +1,36 @@ + + + + + Example - example-ngMessages-directive-debug + + + + + + + + + + +
+ + + +
myForm.myName.$error = {{ myForm.myName.$error | json }}
+ +
+
You did not enter a field
+
Your field is too short
+
Your field is too long
+
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-ngMessages-directive/index-jquery.html b/1.3.0-rc.2/docs/examples/example-ngMessages-directive/index-jquery.html new file mode 100644 index 0000000000..5cb2fbfe02 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-ngMessages-directive/index-jquery.html @@ -0,0 +1,37 @@ + + + + + Example - example-ngMessages-directive-jquery + + + + + + + + + + + +
+ + + +
myForm.myName.$error = {{ myForm.myName.$error | json }}
+ +
+
You did not enter a field
+
Your field is too short
+
Your field is too long
+
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-ngMessages-directive/index-production.html b/1.3.0-rc.2/docs/examples/example-ngMessages-directive/index-production.html new file mode 100644 index 0000000000..22914d763a --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-ngMessages-directive/index-production.html @@ -0,0 +1,36 @@ + + + + + Example - example-ngMessages-directive-production + + + + + + + + + + +
+ + + +
myForm.myName.$error = {{ myForm.myName.$error | json }}
+ +
+
You did not enter a field
+
Your field is too short
+
Your field is too long
+
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-ngMessages-directive/index.html b/1.3.0-rc.2/docs/examples/example-ngMessages-directive/index.html new file mode 100644 index 0000000000..76ffa1cf7f --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-ngMessages-directive/index.html @@ -0,0 +1,36 @@ + + + + + Example - example-ngMessages-directive + + + + + + + + + + +
+ + + +
myForm.myName.$error = {{ myForm.myName.$error | json }}
+ +
+
You did not enter a field
+
Your field is too short
+
Your field is too long
+
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-ngMessages-directive/manifest.json b/1.3.0-rc.2/docs/examples/example-ngMessages-directive/manifest.json new file mode 100644 index 0000000000..1918dce064 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-ngMessages-directive/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-ngMessages-directive", + "files": [ + "index-production.html", + "script.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-ngMessages-directive/script.js b/1.3.0-rc.2/docs/examples/example-ngMessages-directive/script.js new file mode 100644 index 0000000000..e2fe833d04 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-ngMessages-directive/script.js @@ -0,0 +1 @@ + angular.module('ngMessagesExample', ['ngMessages']); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-ngModel-getter-setter/app.js b/1.3.0-rc.2/docs/examples/example-ngModel-getter-setter/app.js new file mode 100644 index 0000000000..29e34fa9e1 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-ngModel-getter-setter/app.js @@ -0,0 +1,12 @@ + angular.module('getterSetterExample', []) + .controller('ExampleController', ['$scope', function($scope) { + var _name = 'Brian'; + $scope.user = { + name: function (newName) { + if (angular.isDefined(newName)) { + _name = newName; + } + return _name; + } + }; + }]); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-ngModel-getter-setter/index-debug.html b/1.3.0-rc.2/docs/examples/example-ngModel-getter-setter/index-debug.html new file mode 100644 index 0000000000..5745c0a502 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-ngModel-getter-setter/index-debug.html @@ -0,0 +1,25 @@ + + + + + Example - example-ngModel-getter-setter-debug + + + + + + + + + +
+
+ Name: + +
+
user.name = 
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-ngModel-getter-setter/index-jquery.html b/1.3.0-rc.2/docs/examples/example-ngModel-getter-setter/index-jquery.html new file mode 100644 index 0000000000..5dae1227be --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-ngModel-getter-setter/index-jquery.html @@ -0,0 +1,26 @@ + + + + + Example - example-ngModel-getter-setter-jquery + + + + + + + + + + +
+
+ Name: + +
+
user.name = 
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-ngModel-getter-setter/index-production.html b/1.3.0-rc.2/docs/examples/example-ngModel-getter-setter/index-production.html new file mode 100644 index 0000000000..2850f22edb --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-ngModel-getter-setter/index-production.html @@ -0,0 +1,25 @@ + + + + + Example - example-ngModel-getter-setter-production + + + + + + + + + +
+
+ Name: + +
+
user.name = 
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-ngModel-getter-setter/index.html b/1.3.0-rc.2/docs/examples/example-ngModel-getter-setter/index.html new file mode 100644 index 0000000000..5ce0a9a00e --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-ngModel-getter-setter/index.html @@ -0,0 +1,25 @@ + + + + + Example - example-ngModel-getter-setter + + + + + + + + + +
+
+ Name: + +
+
user.name = 
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-ngModel-getter-setter/manifest.json b/1.3.0-rc.2/docs/examples/example-ngModel-getter-setter/manifest.json new file mode 100644 index 0000000000..2d8bb1e7b8 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-ngModel-getter-setter/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-ngModel-getter-setter", + "files": [ + "index-production.html", + "app.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-ngModelOptions-directive-blur/app.js b/1.3.0-rc.2/docs/examples/example-ngModelOptions-directive-blur/app.js new file mode 100644 index 0000000000..94f514ec37 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-ngModelOptions-directive-blur/app.js @@ -0,0 +1,10 @@ + angular.module('optionsExample', []) + .controller('ExampleController', ['$scope', function($scope) { + $scope.user = { name: 'say', data: '' }; + + $scope.cancel = function (e) { + if (e.keyCode == 27) { + $scope.userForm.userName.$rollbackViewValue(); + } + }; + }]); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-ngModelOptions-directive-blur/index-debug.html b/1.3.0-rc.2/docs/examples/example-ngModelOptions-directive-blur/index-debug.html new file mode 100644 index 0000000000..acc89ea786 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-ngModelOptions-directive-blur/index-debug.html @@ -0,0 +1,29 @@ + + + + + Example - example-ngModelOptions-directive-blur-debug + + + + + + + + + +
+
+ Name: +
+ + Other data: +
+
+
user.name = 
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-ngModelOptions-directive-blur/index-jquery.html b/1.3.0-rc.2/docs/examples/example-ngModelOptions-directive-blur/index-jquery.html new file mode 100644 index 0000000000..23f64b7b50 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-ngModelOptions-directive-blur/index-jquery.html @@ -0,0 +1,30 @@ + + + + + Example - example-ngModelOptions-directive-blur-jquery + + + + + + + + + + +
+
+ Name: +
+ + Other data: +
+
+
user.name = 
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-ngModelOptions-directive-blur/index-production.html b/1.3.0-rc.2/docs/examples/example-ngModelOptions-directive-blur/index-production.html new file mode 100644 index 0000000000..5d23d424b2 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-ngModelOptions-directive-blur/index-production.html @@ -0,0 +1,29 @@ + + + + + Example - example-ngModelOptions-directive-blur-production + + + + + + + + + +
+
+ Name: +
+ + Other data: +
+
+
user.name = 
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-ngModelOptions-directive-blur/index.html b/1.3.0-rc.2/docs/examples/example-ngModelOptions-directive-blur/index.html new file mode 100644 index 0000000000..822e9ec919 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-ngModelOptions-directive-blur/index.html @@ -0,0 +1,29 @@ + + + + + Example - example-ngModelOptions-directive-blur + + + + + + + + + +
+
+ Name: +
+ + Other data: +
+
+
user.name = 
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-ngModelOptions-directive-blur/manifest.json b/1.3.0-rc.2/docs/examples/example-ngModelOptions-directive-blur/manifest.json new file mode 100644 index 0000000000..84481b31ea --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-ngModelOptions-directive-blur/manifest.json @@ -0,0 +1,8 @@ +{ + "name": "example-ngModelOptions-directive-blur", + "files": [ + "index-production.html", + "app.js", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-ngModelOptions-directive-blur/protractor.js b/1.3.0-rc.2/docs/examples/example-ngModelOptions-directive-blur/protractor.js new file mode 100644 index 0000000000..4dbe2f51fe --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-ngModelOptions-directive-blur/protractor.js @@ -0,0 +1,20 @@ + var model = element(by.binding('user.name')); + var input = element(by.model('user.name')); + var other = element(by.model('user.data')); + + it('should allow custom events', function() { + input.sendKeys(' hello'); + input.click(); + expect(model.getText()).toEqual('say'); + other.click(); + expect(model.getText()).toEqual('say hello'); + }); + + it('should $rollbackViewValue when model changes', function() { + input.sendKeys(' hello'); + expect(input.getAttribute('value')).toEqual('say hello'); + input.sendKeys(protractor.Key.ESCAPE); + expect(input.getAttribute('value')).toEqual('say'); + other.click(); + expect(model.getText()).toEqual('say'); + }); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-ngModelOptions-directive-debounce/app.js b/1.3.0-rc.2/docs/examples/example-ngModelOptions-directive-debounce/app.js new file mode 100644 index 0000000000..701673d171 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-ngModelOptions-directive-debounce/app.js @@ -0,0 +1,4 @@ + angular.module('optionsExample', []) + .controller('ExampleController', ['$scope', function($scope) { + $scope.user = { name: 'say' }; + }]); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-ngModelOptions-directive-debounce/index-debug.html b/1.3.0-rc.2/docs/examples/example-ngModelOptions-directive-debounce/index-debug.html new file mode 100644 index 0000000000..b07001c83e --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-ngModelOptions-directive-debounce/index-debug.html @@ -0,0 +1,26 @@ + + + + + Example - example-ngModelOptions-directive-debounce-debug + + + + + + + + + +
+
+ Name: + +
+
+
user.name = 
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-ngModelOptions-directive-debounce/index-jquery.html b/1.3.0-rc.2/docs/examples/example-ngModelOptions-directive-debounce/index-jquery.html new file mode 100644 index 0000000000..dac820e910 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-ngModelOptions-directive-debounce/index-jquery.html @@ -0,0 +1,27 @@ + + + + + Example - example-ngModelOptions-directive-debounce-jquery + + + + + + + + + + +
+
+ Name: + +
+
+
user.name = 
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-ngModelOptions-directive-debounce/index-production.html b/1.3.0-rc.2/docs/examples/example-ngModelOptions-directive-debounce/index-production.html new file mode 100644 index 0000000000..ffba06c6f0 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-ngModelOptions-directive-debounce/index-production.html @@ -0,0 +1,26 @@ + + + + + Example - example-ngModelOptions-directive-debounce-production + + + + + + + + + +
+
+ Name: + +
+
+
user.name = 
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-ngModelOptions-directive-debounce/index.html b/1.3.0-rc.2/docs/examples/example-ngModelOptions-directive-debounce/index.html new file mode 100644 index 0000000000..7be0f974fb --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-ngModelOptions-directive-debounce/index.html @@ -0,0 +1,26 @@ + + + + + Example - example-ngModelOptions-directive-debounce + + + + + + + + + +
+
+ Name: + +
+
+
user.name = 
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-ngModelOptions-directive-debounce/manifest.json b/1.3.0-rc.2/docs/examples/example-ngModelOptions-directive-debounce/manifest.json new file mode 100644 index 0000000000..c1836815bf --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-ngModelOptions-directive-debounce/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-ngModelOptions-directive-debounce", + "files": [ + "index-production.html", + "app.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-ngModelOptions-directive-getter-setter/app.js b/1.3.0-rc.2/docs/examples/example-ngModelOptions-directive-getter-setter/app.js new file mode 100644 index 0000000000..e00d27859b --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-ngModelOptions-directive-getter-setter/app.js @@ -0,0 +1,9 @@ + angular.module('getterSetterExample', []) + .controller('ExampleController', ['$scope', function($scope) { + var _name = 'Brian'; + $scope.user = { + name: function (newName) { + return angular.isDefined(newName) ? (_name = newName) : _name; + } + }; + }]); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-ngModelOptions-directive-getter-setter/index-debug.html b/1.3.0-rc.2/docs/examples/example-ngModelOptions-directive-getter-setter/index-debug.html new file mode 100644 index 0000000000..3e4898ebf8 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-ngModelOptions-directive-getter-setter/index-debug.html @@ -0,0 +1,25 @@ + + + + + Example - example-ngModelOptions-directive-getter-setter-debug + + + + + + + + + +
+
+ Name: + +
+
user.name = 
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-ngModelOptions-directive-getter-setter/index-jquery.html b/1.3.0-rc.2/docs/examples/example-ngModelOptions-directive-getter-setter/index-jquery.html new file mode 100644 index 0000000000..f82502dcd4 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-ngModelOptions-directive-getter-setter/index-jquery.html @@ -0,0 +1,26 @@ + + + + + Example - example-ngModelOptions-directive-getter-setter-jquery + + + + + + + + + + +
+
+ Name: + +
+
user.name = 
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-ngModelOptions-directive-getter-setter/index-production.html b/1.3.0-rc.2/docs/examples/example-ngModelOptions-directive-getter-setter/index-production.html new file mode 100644 index 0000000000..b3d6553c71 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-ngModelOptions-directive-getter-setter/index-production.html @@ -0,0 +1,25 @@ + + + + + Example - example-ngModelOptions-directive-getter-setter-production + + + + + + + + + +
+
+ Name: + +
+
user.name = 
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-ngModelOptions-directive-getter-setter/index.html b/1.3.0-rc.2/docs/examples/example-ngModelOptions-directive-getter-setter/index.html new file mode 100644 index 0000000000..c1b0fa3e46 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-ngModelOptions-directive-getter-setter/index.html @@ -0,0 +1,25 @@ + + + + + Example - example-ngModelOptions-directive-getter-setter + + + + + + + + + +
+
+ Name: + +
+
user.name = 
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-ngModelOptions-directive-getter-setter/manifest.json b/1.3.0-rc.2/docs/examples/example-ngModelOptions-directive-getter-setter/manifest.json new file mode 100644 index 0000000000..3fbf3d7b08 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-ngModelOptions-directive-getter-setter/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-ngModelOptions-directive-getter-setter", + "files": [ + "index-production.html", + "app.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-ngValue-directive/index-debug.html b/1.3.0-rc.2/docs/examples/example-ngValue-directive/index-debug.html new file mode 100644 index 0000000000..b5e1776823 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-ngValue-directive/index-debug.html @@ -0,0 +1,34 @@ + + + + + Example - example-ngValue-directive-debug + + + + + + + + + +
+

Which is your favorite?

+ +
You chose {{my.favorite}}
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-ngValue-directive/index-jquery.html b/1.3.0-rc.2/docs/examples/example-ngValue-directive/index-jquery.html new file mode 100644 index 0000000000..b70b4a0318 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-ngValue-directive/index-jquery.html @@ -0,0 +1,35 @@ + + + + + Example - example-ngValue-directive-jquery + + + + + + + + + + +
+

Which is your favorite?

+ +
You chose {{my.favorite}}
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-ngValue-directive/index-production.html b/1.3.0-rc.2/docs/examples/example-ngValue-directive/index-production.html new file mode 100644 index 0000000000..8db5d46adb --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-ngValue-directive/index-production.html @@ -0,0 +1,34 @@ + + + + + Example - example-ngValue-directive-production + + + + + + + + + +
+

Which is your favorite?

+ +
You chose {{my.favorite}}
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-ngValue-directive/index.html b/1.3.0-rc.2/docs/examples/example-ngValue-directive/index.html new file mode 100644 index 0000000000..c94e899501 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-ngValue-directive/index.html @@ -0,0 +1,34 @@ + + + + + Example - example-ngValue-directive + + + + + + + + + +
+

Which is your favorite?

+ +
You chose {{my.favorite}}
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-ngValue-directive/manifest.json b/1.3.0-rc.2/docs/examples/example-ngValue-directive/manifest.json new file mode 100644 index 0000000000..1e8f897466 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-ngValue-directive/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-ngValue-directive", + "files": [ + "index-production.html", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-ngValue-directive/protractor.js b/1.3.0-rc.2/docs/examples/example-ngValue-directive/protractor.js new file mode 100644 index 0000000000..1b750cee10 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-ngValue-directive/protractor.js @@ -0,0 +1,9 @@ + var favorite = element(by.binding('my.favorite')); + + it('should initialize to model', function() { + expect(favorite.getText()).toContain('unicorns'); + }); + it('should bind the values to the inputs', function() { + element.all(by.model('my.favorite')).get(0).click(); + expect(favorite.getText()).toContain('pizza'); + }); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-ngView-directive/animations.css b/1.3.0-rc.2/docs/examples/example-ngView-directive/animations.css new file mode 100644 index 0000000000..da5a8473ae --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-ngView-directive/animations.css @@ -0,0 +1,39 @@ + .view-animate-container { + position:relative; + height:100px!important; + position:relative; + background:white; + border:1px solid black; + height:40px; + overflow:hidden; + } + + .view-animate { + padding:10px; + } + + .view-animate.ng-enter, .view-animate.ng-leave { + -webkit-transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 1.5s; + transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 1.5s; + + display:block; + width:100%; + border-left:1px solid black; + + position:absolute; + top:0; + left:0; + right:0; + bottom:0; + padding:10px; + } + + .view-animate.ng-enter { + left:100%; + } + .view-animate.ng-enter.ng-enter-active { + left:0; + } + .view-animate.ng-leave.ng-leave-active { + left:-100%; + } \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-ngView-directive/book.html b/1.3.0-rc.2/docs/examples/example-ngView-directive/book.html new file mode 100644 index 0000000000..1a50c4e977 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-ngView-directive/book.html @@ -0,0 +1,4 @@ +
+ controller: {{book.name}}
+ Book Id: {{book.params.bookId}}
+
\ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-ngView-directive/chapter.html b/1.3.0-rc.2/docs/examples/example-ngView-directive/chapter.html new file mode 100644 index 0000000000..e12ec0779f --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-ngView-directive/chapter.html @@ -0,0 +1,5 @@ +
+ controller: {{chapter.name}}
+ Book Id: {{chapter.params.bookId}}
+ Chapter Id: {{chapter.params.chapterId}} +
\ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-ngView-directive/index-debug.html b/1.3.0-rc.2/docs/examples/example-ngView-directive/index-debug.html new file mode 100644 index 0000000000..9c215bd9c1 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-ngView-directive/index-debug.html @@ -0,0 +1,39 @@ + + + + + Example - example-ngView-directive-debug + + + + + + + + + + + + +
+ Choose: + Moby | + Moby: Ch1 | + Gatsby | + Gatsby: Ch4 | + Scarlet Letter
+ +
+
+
+
+ +
$location.path() = {{main.$location.path()}}
+
$route.current.templateUrl = {{main.$route.current.templateUrl}}
+
$route.current.params = {{main.$route.current.params}}
+
$routeParams = {{main.$routeParams}}
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-ngView-directive/index-jquery.html b/1.3.0-rc.2/docs/examples/example-ngView-directive/index-jquery.html new file mode 100644 index 0000000000..dc1bc2ac99 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-ngView-directive/index-jquery.html @@ -0,0 +1,40 @@ + + + + + Example - example-ngView-directive-jquery + + + + + + + + + + + + + +
+ Choose: + Moby | + Moby: Ch1 | + Gatsby | + Gatsby: Ch4 | + Scarlet Letter
+ +
+
+
+
+ +
$location.path() = {{main.$location.path()}}
+
$route.current.templateUrl = {{main.$route.current.templateUrl}}
+
$route.current.params = {{main.$route.current.params}}
+
$routeParams = {{main.$routeParams}}
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-ngView-directive/index-production.html b/1.3.0-rc.2/docs/examples/example-ngView-directive/index-production.html new file mode 100644 index 0000000000..c53565e7d4 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-ngView-directive/index-production.html @@ -0,0 +1,39 @@ + + + + + Example - example-ngView-directive-production + + + + + + + + + + + + +
+ Choose: + Moby | + Moby: Ch1 | + Gatsby | + Gatsby: Ch4 | + Scarlet Letter
+ +
+
+
+
+ +
$location.path() = {{main.$location.path()}}
+
$route.current.templateUrl = {{main.$route.current.templateUrl}}
+
$route.current.params = {{main.$route.current.params}}
+
$routeParams = {{main.$routeParams}}
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-ngView-directive/index.html b/1.3.0-rc.2/docs/examples/example-ngView-directive/index.html new file mode 100644 index 0000000000..3137983796 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-ngView-directive/index.html @@ -0,0 +1,39 @@ + + + + + Example - example-ngView-directive + + + + + + + + + + + + +
+ Choose: + Moby | + Moby: Ch1 | + Gatsby | + Gatsby: Ch4 | + Scarlet Letter
+ +
+
+
+
+ +
$location.path() = {{main.$location.path()}}
+
$route.current.templateUrl = {{main.$route.current.templateUrl}}
+
$route.current.params = {{main.$route.current.params}}
+
$routeParams = {{main.$routeParams}}
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-ngView-directive/manifest.json b/1.3.0-rc.2/docs/examples/example-ngView-directive/manifest.json new file mode 100644 index 0000000000..5ebc47d05d --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-ngView-directive/manifest.json @@ -0,0 +1,11 @@ +{ + "name": "example-ngView-directive", + "files": [ + "index-production.html", + "book.html", + "chapter.html", + "animations.css", + "script.js", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-ngView-directive/protractor.js b/1.3.0-rc.2/docs/examples/example-ngView-directive/protractor.js new file mode 100644 index 0000000000..76425d75cd --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-ngView-directive/protractor.js @@ -0,0 +1,13 @@ + it('should load and compile correct template', function() { + element(by.linkText('Moby: Ch1')).click(); + var content = element(by.css('[ng-view]')).getText(); + expect(content).toMatch(/controller\: ChapterCtrl/); + expect(content).toMatch(/Book Id\: Moby/); + expect(content).toMatch(/Chapter Id\: 1/); + + element(by.partialLinkText('Scarlet')).click(); + + content = element(by.css('[ng-view]')).getText(); + expect(content).toMatch(/controller\: BookCtrl/); + expect(content).toMatch(/Book Id\: Scarlet/); + }); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-ngView-directive/script.js b/1.3.0-rc.2/docs/examples/example-ngView-directive/script.js new file mode 100644 index 0000000000..71871e5e9e --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-ngView-directive/script.js @@ -0,0 +1,31 @@ + angular.module('ngViewExample', ['ngRoute', 'ngAnimate']) + .config(['$routeProvider', '$locationProvider', + function($routeProvider, $locationProvider) { + $routeProvider + .when('/Book/:bookId', { + templateUrl: 'book.html', + controller: 'BookCtrl', + controllerAs: 'book' + }) + .when('/Book/:bookId/ch/:chapterId', { + templateUrl: 'chapter.html', + controller: 'ChapterCtrl', + controllerAs: 'chapter' + }); + + $locationProvider.html5Mode(true); + }]) + .controller('MainCtrl', ['$route', '$routeParams', '$location', + function($route, $routeParams, $location) { + this.$route = $route; + this.$location = $location; + this.$routeParams = $routeParams; + }]) + .controller('BookCtrl', ['$routeParams', function($routeParams) { + this.name = "BookCtrl"; + this.params = $routeParams; + }]) + .controller('ChapterCtrl', ['$routeParams', function($routeParams) { + this.name = "ChapterCtrl"; + this.params = $routeParams; + }]); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-number-input-directive/index-debug.html b/1.3.0-rc.2/docs/examples/example-number-input-directive/index-debug.html new file mode 100644 index 0000000000..399c8351c4 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-number-input-directive/index-debug.html @@ -0,0 +1,34 @@ + + + + + Example - example-number-input-directive-debug + + + + + + + + + +
+ Number: + + Required! + + Not valid number! + value = {{value}}
+ myForm.input.$valid = {{myForm.input.$valid}}
+ myForm.input.$error = {{myForm.input.$error}}
+ myForm.$valid = {{myForm.$valid}}
+ myForm.$error.required = {{!!myForm.$error.required}}
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-number-input-directive/index-jquery.html b/1.3.0-rc.2/docs/examples/example-number-input-directive/index-jquery.html new file mode 100644 index 0000000000..7df5a490bd --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-number-input-directive/index-jquery.html @@ -0,0 +1,35 @@ + + + + + Example - example-number-input-directive-jquery + + + + + + + + + + +
+ Number: + + Required! + + Not valid number! + value = {{value}}
+ myForm.input.$valid = {{myForm.input.$valid}}
+ myForm.input.$error = {{myForm.input.$error}}
+ myForm.$valid = {{myForm.$valid}}
+ myForm.$error.required = {{!!myForm.$error.required}}
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-number-input-directive/index-production.html b/1.3.0-rc.2/docs/examples/example-number-input-directive/index-production.html new file mode 100644 index 0000000000..8194facb5e --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-number-input-directive/index-production.html @@ -0,0 +1,34 @@ + + + + + Example - example-number-input-directive-production + + + + + + + + + +
+ Number: + + Required! + + Not valid number! + value = {{value}}
+ myForm.input.$valid = {{myForm.input.$valid}}
+ myForm.input.$error = {{myForm.input.$error}}
+ myForm.$valid = {{myForm.$valid}}
+ myForm.$error.required = {{!!myForm.$error.required}}
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-number-input-directive/index.html b/1.3.0-rc.2/docs/examples/example-number-input-directive/index.html new file mode 100644 index 0000000000..4ed9615ddd --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-number-input-directive/index.html @@ -0,0 +1,34 @@ + + + + + Example - example-number-input-directive + + + + + + + + + +
+ Number: + + Required! + + Not valid number! + value = {{value}}
+ myForm.input.$valid = {{myForm.input.$valid}}
+ myForm.input.$error = {{myForm.input.$error}}
+ myForm.$valid = {{myForm.$valid}}
+ myForm.$error.required = {{!!myForm.$error.required}}
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-number-input-directive/manifest.json b/1.3.0-rc.2/docs/examples/example-number-input-directive/manifest.json new file mode 100644 index 0000000000..514d04f3b7 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-number-input-directive/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-number-input-directive", + "files": [ + "index-production.html", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-number-input-directive/protractor.js b/1.3.0-rc.2/docs/examples/example-number-input-directive/protractor.js new file mode 100644 index 0000000000..f03b0e5549 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-number-input-directive/protractor.js @@ -0,0 +1,22 @@ + var value = element(by.binding('value')); + var valid = element(by.binding('myForm.input.$valid')); + var input = element(by.model('value')); + + it('should initialize to model', function() { + expect(value.getText()).toContain('12'); + expect(valid.getText()).toContain('true'); + }); + + it('should be invalid if empty', function() { + input.clear(); + input.sendKeys(''); + expect(value.getText()).toEqual('value ='); + expect(valid.getText()).toContain('false'); + }); + + it('should be invalid if over max', function() { + input.clear(); + input.sendKeys('123'); + expect(value.getText()).toEqual('value ='); + expect(valid.getText()).toContain('false'); + }); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-radio-input-directive/index-debug.html b/1.3.0-rc.2/docs/examples/example-radio-input-directive/index-debug.html new file mode 100644 index 0000000000..3064d26a52 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-radio-input-directive/index-debug.html @@ -0,0 +1,32 @@ + + + + + Example - example-radio-input-directive-debug + + + + + + + + + +
+ Red
+ Green
+ Blue
+ color = {{color | json}}
+
+ Note that `ng-value="specialValue"` sets radio item's value to be the value of `$scope.specialValue`. + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-radio-input-directive/index-jquery.html b/1.3.0-rc.2/docs/examples/example-radio-input-directive/index-jquery.html new file mode 100644 index 0000000000..247785879e --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-radio-input-directive/index-jquery.html @@ -0,0 +1,33 @@ + + + + + Example - example-radio-input-directive-jquery + + + + + + + + + + +
+ Red
+ Green
+ Blue
+ color = {{color | json}}
+
+ Note that `ng-value="specialValue"` sets radio item's value to be the value of `$scope.specialValue`. + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-radio-input-directive/index-production.html b/1.3.0-rc.2/docs/examples/example-radio-input-directive/index-production.html new file mode 100644 index 0000000000..2b4732b2ec --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-radio-input-directive/index-production.html @@ -0,0 +1,32 @@ + + + + + Example - example-radio-input-directive-production + + + + + + + + + +
+ Red
+ Green
+ Blue
+ color = {{color | json}}
+
+ Note that `ng-value="specialValue"` sets radio item's value to be the value of `$scope.specialValue`. + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-radio-input-directive/index.html b/1.3.0-rc.2/docs/examples/example-radio-input-directive/index.html new file mode 100644 index 0000000000..f6f152e883 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-radio-input-directive/index.html @@ -0,0 +1,32 @@ + + + + + Example - example-radio-input-directive + + + + + + + + + +
+ Red
+ Green
+ Blue
+ color = {{color | json}}
+
+ Note that `ng-value="specialValue"` sets radio item's value to be the value of `$scope.specialValue`. + + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-radio-input-directive/manifest.json b/1.3.0-rc.2/docs/examples/example-radio-input-directive/manifest.json new file mode 100644 index 0000000000..863bef42e2 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-radio-input-directive/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-radio-input-directive", + "files": [ + "index-production.html", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-radio-input-directive/protractor.js b/1.3.0-rc.2/docs/examples/example-radio-input-directive/protractor.js new file mode 100644 index 0000000000..8ba665c237 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-radio-input-directive/protractor.js @@ -0,0 +1,9 @@ + it('should change state', function() { + var color = element(by.binding('color')); + + expect(color.getText()).toContain('blue'); + + element.all(by.model('color')).get(0).click(); + + expect(color.getText()).toContain('red'); + }); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-text-input-directive/index-debug.html b/1.3.0-rc.2/docs/examples/example-text-input-directive/index-debug.html new file mode 100644 index 0000000000..5a48e2e9fb --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-text-input-directive/index-debug.html @@ -0,0 +1,36 @@ + + + + + Example - example-text-input-directive-debug + + + + + + + + + +
+ Single word: + + Required! + + Single word only! + + text = {{text}}
+ myForm.input.$valid = {{myForm.input.$valid}}
+ myForm.input.$error = {{myForm.input.$error}}
+ myForm.$valid = {{myForm.$valid}}
+ myForm.$error.required = {{!!myForm.$error.required}}
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-text-input-directive/index-jquery.html b/1.3.0-rc.2/docs/examples/example-text-input-directive/index-jquery.html new file mode 100644 index 0000000000..7078dd6f8c --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-text-input-directive/index-jquery.html @@ -0,0 +1,37 @@ + + + + + Example - example-text-input-directive-jquery + + + + + + + + + + +
+ Single word: + + Required! + + Single word only! + + text = {{text}}
+ myForm.input.$valid = {{myForm.input.$valid}}
+ myForm.input.$error = {{myForm.input.$error}}
+ myForm.$valid = {{myForm.$valid}}
+ myForm.$error.required = {{!!myForm.$error.required}}
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-text-input-directive/index-production.html b/1.3.0-rc.2/docs/examples/example-text-input-directive/index-production.html new file mode 100644 index 0000000000..88c0b2ab45 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-text-input-directive/index-production.html @@ -0,0 +1,36 @@ + + + + + Example - example-text-input-directive-production + + + + + + + + + +
+ Single word: + + Required! + + Single word only! + + text = {{text}}
+ myForm.input.$valid = {{myForm.input.$valid}}
+ myForm.input.$error = {{myForm.input.$error}}
+ myForm.$valid = {{myForm.$valid}}
+ myForm.$error.required = {{!!myForm.$error.required}}
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-text-input-directive/index.html b/1.3.0-rc.2/docs/examples/example-text-input-directive/index.html new file mode 100644 index 0000000000..ab131abec8 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-text-input-directive/index.html @@ -0,0 +1,36 @@ + + + + + Example - example-text-input-directive + + + + + + + + + +
+ Single word: + + Required! + + Single word only! + + text = {{text}}
+ myForm.input.$valid = {{myForm.input.$valid}}
+ myForm.input.$error = {{myForm.input.$error}}
+ myForm.$valid = {{myForm.$valid}}
+ myForm.$error.required = {{!!myForm.$error.required}}
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-text-input-directive/manifest.json b/1.3.0-rc.2/docs/examples/example-text-input-directive/manifest.json new file mode 100644 index 0000000000..2612b8ac3a --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-text-input-directive/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-text-input-directive", + "files": [ + "index-production.html", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-text-input-directive/protractor.js b/1.3.0-rc.2/docs/examples/example-text-input-directive/protractor.js new file mode 100644 index 0000000000..8e933ee6d4 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-text-input-directive/protractor.js @@ -0,0 +1,23 @@ + var text = element(by.binding('text')); + var valid = element(by.binding('myForm.input.$valid')); + var input = element(by.model('text')); + + it('should initialize to model', function() { + expect(text.getText()).toContain('guest'); + expect(valid.getText()).toContain('true'); + }); + + it('should be invalid if empty', function() { + input.clear(); + input.sendKeys(''); + + expect(text.getText()).toEqual('text ='); + expect(valid.getText()).toContain('false'); + }); + + it('should be invalid if multi word', function() { + input.clear(); + input.sendKeys('hello world'); + + expect(valid.getText()).toContain('false'); + }); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-time-input-directive/index-debug.html b/1.3.0-rc.2/docs/examples/example-time-input-directive/index-debug.html new file mode 100644 index 0000000000..7e6e26d473 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-time-input-directive/index-debug.html @@ -0,0 +1,35 @@ + + + + + Example - example-time-input-directive-debug + + + + + + + + + +
+ Pick a between 8am and 5pm: + + + Required! + + Not a valid date! + value = {{value | date: "HH:mm:ss"}}
+ myForm.input.$valid = {{myForm.input.$valid}}
+ myForm.input.$error = {{myForm.input.$error}}
+ myForm.$valid = {{myForm.$valid}}
+ myForm.$error.required = {{!!myForm.$error.required}}
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-time-input-directive/index-jquery.html b/1.3.0-rc.2/docs/examples/example-time-input-directive/index-jquery.html new file mode 100644 index 0000000000..35708159fe --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-time-input-directive/index-jquery.html @@ -0,0 +1,36 @@ + + + + + Example - example-time-input-directive-jquery + + + + + + + + + + +
+ Pick a between 8am and 5pm: + + + Required! + + Not a valid date! + value = {{value | date: "HH:mm:ss"}}
+ myForm.input.$valid = {{myForm.input.$valid}}
+ myForm.input.$error = {{myForm.input.$error}}
+ myForm.$valid = {{myForm.$valid}}
+ myForm.$error.required = {{!!myForm.$error.required}}
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-time-input-directive/index-production.html b/1.3.0-rc.2/docs/examples/example-time-input-directive/index-production.html new file mode 100644 index 0000000000..d3751a6229 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-time-input-directive/index-production.html @@ -0,0 +1,35 @@ + + + + + Example - example-time-input-directive-production + + + + + + + + + +
+ Pick a between 8am and 5pm: + + + Required! + + Not a valid date! + value = {{value | date: "HH:mm:ss"}}
+ myForm.input.$valid = {{myForm.input.$valid}}
+ myForm.input.$error = {{myForm.input.$error}}
+ myForm.$valid = {{myForm.$valid}}
+ myForm.$error.required = {{!!myForm.$error.required}}
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-time-input-directive/index.html b/1.3.0-rc.2/docs/examples/example-time-input-directive/index.html new file mode 100644 index 0000000000..7eb14003a3 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-time-input-directive/index.html @@ -0,0 +1,35 @@ + + + + + Example - example-time-input-directive + + + + + + + + + +
+ Pick a between 8am and 5pm: + + + Required! + + Not a valid date! + value = {{value | date: "HH:mm:ss"}}
+ myForm.input.$valid = {{myForm.input.$valid}}
+ myForm.input.$error = {{myForm.input.$error}}
+ myForm.$valid = {{myForm.$valid}}
+ myForm.$error.required = {{!!myForm.$error.required}}
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-time-input-directive/manifest.json b/1.3.0-rc.2/docs/examples/example-time-input-directive/manifest.json new file mode 100644 index 0000000000..fdf771023f --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-time-input-directive/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-time-input-directive", + "files": [ + "index-production.html", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-time-input-directive/protractor.js b/1.3.0-rc.2/docs/examples/example-time-input-directive/protractor.js new file mode 100644 index 0000000000..3668844e9f --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-time-input-directive/protractor.js @@ -0,0 +1,31 @@ + var value = element(by.binding('value | date: "HH:mm:ss"')); + var valid = element(by.binding('myForm.input.$valid')); + var input = element(by.model('value')); + + // currently protractor/webdriver does not support + // sending keys to all known HTML5 input controls + // for various browsers (https://github.com/angular/protractor/issues/562). + function setInput(val) { + // set the value of the element and force validation. + var scr = "var ipt = document.getElementById('exampleInput'); " + + "ipt.value = '" + val + "';" + + "angular.element(ipt).scope().$apply(function(s) { s.myForm[ipt.name].$setViewValue('" + val + "'); });"; + browser.executeScript(scr); + } + + it('should initialize to model', function() { + expect(value.getText()).toContain('14:57:00'); + expect(valid.getText()).toContain('myForm.input.$valid = true'); + }); + + it('should be invalid if empty', function() { + setInput(''); + expect(value.getText()).toEqual('value ='); + expect(valid.getText()).toContain('myForm.input.$valid = false'); + }); + + it('should be invalid if over max', function() { + setInput('23:59:00'); + expect(value.getText()).toContain(''); + expect(valid.getText()).toContain('myForm.input.$valid = false'); + }); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-url-input-directive/index-debug.html b/1.3.0-rc.2/docs/examples/example-url-input-directive/index-debug.html new file mode 100644 index 0000000000..4991dc23ba --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-url-input-directive/index-debug.html @@ -0,0 +1,34 @@ + + + + + Example - example-url-input-directive-debug + + + + + + + + + +
+ URL: + + Required! + + Not valid url! + text = {{text}}
+ myForm.input.$valid = {{myForm.input.$valid}}
+ myForm.input.$error = {{myForm.input.$error}}
+ myForm.$valid = {{myForm.$valid}}
+ myForm.$error.required = {{!!myForm.$error.required}}
+ myForm.$error.url = {{!!myForm.$error.url}}
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-url-input-directive/index-jquery.html b/1.3.0-rc.2/docs/examples/example-url-input-directive/index-jquery.html new file mode 100644 index 0000000000..f7138c1478 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-url-input-directive/index-jquery.html @@ -0,0 +1,35 @@ + + + + + Example - example-url-input-directive-jquery + + + + + + + + + + +
+ URL: + + Required! + + Not valid url! + text = {{text}}
+ myForm.input.$valid = {{myForm.input.$valid}}
+ myForm.input.$error = {{myForm.input.$error}}
+ myForm.$valid = {{myForm.$valid}}
+ myForm.$error.required = {{!!myForm.$error.required}}
+ myForm.$error.url = {{!!myForm.$error.url}}
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-url-input-directive/index-production.html b/1.3.0-rc.2/docs/examples/example-url-input-directive/index-production.html new file mode 100644 index 0000000000..32cf8353a8 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-url-input-directive/index-production.html @@ -0,0 +1,34 @@ + + + + + Example - example-url-input-directive-production + + + + + + + + + +
+ URL: + + Required! + + Not valid url! + text = {{text}}
+ myForm.input.$valid = {{myForm.input.$valid}}
+ myForm.input.$error = {{myForm.input.$error}}
+ myForm.$valid = {{myForm.$valid}}
+ myForm.$error.required = {{!!myForm.$error.required}}
+ myForm.$error.url = {{!!myForm.$error.url}}
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-url-input-directive/index.html b/1.3.0-rc.2/docs/examples/example-url-input-directive/index.html new file mode 100644 index 0000000000..2affab8661 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-url-input-directive/index.html @@ -0,0 +1,34 @@ + + + + + Example - example-url-input-directive + + + + + + + + + +
+ URL: + + Required! + + Not valid url! + text = {{text}}
+ myForm.input.$valid = {{myForm.input.$valid}}
+ myForm.input.$error = {{myForm.input.$error}}
+ myForm.$valid = {{myForm.$valid}}
+ myForm.$error.required = {{!!myForm.$error.required}}
+ myForm.$error.url = {{!!myForm.$error.url}}
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-url-input-directive/manifest.json b/1.3.0-rc.2/docs/examples/example-url-input-directive/manifest.json new file mode 100644 index 0000000000..a92554ac20 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-url-input-directive/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-url-input-directive", + "files": [ + "index-production.html", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-url-input-directive/protractor.js b/1.3.0-rc.2/docs/examples/example-url-input-directive/protractor.js new file mode 100644 index 0000000000..41ffdbe3b4 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-url-input-directive/protractor.js @@ -0,0 +1,23 @@ + var text = element(by.binding('text')); + var valid = element(by.binding('myForm.input.$valid')); + var input = element(by.model('text')); + + it('should initialize to model', function() { + expect(text.getText()).toContain('http://google.com'); + expect(valid.getText()).toContain('true'); + }); + + it('should be invalid if empty', function() { + input.clear(); + input.sendKeys(''); + + expect(text.getText()).toEqual('text ='); + expect(valid.getText()).toContain('false'); + }); + + it('should be invalid if not url', function() { + input.clear(); + input.sendKeys('box'); + + expect(valid.getText()).toContain('false'); + }); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-week-input-directive/index-debug.html b/1.3.0-rc.2/docs/examples/example-week-input-directive/index-debug.html new file mode 100644 index 0000000000..2a33d90069 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-week-input-directive/index-debug.html @@ -0,0 +1,35 @@ + + + + + Example - example-week-input-directive-debug + + + + + + + + + +
+ Pick a date between in 2013: + + + Required! + + Not a valid date! + value = {{value | date: "yyyy-Www"}}
+ myForm.input.$valid = {{myForm.input.$valid}}
+ myForm.input.$error = {{myForm.input.$error}}
+ myForm.$valid = {{myForm.$valid}}
+ myForm.$error.required = {{!!myForm.$error.required}}
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-week-input-directive/index-jquery.html b/1.3.0-rc.2/docs/examples/example-week-input-directive/index-jquery.html new file mode 100644 index 0000000000..3adcd5d7da --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-week-input-directive/index-jquery.html @@ -0,0 +1,36 @@ + + + + + Example - example-week-input-directive-jquery + + + + + + + + + + +
+ Pick a date between in 2013: + + + Required! + + Not a valid date! + value = {{value | date: "yyyy-Www"}}
+ myForm.input.$valid = {{myForm.input.$valid}}
+ myForm.input.$error = {{myForm.input.$error}}
+ myForm.$valid = {{myForm.$valid}}
+ myForm.$error.required = {{!!myForm.$error.required}}
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-week-input-directive/index-production.html b/1.3.0-rc.2/docs/examples/example-week-input-directive/index-production.html new file mode 100644 index 0000000000..69a1e1ad8b --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-week-input-directive/index-production.html @@ -0,0 +1,35 @@ + + + + + Example - example-week-input-directive-production + + + + + + + + + +
+ Pick a date between in 2013: + + + Required! + + Not a valid date! + value = {{value | date: "yyyy-Www"}}
+ myForm.input.$valid = {{myForm.input.$valid}}
+ myForm.input.$error = {{myForm.input.$error}}
+ myForm.$valid = {{myForm.$valid}}
+ myForm.$error.required = {{!!myForm.$error.required}}
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-week-input-directive/index.html b/1.3.0-rc.2/docs/examples/example-week-input-directive/index.html new file mode 100644 index 0000000000..c485fbbc4f --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-week-input-directive/index.html @@ -0,0 +1,35 @@ + + + + + Example - example-week-input-directive + + + + + + + + + +
+ Pick a date between in 2013: + + + Required! + + Not a valid date! + value = {{value | date: "yyyy-Www"}}
+ myForm.input.$valid = {{myForm.input.$valid}}
+ myForm.input.$error = {{myForm.input.$error}}
+ myForm.$valid = {{myForm.$valid}}
+ myForm.$error.required = {{!!myForm.$error.required}}
+
+ + \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-week-input-directive/manifest.json b/1.3.0-rc.2/docs/examples/example-week-input-directive/manifest.json new file mode 100644 index 0000000000..e3d947206e --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-week-input-directive/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-week-input-directive", + "files": [ + "index-production.html", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.3.0-rc.2/docs/examples/example-week-input-directive/protractor.js b/1.3.0-rc.2/docs/examples/example-week-input-directive/protractor.js new file mode 100644 index 0000000000..a227a758d7 --- /dev/null +++ b/1.3.0-rc.2/docs/examples/example-week-input-directive/protractor.js @@ -0,0 +1,31 @@ + var value = element(by.binding('value | date: "yyyy-Www"')); + var valid = element(by.binding('myForm.input.$valid')); + var input = element(by.model('value')); + + // currently protractor/webdriver does not support + // sending keys to all known HTML5 input controls + // for various browsers (https://github.com/angular/protractor/issues/562). + function setInput(val) { + // set the value of the element and force validation. + var scr = "var ipt = document.getElementById('exampleInput'); " + + "ipt.value = '" + val + "';" + + "angular.element(ipt).scope().$apply(function(s) { s.myForm[ipt.name].$setViewValue('" + val + "'); });"; + browser.executeScript(scr); + } + + it('should initialize to model', function() { + expect(value.getText()).toContain('2013-W01'); + expect(valid.getText()).toContain('myForm.input.$valid = true'); + }); + + it('should be invalid if empty', function() { + setInput(''); + expect(value.getText()).toEqual('value ='); + expect(valid.getText()).toContain('myForm.input.$valid = false'); + }); + + it('should be invalid if over max', function() { + setInput('2015-W01'); + expect(value.getText()).toContain(''); + expect(valid.getText()).toContain('myForm.input.$valid = false'); + }); \ No newline at end of file diff --git a/1.3.0-rc.2/docs/img/AngularJS-small.png b/1.3.0-rc.2/docs/img/AngularJS-small.png new file mode 100644 index 0000000000..ab5e20f883 Binary files /dev/null and b/1.3.0-rc.2/docs/img/AngularJS-small.png differ diff --git a/1.3.0-rc.2/docs/img/One_Way_Data_Binding.png b/1.3.0-rc.2/docs/img/One_Way_Data_Binding.png new file mode 100644 index 0000000000..60e7e3bf32 Binary files /dev/null and b/1.3.0-rc.2/docs/img/One_Way_Data_Binding.png differ diff --git a/1.3.0-rc.2/docs/img/Two_Way_Data_Binding.png b/1.3.0-rc.2/docs/img/Two_Way_Data_Binding.png new file mode 100644 index 0000000000..3a9c6d1ecc Binary files /dev/null and b/1.3.0-rc.2/docs/img/Two_Way_Data_Binding.png differ diff --git a/1.3.0-rc.2/docs/img/angular_parts.png b/1.3.0-rc.2/docs/img/angular_parts.png new file mode 100644 index 0000000000..a33a10ba7d Binary files /dev/null and b/1.3.0-rc.2/docs/img/angular_parts.png differ diff --git a/1.3.0-rc.2/docs/img/angularjs-for-header-only.svg b/1.3.0-rc.2/docs/img/angularjs-for-header-only.svg new file mode 100644 index 0000000000..68689b6bb1 --- /dev/null +++ b/1.3.0-rc.2/docs/img/angularjs-for-header-only.svg @@ -0,0 +1,41 @@ + + + +]> + + + + + + + + + + + + + + + + + diff --git a/1.3.0-rc.2/docs/img/bullet.png b/1.3.0-rc.2/docs/img/bullet.png new file mode 100755 index 0000000000..3575a8e60f Binary files /dev/null and b/1.3.0-rc.2/docs/img/bullet.png differ diff --git a/1.3.0-rc.2/docs/img/form_data_flow.png b/1.3.0-rc.2/docs/img/form_data_flow.png new file mode 100644 index 0000000000..60e947a595 Binary files /dev/null and b/1.3.0-rc.2/docs/img/form_data_flow.png differ diff --git a/1.3.0-rc.2/docs/img/glyphicons-halflings-white.png b/1.3.0-rc.2/docs/img/glyphicons-halflings-white.png new file mode 100644 index 0000000000..a20760bfde Binary files /dev/null and b/1.3.0-rc.2/docs/img/glyphicons-halflings-white.png differ diff --git a/1.3.0-rc.2/docs/img/glyphicons-halflings.png b/1.3.0-rc.2/docs/img/glyphicons-halflings.png new file mode 100644 index 0000000000..92d4445dfd Binary files /dev/null and b/1.3.0-rc.2/docs/img/glyphicons-halflings.png differ diff --git a/1.3.0-rc.2/docs/img/guide/concepts-databinding1.png b/1.3.0-rc.2/docs/img/guide/concepts-databinding1.png new file mode 100644 index 0000000000..87b7ffd0bf Binary files /dev/null and b/1.3.0-rc.2/docs/img/guide/concepts-databinding1.png differ diff --git a/1.3.0-rc.2/docs/img/guide/concepts-databinding2.png b/1.3.0-rc.2/docs/img/guide/concepts-databinding2.png new file mode 100644 index 0000000000..be8cbafe29 Binary files /dev/null and b/1.3.0-rc.2/docs/img/guide/concepts-databinding2.png differ diff --git a/1.3.0-rc.2/docs/img/guide/concepts-directive.png b/1.3.0-rc.2/docs/img/guide/concepts-directive.png new file mode 100644 index 0000000000..b77d5f8ec9 Binary files /dev/null and b/1.3.0-rc.2/docs/img/guide/concepts-directive.png differ diff --git a/1.3.0-rc.2/docs/img/guide/concepts-module-injector.png b/1.3.0-rc.2/docs/img/guide/concepts-module-injector.png new file mode 100644 index 0000000000..31fcf84c62 Binary files /dev/null and b/1.3.0-rc.2/docs/img/guide/concepts-module-injector.png differ diff --git a/1.3.0-rc.2/docs/img/guide/concepts-module-service.png b/1.3.0-rc.2/docs/img/guide/concepts-module-service.png new file mode 100644 index 0000000000..b7580be21b Binary files /dev/null and b/1.3.0-rc.2/docs/img/guide/concepts-module-service.png differ diff --git a/1.3.0-rc.2/docs/img/guide/concepts-runtime.png b/1.3.0-rc.2/docs/img/guide/concepts-runtime.png new file mode 100644 index 0000000000..eededc2ab6 Binary files /dev/null and b/1.3.0-rc.2/docs/img/guide/concepts-runtime.png differ diff --git a/1.3.0-rc.2/docs/img/guide/concepts-scope.png b/1.3.0-rc.2/docs/img/guide/concepts-scope.png new file mode 100644 index 0000000000..83ad8f8f43 Binary files /dev/null and b/1.3.0-rc.2/docs/img/guide/concepts-scope.png differ diff --git a/1.3.0-rc.2/docs/img/guide/concepts-startup.png b/1.3.0-rc.2/docs/img/guide/concepts-startup.png new file mode 100644 index 0000000000..b896a2b516 Binary files /dev/null and b/1.3.0-rc.2/docs/img/guide/concepts-startup.png differ diff --git a/1.3.0-rc.2/docs/img/guide/concepts-view.png b/1.3.0-rc.2/docs/img/guide/concepts-view.png new file mode 100644 index 0000000000..0222544bee Binary files /dev/null and b/1.3.0-rc.2/docs/img/guide/concepts-view.png differ diff --git a/1.3.0-rc.2/docs/img/guide/di_sequence_final.png b/1.3.0-rc.2/docs/img/guide/di_sequence_final.png new file mode 100644 index 0000000000..d4d743bdbc Binary files /dev/null and b/1.3.0-rc.2/docs/img/guide/di_sequence_final.png differ diff --git a/1.3.0-rc.2/docs/img/guide/dom_scope_final.png b/1.3.0-rc.2/docs/img/guide/dom_scope_final.png new file mode 100644 index 0000000000..c6385d12ed Binary files /dev/null and b/1.3.0-rc.2/docs/img/guide/dom_scope_final.png differ diff --git a/1.3.0-rc.2/docs/img/guide/hashbang_vs_regular_url.jpg b/1.3.0-rc.2/docs/img/guide/hashbang_vs_regular_url.jpg new file mode 100644 index 0000000000..632b4febad Binary files /dev/null and b/1.3.0-rc.2/docs/img/guide/hashbang_vs_regular_url.jpg differ diff --git a/1.3.0-rc.2/docs/img/guide/scenario_runner.png b/1.3.0-rc.2/docs/img/guide/scenario_runner.png new file mode 100644 index 0000000000..a39037a0aa Binary files /dev/null and b/1.3.0-rc.2/docs/img/guide/scenario_runner.png differ diff --git a/1.3.0-rc.2/docs/img/guide/simple_scope_final.png b/1.3.0-rc.2/docs/img/guide/simple_scope_final.png new file mode 100644 index 0000000000..99a04797a5 Binary files /dev/null and b/1.3.0-rc.2/docs/img/guide/simple_scope_final.png differ diff --git a/1.3.0-rc.2/docs/img/helloworld.png b/1.3.0-rc.2/docs/img/helloworld.png new file mode 100644 index 0000000000..957ce8e98b Binary files /dev/null and b/1.3.0-rc.2/docs/img/helloworld.png differ diff --git a/1.3.0-rc.2/docs/img/helloworld_2way.png b/1.3.0-rc.2/docs/img/helloworld_2way.png new file mode 100644 index 0000000000..2c02313c1b Binary files /dev/null and b/1.3.0-rc.2/docs/img/helloworld_2way.png differ diff --git a/1.3.0-rc.2/docs/img/tutorial/catalog_screen.png b/1.3.0-rc.2/docs/img/tutorial/catalog_screen.png new file mode 100644 index 0000000000..0b1968c5fb Binary files /dev/null and b/1.3.0-rc.2/docs/img/tutorial/catalog_screen.png differ diff --git a/1.3.0-rc.2/docs/img/tutorial/tutorial_00.png b/1.3.0-rc.2/docs/img/tutorial/tutorial_00.png new file mode 100644 index 0000000000..65f3973eba Binary files /dev/null and b/1.3.0-rc.2/docs/img/tutorial/tutorial_00.png differ diff --git a/1.3.0-rc.2/docs/img/tutorial/tutorial_00_final.png b/1.3.0-rc.2/docs/img/tutorial/tutorial_00_final.png new file mode 100644 index 0000000000..838a094483 Binary files /dev/null and b/1.3.0-rc.2/docs/img/tutorial/tutorial_00_final.png differ diff --git a/1.3.0-rc.2/docs/img/tutorial/tutorial_02.png b/1.3.0-rc.2/docs/img/tutorial/tutorial_02.png new file mode 100644 index 0000000000..b4c1cab16d Binary files /dev/null and b/1.3.0-rc.2/docs/img/tutorial/tutorial_02.png differ diff --git a/1.3.0-rc.2/docs/img/tutorial/tutorial_03.png b/1.3.0-rc.2/docs/img/tutorial/tutorial_03.png new file mode 100644 index 0000000000..3e432a352e Binary files /dev/null and b/1.3.0-rc.2/docs/img/tutorial/tutorial_03.png differ diff --git a/1.3.0-rc.2/docs/img/tutorial/tutorial_04.png b/1.3.0-rc.2/docs/img/tutorial/tutorial_04.png new file mode 100644 index 0000000000..3d028771dc Binary files /dev/null and b/1.3.0-rc.2/docs/img/tutorial/tutorial_04.png differ diff --git a/1.3.0-rc.2/docs/img/tutorial/tutorial_05.png b/1.3.0-rc.2/docs/img/tutorial/tutorial_05.png new file mode 100644 index 0000000000..be30217427 Binary files /dev/null and b/1.3.0-rc.2/docs/img/tutorial/tutorial_05.png differ diff --git a/1.3.0-rc.2/docs/img/tutorial/tutorial_05.pptx b/1.3.0-rc.2/docs/img/tutorial/tutorial_05.pptx new file mode 100644 index 0000000000..1afe4c3df5 Binary files /dev/null and b/1.3.0-rc.2/docs/img/tutorial/tutorial_05.pptx differ diff --git a/1.3.0-rc.2/docs/img/tutorial/tutorial_07_final.png b/1.3.0-rc.2/docs/img/tutorial/tutorial_07_final.png new file mode 100644 index 0000000000..3e7776c460 Binary files /dev/null and b/1.3.0-rc.2/docs/img/tutorial/tutorial_07_final.png differ diff --git a/1.3.0-rc.2/docs/img/tutorial/tutorial_08-09_final.png b/1.3.0-rc.2/docs/img/tutorial/tutorial_08-09_final.png new file mode 100644 index 0000000000..02601d241b Binary files /dev/null and b/1.3.0-rc.2/docs/img/tutorial/tutorial_08-09_final.png differ diff --git a/1.3.0-rc.2/docs/img/tutorial/tutorial_10-11_final.png b/1.3.0-rc.2/docs/img/tutorial/tutorial_10-11_final.png new file mode 100644 index 0000000000..55a821ad18 Binary files /dev/null and b/1.3.0-rc.2/docs/img/tutorial/tutorial_10-11_final.png differ diff --git a/1.3.0-rc.2/docs/index-debug.html b/1.3.0-rc.2/docs/index-debug.html new file mode 100644 index 0000000000..0f8125bf73 --- /dev/null +++ b/1.3.0-rc.2/docs/index-debug.html @@ -0,0 +1,269 @@ + + + + + + + + + AngularJS + + + + +
+
+ +
+
+
+
+ +
+
+
+ +
+
+
+
+ +
+ +
+ + +
+ + diff --git a/1.3.0-rc.2/docs/index-jquery.html b/1.3.0-rc.2/docs/index-jquery.html new file mode 100644 index 0000000000..75a2ae65a2 --- /dev/null +++ b/1.3.0-rc.2/docs/index-jquery.html @@ -0,0 +1,270 @@ + + + + + + + + + AngularJS + + + + +
+
+ +
+
+
+
+ +
+
+
+ +
+
+
+
+ +
+ +
+ + +
+ + diff --git a/1.3.0-rc.2/docs/index-production.html b/1.3.0-rc.2/docs/index-production.html new file mode 100644 index 0000000000..60470ef9d4 --- /dev/null +++ b/1.3.0-rc.2/docs/index-production.html @@ -0,0 +1,269 @@ + + + + + + + + + AngularJS + + + + +
+
+ +
+
+
+
+ +
+
+
+ +
+
+
+
+ +
+ +
+ + +
+ + diff --git a/1.3.0-rc.2/docs/index.html b/1.3.0-rc.2/docs/index.html new file mode 100644 index 0000000000..42f9706837 --- /dev/null +++ b/1.3.0-rc.2/docs/index.html @@ -0,0 +1,269 @@ + + + + + + + + + AngularJS + + + + +
+
+ +
+
+
+
+ +
+
+
+ +
+
+
+
+ +
+ +
+ + +
+ + diff --git a/1.3.0-rc.2/docs/js/angular-bootstrap/bootstrap-prettify.js b/1.3.0-rc.2/docs/js/angular-bootstrap/bootstrap-prettify.js new file mode 100644 index 0000000000..30172a4b52 --- /dev/null +++ b/1.3.0-rc.2/docs/js/angular-bootstrap/bootstrap-prettify.js @@ -0,0 +1,284 @@ +'use strict'; + +var directive = {}; +var service = { value: {} }; + +var DEPENDENCIES = { + 'angular.js': 'http://code.angularjs.org/' + angular.version.full + '/angular.min.js', + 'angular-resource.js': 'http://code.angularjs.org/' + angular.version.full + '/angular-resource.min.js', + 'angular-route.js': 'http://code.angularjs.org/' + angular.version.full + '/angular-route.min.js', + 'angular-animate.js': 'http://code.angularjs.org/' + angular.version.full + '/angular-animate.min.js', + 'angular-sanitize.js': 'http://code.angularjs.org/' + angular.version.full + '/angular-sanitize.min.js', + 'angular-cookies.js': 'http://code.angularjs.org/' + angular.version.full + '/angular-cookies.min.js' +}; + + +function escape(text) { + return text. + replace(/\&/g, '&'). + replace(/\/g, '>'). + replace(/"/g, '"'); +} + +/** + * http://stackoverflow.com/questions/451486/pre-tag-loses-line-breaks-when-setting-innerhtml-in-ie + * http://stackoverflow.com/questions/195363/inserting-a-newline-into-a-pre-tag-ie-javascript + */ +function setHtmlIe8SafeWay(element, html) { + var newElement = angular.element('
' + html + '
'); + + element.empty(); + element.append(newElement.contents()); + return element; +} + + +directive.jsFiddle = function(getEmbeddedTemplate, escape, script) { + return { + terminal: true, + link: function(scope, element, attr) { + var name = '', + stylesheet = '\n', + fields = { + html: '', + css: '', + js: '' + }; + + angular.forEach(attr.jsFiddle.split(' '), function(file, index) { + var fileType = file.split('.')[1]; + + if (fileType == 'html') { + if (index == 0) { + fields[fileType] += + '
\n' + + getEmbeddedTemplate(file, 2); + } else { + fields[fileType] += '\n\n\n \n' + + ' \n'; + } + } else { + fields[fileType] += getEmbeddedTemplate(file) + '\n'; + } + }); + + fields.html += '
\n'; + + setHtmlIe8SafeWay(element, + '
' + + hiddenField('title', 'AngularJS Example: ' + name) + + hiddenField('css', ' \n' + + stylesheet + + script.angular + + (attr.resource ? script.resource : '') + + '