Commit 509b37eb by Torkel Ödegaard

dependency(): upgraded angularjs to 1.5.1

parent 9dac382f
......@@ -14,10 +14,10 @@
],
"dependencies": {
"jquery": "~2.1.4",
"angular": "~1.5.0",
"angular-route": "~1.5.0",
"angular-mocks": "~1.5.0",
"angular-sanitize": "~1.5.0",
"angular": "~1.5.1",
"angular-route": "~1.5.1",
"angular-mocks": "~1.5.1",
"angular-sanitize": "~1.5.1",
"angular-bindonce": "~0.3.3"
}
}
{
"name": "angular-mocks",
"version": "1.5.0-rc.0",
"version": "1.5.1-build.4601+sha.c966876",
"license": "MIT",
"main": "./angular-mocks.js",
"ignore": [],
"dependencies": {
"angular": "1.5.0-rc.0"
"angular": "1.5.1-build.4601+sha.c966876"
},
"homepage": "https://github.com/angular/bower-angular-mocks",
"_release": "1.5.0-rc.0",
"_release": "1.5.1-build.4601+sha.c966876",
"_resolution": {
"type": "version",
"tag": "v1.5.0-rc.0",
"commit": "aaa4993ea1fa4aac97953d65bcaeb5f6eda6f113"
"tag": "v1.5.1-build.4601+sha.c966876",
"commit": "ff7c5c2ac686293829786d26d844391e45c37c11"
},
"_source": "git://github.com/angular/bower-angular-mocks.git",
"_target": "~1.5.0",
"_target": "~1.5.1",
"_originalSource": "angular-mocks"
}
\ No newline at end of file
/**
* @license AngularJS v1.5.0-rc.0
* (c) 2010-2015 Google, Inc. http://angularjs.org
* @license AngularJS v1.5.1-build.4601+sha.c966876
* (c) 2010-2016 Google, Inc. http://angularjs.org
* License: MIT
*/
(function(window, angular, undefined) {
......@@ -758,6 +758,15 @@ angular.mock.TzDate = function(offset, timestamp) {
angular.mock.TzDate.prototype = Date.prototype;
/* jshint +W101 */
/**
* @ngdoc service
* @name $animate
*
* @description
* Mock implementation of the {@link ng.$animate `$animate`} service. Exposes two additional methods
* for testing animations.
*/
angular.mock.animate = angular.module('ngAnimateMock', ['ng'])
.config(['$provide', function($provide) {
......@@ -790,9 +799,50 @@ angular.mock.animate = angular.module('ngAnimateMock', ['ng'])
return queueFn;
});
$provide.decorator('$animate', ['$delegate', '$timeout', '$browser', '$$rAF',
$provide.decorator('$$animateJs', ['$delegate', function($delegate) {
var runners = [];
var animateJsConstructor = function() {
var animator = $delegate.apply($delegate, arguments);
// If no javascript animation is found, animator is undefined
if (animator) {
runners.push(animator);
}
return animator;
};
animateJsConstructor.$closeAndFlush = function() {
runners.forEach(function(runner) {
runner.end();
});
runners = [];
};
return animateJsConstructor;
}]);
$provide.decorator('$animateCss', ['$delegate', function($delegate) {
var runners = [];
var animateCssConstructor = function(element, options) {
var animator = $delegate(element, options);
runners.push(animator);
return animator;
};
animateCssConstructor.$closeAndFlush = function() {
runners.forEach(function(runner) {
runner.end();
});
runners = [];
};
return animateCssConstructor;
}]);
$provide.decorator('$animate', ['$delegate', '$timeout', '$browser', '$$rAF', '$animateCss', '$$animateJs',
'$$forceReflow', '$$animateAsyncRun', '$rootScope',
function($delegate, $timeout, $browser, $$rAF,
function($delegate, $timeout, $browser, $$rAF, $animateCss, $$animateJs,
$$forceReflow, $$animateAsyncRun, $rootScope) {
var animate = {
queue: [],
......@@ -804,7 +854,35 @@ angular.mock.animate = angular.module('ngAnimateMock', ['ng'])
return $$forceReflow.totalReflows;
},
enabled: $delegate.enabled,
flush: function() {
/**
* @ngdoc method
* @name $animate#closeAndFlush
* @description
*
* This method will close all pending animations (both {@link ngAnimate#javascript-based-animations Javascript}
* and {@link ngAnimate.$animateCss CSS}) and it will also flush any remaining animation frames and/or callbacks.
*/
closeAndFlush: function() {
// we allow the flush command to swallow the errors
// because depending on whether CSS or JS animations are
// used, there may not be a RAF flush. The primary flush
// at the end of this function must throw an exception
// because it will track if there were pending animations
this.flush(true);
$animateCss.$closeAndFlush();
$$animateJs.$closeAndFlush();
this.flush();
},
/**
* @ngdoc method
* @name $animate#flush
* @description
*
* This method is used to flush the pending callbacks and animation frames to either start
* an animation or conclude an animation. Note that this will not actually close an
* actively running animation (see {@link ngMock.$animate#closeAndFlush `closeAndFlush()`} for that).
*/
flush: function(hideErrors) {
$rootScope.$digest();
var doNextRun, somethingFlushed = false;
......@@ -821,7 +899,7 @@ angular.mock.animate = angular.module('ngAnimateMock', ['ng'])
}
} while (doNextRun);
if (!somethingFlushed) {
if (!somethingFlushed && !hideErrors) {
throw new Error('No pending animations ready to be closed or flushed');
}
......@@ -1030,18 +1108,18 @@ angular.mock.dump = function(object) {
function MyController($scope, $http) {
var authToken;
$http.get('/auth.py').success(function(data, status, headers) {
authToken = headers('A-Token');
$scope.user = data;
$http.get('/auth.py').then(function(response) {
authToken = response.headers('A-Token');
$scope.user = response.data;
});
$scope.saveMessage = function(message) {
var headers = { 'Authorization': authToken };
$scope.status = 'Saving...';
$http.post('/add-msg.py', message, { headers: headers } ).success(function(response) {
$http.post('/add-msg.py', message, { headers: headers } ).then(function(response) {
$scope.status = '';
}).error(function() {
}).catch(function() {
$scope.status = 'Failed...';
});
};
......@@ -2093,6 +2171,47 @@ angular.mock.$ControllerDecorator = ['$delegate', function($delegate) {
};
}];
/**
* @ngdoc service
* @name $componentController
* @description
* A service that can be used to create instances of component controllers.
* <div class="alert alert-info">
* Be aware that the controller will be instantiated and attached to the scope as specified in
* the component definition object. That means that you must always provide a `$scope` object
* in the `locals` param.
* </div>
* @param {string} componentName the name of the component whose controller we want to instantiate
* @param {Object} locals Injection locals for Controller.
* @param {Object=} bindings Properties to add to the controller before invoking the constructor. This is used
* to simulate the `bindToController` feature and simplify certain kinds of tests.
* @param {string=} ident Override the property name to use when attaching the controller to the scope.
* @return {Object} Instance of requested controller.
*/
angular.mock.$ComponentControllerProvider = ['$compileProvider', function($compileProvider) {
this.$get = ['$controller','$injector', function($controller,$injector) {
return function $componentController(componentName, locals, bindings, ident) {
// get all directives associated to the component name
var directives = $injector.get(componentName + 'Directive');
// look for those directives that are components
var candidateDirectives = directives.filter(function(directiveInfo) {
// components have controller, controllerAs and restrict:'E'
return directiveInfo.controller && directiveInfo.controllerAs && directiveInfo.restrict === 'E';
});
// check if valid directives found
if (candidateDirectives.length === 0) {
throw new Error('No component found');
}
if (candidateDirectives.length > 1) {
throw new Error('Too many components found');
}
// get the info of the component
var directiveInfo = candidateDirectives[0];
return $controller(directiveInfo.controller, locals, bindings, ident || directiveInfo.controllerAs);
};
}];
}];
/**
* @ngdoc module
......@@ -2116,7 +2235,8 @@ angular.module('ngMock', ['ng']).provider({
$log: angular.mock.$LogProvider,
$interval: angular.mock.$IntervalProvider,
$httpBackend: angular.mock.$HttpBackendProvider,
$rootElement: angular.mock.$RootElementProvider
$rootElement: angular.mock.$RootElementProvider,
$componentController: angular.mock.$ComponentControllerProvider
}).config(['$provide', function($provide) {
$provide.decorator('$timeout', angular.mock.$TimeoutDecorator);
$provide.decorator('$$rAF', angular.mock.$RAFDecorator);
......
{
"name": "angular-mocks",
"version": "1.5.0-rc.0",
"version": "1.5.1-build.4601+sha.c966876",
"license": "MIT",
"main": "./angular-mocks.js",
"ignore": [],
"dependencies": {
"angular": "1.5.0-rc.0"
"angular": "1.5.1-build.4601+sha.c966876"
}
}
{
"name": "angular-mocks",
"version": "1.5.0-rc.0",
"version": "1.5.1-build.4601+sha.c966876",
"description": "AngularJS mocks for testing",
"main": "angular-mocks.js",
"scripts": {
......
{
"name": "angular-route",
"version": "1.5.0-rc.0",
"version": "1.5.1-build.4601+sha.c966876",
"license": "MIT",
"main": "./angular-route.js",
"ignore": [],
"dependencies": {
"angular": "1.5.0-rc.0"
"angular": "1.5.1-build.4601+sha.c966876"
},
"homepage": "https://github.com/angular/bower-angular-route",
"_release": "1.5.0-rc.0",
"_release": "1.5.1-build.4601+sha.c966876",
"_resolution": {
"type": "version",
"tag": "v1.5.0-rc.0",
"commit": "496e2f35541957c1e4903b99622be5bcdb058a7a"
"tag": "v1.5.1-build.4601+sha.c966876",
"commit": "967fdabf084ac9f37c6b984d8893ebfebde5fc02"
},
"_source": "git://github.com/angular/bower-angular-route.git",
"_target": "~1.5.0",
"_target": "~1.5.1",
"_originalSource": "angular-route"
}
\ No newline at end of file
/**
* @license AngularJS v1.5.0-rc.0
* (c) 2010-2015 Google, Inc. http://angularjs.org
* @license AngularJS v1.5.1-build.4601+sha.c966876
* (c) 2010-2016 Google, Inc. http://angularjs.org
* License: MIT
*/
(function(window, angular, undefined) {'use strict';
......@@ -105,8 +105,17 @@ function $RouteProvider() {
* 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:
* {@link ngRoute.$route#$routeChangeError $routeChangeError} event is fired.
* For easier access to the resolved dependencies from the template, the `resolve` map will
* be available on the scope of the route, under `$resolve` (by default) or a custom name
* specified by the `resolveAs` property (see below). This can be particularly useful, when
* working with {@link angular.Module#component components} as route templates.<br />
* <div class="alert alert-warning">
* **Note:** If your scope already contains a property with this name, it will be hidden
* or overwritten. Make sure, you specify an appropriate name for this property, that
* does not collide with other properties on the scope.
* </div>
* 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.
......@@ -116,7 +125,10 @@ function $RouteProvider() {
* `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
* - `resolveAs` - `{string=}` - The name under which the `resolve` map will be available on
* the scope of the route. If omitted, defaults to `$resolve`.
*
* - `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:
......@@ -129,13 +141,13 @@ function $RouteProvider() {
* 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()`
* - `[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
* - `[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
......@@ -265,7 +277,7 @@ function $RouteProvider() {
* @property {Object} current Reference to the current route definition.
* The route definition contains:
*
* - `controller`: The controller constructor as define in route definition.
* - `controller`: The controller constructor as defined in the 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:
......@@ -273,6 +285,10 @@ function $RouteProvider() {
* - `$scope` - The current route scope.
* - `$template` - The current route template HTML.
*
* The `locals` will be assigned to the route scope's `$resolve` property. You can override
* the property name, using `resolveAs` in the route definition. See
* {@link ngRoute.$routeProvider $routeProvider} for more info.
*
* @property {Object} routes Object with all route configuration Objects as its properties.
*
* @description
......@@ -468,10 +484,18 @@ function $RouteProvider() {
*/
reload: function() {
forceReload = true;
var fakeLocationEvent = {
defaultPrevented: false,
preventDefault: function fakePreventDefault() {
this.defaultPrevented = true;
forceReload = false;
}
};
$rootScope.$evalAsync(function() {
// Don't support cancellation of a reload for now...
prepareRoute();
commitRoute();
prepareRoute(fakeLocationEvent);
if (!fakeLocationEvent.defaultPrevented) commitRoute();
});
},
......@@ -725,8 +749,10 @@ ngRouteModule.directive('ngView', ngViewFillContentFactory);
* 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.
* | Animation | Occurs |
* |----------------------------------|-------------------------------------|
* | {@link ng.$animate#enter enter} | when the new element is inserted to the DOM |
* | {@link ng.$animate#leave leave} | when the old element is removed from to the DOM |
*
* The enter and leave animation occur concurrently.
*
......
/*
AngularJS v1.5.0-rc.0
(c) 2010-2015 Google, Inc. http://angularjs.org
AngularJS v1.5.1-build.4601+sha.c966876
(c) 2010-2016 Google, Inc. http://angularjs.org
License: MIT
*/
(function(r,d,C){'use strict';function w(s,h,g){return{restrict:"ECA",terminal:!0,priority:400,transclude:"element",link:function(a,c,b,f,y){function k(){n&&(g.cancel(n),n=null);l&&(l.$destroy(),l=null);m&&(n=g.leave(m),n.then(function(){n=null}),m=null)}function z(){var b=s.current&&s.current.locals;if(d.isDefined(b&&b.$template)){var b=a.$new(),f=s.current;m=y(b,function(b){g.enter(b,null,m||c).then(function(){!d.isDefined(u)||u&&!a.$eval(u)||h()});k()});l=f.scope=b;l.$emit("$viewContentLoaded");
l.$eval(x)}else k()}var l,m,n,u=b.autoscroll,x=b.onload||"";a.$on("$routeChangeSuccess",z);z()}}}function A(d,h,g){return{restrict:"ECA",priority:-400,link:function(a,c){var b=g.current,f=b.locals;c.html(f.$template);var y=d(c.contents());if(b.controller){f.$scope=a;var k=h(b.controller,f);b.controllerAs&&(a[b.controllerAs]=k);c.data("$ngControllerController",k);c.children().data("$ngControllerController",k)}a[b.resolveAs||"$resolve"]=f;y(a)}}}r=d.module("ngRoute",["ng"]).provider("$route",function(){function s(a,
(function(r,d,C){'use strict';function x(s,h,g){return{restrict:"ECA",terminal:!0,priority:400,transclude:"element",link:function(a,c,b,f,y){function k(){n&&(g.cancel(n),n=null);l&&(l.$destroy(),l=null);m&&(n=g.leave(m),n.then(function(){n=null}),m=null)}function z(){var b=s.current&&s.current.locals;if(d.isDefined(b&&b.$template)){var b=a.$new(),f=s.current;m=y(b,function(b){g.enter(b,null,m||c).then(function(){!d.isDefined(u)||u&&!a.$eval(u)||h()});k()});l=f.scope=b;l.$emit("$viewContentLoaded");
l.$eval(v)}else k()}var l,m,n,u=b.autoscroll,v=b.onload||"";a.$on("$routeChangeSuccess",z);z()}}}function A(d,h,g){return{restrict:"ECA",priority:-400,link:function(a,c){var b=g.current,f=b.locals;c.html(f.$template);var y=d(c.contents());if(b.controller){f.$scope=a;var k=h(b.controller,f);b.controllerAs&&(a[b.controllerAs]=k);c.data("$ngControllerController",k);c.children().data("$ngControllerController",k)}a[b.resolveAs||"$resolve"]=f;y(a)}}}r=d.module("ngRoute",["ng"]).provider("$route",function(){function s(a,
c){return d.extend(Object.create(a),c)}function h(a,d){var b=d.caseInsensitiveMatch,f={originalPath:a,regexp:a},g=f.keys=[];a=a.replace(/([().])/g,"\\$1").replace(/(\/)?:(\w+)([\?\*])?/g,function(a,d,b,c){a="?"===c?c:null;c="*"===c?c:null;g.push({name:b,optional:!!a});d=d||"";return""+(a?"":d)+"(?:"+(a?d:"")+(c&&"(.+?)"||"([^/]+)")+(a||"")+")"+(a||"")}).replace(/([\/$\*])/g,"\\$1");f.regexp=new RegExp("^"+a+"$",b?"i":"");return f}var g={};this.when=function(a,c){var b=d.copy(c);d.isUndefined(b.reloadOnSearch)&&
(b.reloadOnSearch=!0);d.isUndefined(b.caseInsensitiveMatch)&&(b.caseInsensitiveMatch=this.caseInsensitiveMatch);g[a]=d.extend(b,a&&h(a,b));if(a){var f="/"==a[a.length-1]?a.substr(0,a.length-1):a+"/";g[f]=d.extend({redirectTo:a},h(f,b))}return this};this.caseInsensitiveMatch=!1;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,c,b,f,h,k,r){function l(b){var e=
t.current;(w=(p=n())&&e&&p.$$route===e.$$route&&d.equals(p.pathParams,e.pathParams)&&!p.reloadOnSearch&&!x)||!e&&!p||a.$broadcast("$routeChangeStart",p,e).defaultPrevented&&b&&b.preventDefault()}function m(){var v=t.current,e=p;if(w)v.params=e.params,d.copy(v.params,b),a.$broadcast("$routeUpdate",v);else if(e||v)x=!1,(t.current=e)&&e.redirectTo&&(d.isString(e.redirectTo)?c.path(u(e.redirectTo,e.params)).search(e.params).replace():c.url(e.redirectTo(e.pathParams,c.path(),c.search())).replace()),f.when(e).then(function(){if(e){var a=
d.extend({},e.resolve),b,c;d.forEach(a,function(b,e){a[e]=d.isString(b)?h.get(b):h.invoke(b,null,null,e)});d.isDefined(b=e.template)?d.isFunction(b)&&(b=b(e.params)):d.isDefined(c=e.templateUrl)&&(d.isFunction(c)&&(c=c(e.params)),d.isDefined(c)&&(e.loadedTemplateUrl=r.valueOf(c),b=k(c)));d.isDefined(b)&&(a.$template=b);return f.all(a)}}).then(function(c){e==t.current&&(e&&(e.locals=c,d.copy(e.params,b)),a.$broadcast("$routeChangeSuccess",e,v))},function(b){e==t.current&&a.$broadcast("$routeChangeError",
e,v,b)})}function n(){var a,b;d.forEach(g,function(f,g){var q;if(q=!b){var h=c.path();q=f.keys;var l={};if(f.regexp)if(h=f.regexp.exec(h)){for(var k=1,n=h.length;k<n;++k){var m=q[k-1],p=h[k];m&&p&&(l[m.name]=p)}q=l}else q=null;else q=null;q=a=q}q&&(b=s(f,{params:d.extend({},c.search(),a),pathParams:a}),b.$$route=f)});return b||g[null]&&s(g[null],{params:{},pathParams:{}})}function u(a,b){var c=[];d.forEach((a||"").split(":"),function(a,d){if(0===d)c.push(a);else{var f=a.match(/(\w+)(?:[?*])?(.*)/),
g=f[1];c.push(b[g]);c.push(f[2]||"");delete b[g]}});return c.join("")}var x=!1,p,w,t={routes:g,reload:function(){x=!0;a.$evalAsync(function(){l();m()})},updateParams:function(a){if(this.current&&this.current.$$route)a=d.extend({},this.current.params,a),c.path(u(this.current.$$route.originalPath,a)),c.search(a);else throw B("norout");}};a.$on("$locationChangeStart",l);a.$on("$locationChangeSuccess",m);return t}]});var B=d.$$minErr("ngRoute");r.provider("$routeParams",function(){this.$get=function(){return{}}});
r.directive("ngView",w);r.directive("ngView",A);w.$inject=["$route","$anchorScroll","$animate"];A.$inject=["$compile","$controller","$route"]})(window,window.angular);
t.current;(x=(p=n())&&e&&p.$$route===e.$$route&&d.equals(p.pathParams,e.pathParams)&&!p.reloadOnSearch&&!v)||!e&&!p||a.$broadcast("$routeChangeStart",p,e).defaultPrevented&&b&&b.preventDefault()}function m(){var w=t.current,e=p;if(x)w.params=e.params,d.copy(w.params,b),a.$broadcast("$routeUpdate",w);else if(e||w)v=!1,(t.current=e)&&e.redirectTo&&(d.isString(e.redirectTo)?c.path(u(e.redirectTo,e.params)).search(e.params).replace():c.url(e.redirectTo(e.pathParams,c.path(),c.search())).replace()),f.when(e).then(function(){if(e){var a=
d.extend({},e.resolve),b,c;d.forEach(a,function(b,e){a[e]=d.isString(b)?h.get(b):h.invoke(b,null,null,e)});d.isDefined(b=e.template)?d.isFunction(b)&&(b=b(e.params)):d.isDefined(c=e.templateUrl)&&(d.isFunction(c)&&(c=c(e.params)),d.isDefined(c)&&(e.loadedTemplateUrl=r.valueOf(c),b=k(c)));d.isDefined(b)&&(a.$template=b);return f.all(a)}}).then(function(c){e==t.current&&(e&&(e.locals=c,d.copy(e.params,b)),a.$broadcast("$routeChangeSuccess",e,w))},function(b){e==t.current&&a.$broadcast("$routeChangeError",
e,w,b)})}function n(){var a,b;d.forEach(g,function(f,g){var q;if(q=!b){var h=c.path();q=f.keys;var l={};if(f.regexp)if(h=f.regexp.exec(h)){for(var k=1,n=h.length;k<n;++k){var m=q[k-1],p=h[k];m&&p&&(l[m.name]=p)}q=l}else q=null;else q=null;q=a=q}q&&(b=s(f,{params:d.extend({},c.search(),a),pathParams:a}),b.$$route=f)});return b||g[null]&&s(g[null],{params:{},pathParams:{}})}function u(a,b){var c=[];d.forEach((a||"").split(":"),function(a,d){if(0===d)c.push(a);else{var f=a.match(/(\w+)(?:[?*])?(.*)/),
g=f[1];c.push(b[g]);c.push(f[2]||"");delete b[g]}});return c.join("")}var v=!1,p,x,t={routes:g,reload:function(){v=!0;var b={defaultPrevented:!1,preventDefault:function(){this.defaultPrevented=!0;v=!1}};a.$evalAsync(function(){l(b);b.defaultPrevented||m()})},updateParams:function(a){if(this.current&&this.current.$$route)a=d.extend({},this.current.params,a),c.path(u(this.current.$$route.originalPath,a)),c.search(a);else throw B("norout");}};a.$on("$locationChangeStart",l);a.$on("$locationChangeSuccess",
m);return t}]});var B=d.$$minErr("ngRoute");r.provider("$routeParams",function(){this.$get=function(){return{}}});r.directive("ngView",x);r.directive("ngView",A);x.$inject=["$route","$anchorScroll","$animate"];A.$inject=["$compile","$controller","$route"]})(window,window.angular);
//# sourceMappingURL=angular-route.min.js.map
{
"name": "angular-route",
"version": "1.5.0-rc.0",
"version": "1.5.1-build.4601+sha.c966876",
"license": "MIT",
"main": "./angular-route.js",
"ignore": [],
"dependencies": {
"angular": "1.5.0-rc.0"
"angular": "1.5.1-build.4601+sha.c966876"
}
}
{
"name": "angular-route",
"version": "1.5.0-rc.0",
"version": "1.5.1-build.4601+sha.c966876",
"description": "AngularJS router module",
"main": "index.js",
"scripts": {
......
{
"name": "angular-sanitize",
"version": "1.5.0-rc.0",
"version": "1.5.1-build.4601+sha.c966876",
"license": "MIT",
"main": "./angular-sanitize.js",
"ignore": [],
"dependencies": {
"angular": "1.5.0-rc.0"
"angular": "1.5.1-build.4601+sha.c966876"
},
"homepage": "https://github.com/angular/bower-angular-sanitize",
"_release": "1.5.0-rc.0",
"_release": "1.5.1-build.4601+sha.c966876",
"_resolution": {
"type": "version",
"tag": "v1.5.0-rc.0",
"commit": "e908c5b56ec6e5fee07d6364de1899407e33643b"
"tag": "v1.5.1-build.4601+sha.c966876",
"commit": "03a315074d87fad7b1efc1566a7804a881e60f2a"
},
"_source": "git://github.com/angular/bower-angular-sanitize.git",
"_target": "~1.5.0",
"_target": "~1.5.1",
"_originalSource": "angular-sanitize"
}
\ No newline at end of file
/**
* @license AngularJS v1.5.0-rc.0
* (c) 2010-2015 Google, Inc. http://angularjs.org
* @license AngularJS v1.5.1-build.4601+sha.c966876
* (c) 2010-2016 Google, Inc. http://angularjs.org
* License: MIT
*/
(function(window, angular, undefined) {'use strict';
......@@ -259,7 +259,7 @@ var validElements = angular.extend({},
optionalEndTagElements);
//Attributes that have href and hence need to be sanitized
var uriAttrs = toMap("background,cite,href,longdesc,src,usemap,xlink:href");
var uriAttrs = toMap("background,cite,href,longdesc,src,xlink:href");
var htmlAttrs = toMap('abbr,align,alt,axis,bgcolor,border,cellpadding,cellspacing,class,clear,' +
'color,cols,colspan,compact,coords,dir,face,headers,height,hreflang,hspace,' +
......@@ -652,8 +652,13 @@ angular.module('ngSanitize').filter('linky', ['$sanitize', function($sanitize) {
/((ftp|https?):\/\/|(www\.)|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s.;,(){}<>"\u201d\u2019]/i,
MAILTO_REGEXP = /^mailto:/i;
var linkyMinErr = angular.$$minErr('linky');
var isString = angular.isString;
return function(text, target, attributes) {
if (!text) return text;
if (text == null || text === '') return text;
if (!isString(text)) throw linkyMinErr('notstring', 'Expected string but received: {0}', text);
var match;
var raw = text;
var html = [];
......
{
"name": "angular-sanitize",
"version": "1.5.0-rc.0",
"version": "1.5.1-build.4601+sha.c966876",
"license": "MIT",
"main": "./angular-sanitize.js",
"ignore": [],
"dependencies": {
"angular": "1.5.0-rc.0"
"angular": "1.5.1-build.4601+sha.c966876"
}
}
{
"name": "angular-sanitize",
"version": "1.5.0-rc.0",
"version": "1.5.1-build.4601+sha.c966876",
"description": "AngularJS module for sanitizing HTML",
"main": "index.js",
"scripts": {
......
{
"name": "angular",
"version": "1.5.0-rc.0",
"version": "1.5.1-build.4601+sha.c966876",
"license": "MIT",
"main": "./angular.js",
"ignore": [],
"dependencies": {},
"homepage": "https://github.com/angular/bower-angular",
"_release": "1.5.0-rc.0",
"_release": "1.5.1-build.4601+sha.c966876",
"_resolution": {
"type": "version",
"tag": "v1.5.0-rc.0",
"commit": "7ca341e6db77f5d8d93228335347b193a7af25c5"
"tag": "v1.5.1-build.4601+sha.c966876",
"commit": "90b6eb3e58a192be90411d76f62a66a51019c877"
},
"_source": "git://github.com/angular/bower-angular.git",
"_target": "1.5.0-rc.0",
"_target": "~1.5.1",
"_originalSource": "angular"
}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
{
"name": "angular",
"version": "1.5.0-rc.0",
"version": "1.5.1-build.4601+sha.c966876",
"license": "MIT",
"main": "./angular.js",
"ignore": [],
"dependencies": {
......
{
"name": "angular",
"version": "1.5.0-rc.0",
"version": "1.5.1-build.4601+sha.c966876",
"description": "HTML enhanced for web apps",
"main": "index.js",
"scripts": {
......
{
"name": "text",
"version": "2.0.14",
"main": "text.js",
"homepage": "https://github.com/requirejs/text",
"_release": "2.0.14",
"_resolution": {
"type": "version",
"tag": "2.0.14",
"commit": "195a482d24f1d515979ab26f29e968e99c4ab63c"
},
"_source": "git://github.com/requirejs/text.git",
"_target": "~2.0.14",
"_originalSource": "requirejs-text",
"_direct": true
}
\ No newline at end of file
RequireJS is released under two licenses: new BSD, and MIT. You may pick the
license that best suits your development needs. The text of both licenses are
provided below.
The "New" BSD License:
----------------------
Copyright (c) 2010-2014, The Dojo Foundation
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of the Dojo Foundation nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
MIT License
-----------
Copyright (c) 2010-2014, The Dojo Foundation
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
# text
A [RequireJS](http://requirejs.org)/AMD loader plugin for loading text
resources.
Known to work in RequireJS, but should work in other AMD loaders that support
the same loader plugin API.
## Docs
See the [RequireJS API text section](http://requirejs.org/docs/api.html#text).
## Latest release
The latest release is always available from [the "latest" tag](https://raw.github.com/requirejs/text/latest/text.js).
It can also be installed using [volo](https://github.com/volojs/volo):
volo add requirejs/text
## Usage
It is nice to build HTML using regular HTML tags, instead of building up DOM
structures in script. However, there is no good way to embed HTML in a
JavaScript file. The best that can be done is using a string of HTML, but that
can be hard to manage, particularly for multi-line HTML.
The text.js AMD loader plugin can help with this issue. It will automatically be
loaded if the text! prefix is used for a dependency. Download the plugin and put
it in the app's [baseUrl](http://requirejs.org/docs/api.html#config-baseUrl)
directory (or use the [paths config](http://requirejs.org/docs/api.html#config-paths) to place it in other areas).
You can specify a text file resource as a dependency like so:
```javascript
require(["some/module", "text!some/module.html", "text!some/module.css"],
function(module, html, css) {
//the html variable will be the text
//of the some/module.html file
//the css variable will be the text
//of the some/module.css file.
}
);
```
Notice the .html and .css suffixes to specify the extension of the file. The
"some/module" part of the path will be resolved according to normal module name
resolution: it will use the **baseUrl** and **paths** [configuration
options](http://requirejs.org/docs/api.html#config) to map that name to a path.
For HTML/XML/SVG files, there is another option. You can pass !strip, which
strips XML declarations so that external SVG and XML documents can be added to a
document without worry. Also, if the string is an HTML document, only the part
inside the body tag is returned. Example:
```javascript
require(["text!some/module.html!strip"],
function(html) {
//the html variable will be the text of the
//some/module.html file, but only the part
//inside the body tag.
}
);
```
The text files are loaded via asynchronous XMLHttpRequest (XHR) calls, so you
can only fetch files from the same domain as the web page (see **XHR
restrictions** below).
However, [the RequireJS optimizer](http://requirejs.org/docs/optimization.html)
will inline any text! references with the actual text file contents into the
modules, so after a build, the modules that have text! dependencies can be used
from other domains.
## Configuration
### XHR restrictions
The text plugin works by using XMLHttpRequest (XHR) to fetch the text for the
resources it handles.
However, XHR calls have some restrictions, due to browser/web security policies:
1) Many browsers do not allow file:// access to just any file. You are better
off serving the application from a local web server than using local file://
URLs. You will likely run into trouble otherwise.
2) There are restrictions for using XHR to access files on another web domain.
While CORS can help enable the server for cross-domain access, doing so must
be done with care (in particular if you also host an API from that domain),
and not all browsers support CORS.
So if the text plugin determines that the request for the resource is on another
domain, it will try to access a ".js" version of the resource by using a
script tag. Script tag GET requests are allowed across domains. The .js version
of the resource should just be a script with a define() call in it that returns
a string for the module value.
Example: if the resource is 'text!example.html' and that resolves to a path
on another web domain, the text plugin will do a script tag load for
'example.html.js'.
The [requirejs optimizer](http://requirejs.org/docs/optimization.html) will
generate these '.js' versions of the text resources if you set this in the
build profile:
optimizeAllPluginResources: true
In some cases, you may want the text plugin to not try the .js resource, maybe
because you have configured CORS on the other server, and you know that only
browsers that support CORS will be used. In that case you can use the
[module config](http://requirejs.org/docs/api.html#config-moduleconfig)
(requires RequireJS 2+) to override some of the basic logic the plugin uses to
determine if the .js file should be requested:
```javascript
requirejs.config({
config: {
text: {
useXhr: function (url, protocol, hostname, port) {
//Override function for determining if XHR should be used.
//url: the URL being requested
//protocol: protocol of page text.js is running on
//hostname: hostname of page text.js is running on
//port: port of page text.js is running on
//Use protocol, hostname, and port to compare against the url
//being requested.
//Return true or false. true means "use xhr", false means
//"fetch the .js version of this resource".
}
}
}
});
```
### Custom XHR hooks
There may be cases where you might want to provide the XHR object to use
in the request, or you may just want to add some custom headers to the
XHR object used to make the request. You can use the following hooks:
```javascript
requirejs.config({
config: {
text: {
onXhr: function (xhr, url) {
//Called after the XHR has been created and after the
//xhr.open() call, but before the xhr.send() call.
//Useful time to set headers.
//xhr: the xhr object
//url: the url that is being used with the xhr object.
},
createXhr: function () {
//Overrides the creation of the XHR object. Return an XHR
//object from this function.
//Available in text.js 2.0.1 or later.
},
onXhrComplete: function (xhr, url) {
//Called whenever an XHR has completed its work. Useful
//if browser-specific xhr cleanup needs to be done.
}
}
}
});
```
### Forcing the environment implemention
The text plugin tries to detect what environment it is available for loading
text resources, Node, XMLHttpRequest (XHR) or Rhino, but sometimes the
Node or Rhino environment may have loaded a library that introduces an XHR
implementation. You can force the environment implementation to use by passing
an "env" module config to the plugin:
```javascript
requirejs.config({
config: {
text: {
//Valid values are 'node', 'xhr', or 'rhino'
env: 'rhino'
}
}
});
```
## License
Dual-licensed -- new BSD or MIT.
## Where are the tests?
They are in the [requirejs](https://github.com/jrburke/requirejs) and
[r.js](https://github.com/jrburke/r.js) repos.
## History
This plugin was in the [requirejs repo](https://github.com/jrburke/requirejs)
up until the requirejs 2.0 release.
{
"name": "text",
"version": "2.0.14",
"main": "text.js"
}
\ No newline at end of file
{
"name": "text",
"version": "2.0.14",
"description": "An AMD loader plugin for loading text resources.",
"categories": [
"Loader plugins"
],
"main": "text.js",
"github": "https://github.com/requirejs/text",
"bugs": {
"web": "https://github.com/requirejs/text/issues"
},
"repository": {
"type": "git",
"url": "https://github.com/requirejs/text.git"
},
"licenses": [
{
"type": "MIT",
"url": "http://www.opensource.org/licenses/mit-license.php"
},
{
"type": "BSD New",
"url": "http://opensource.org/licenses/BSD-3-Clause"
}
],
"volo": {
"url": "https://raw.github.com/requirejs/text/{version}/text.js"
}
}
{
"name": "requirejs",
"version": "2.1.20",
"ignore": [],
"homepage": "http://requirejs.org",
"authors": [
"jrburke.com"
],
"description": "A file and module loader for JavaScript",
"main": "require.js",
"keywords": [
"AMD"
],
"license": [
"BSD-3-Clause",
"MIT"
],
"_release": "2.1.20",
"_resolution": {
"type": "version",
"tag": "2.1.20",
"commit": "ad0230c737a1289c3ffe3d76ce0f86366955239a"
},
"_source": "git://github.com/jrburke/requirejs-bower.git",
"_target": "~2.1.18",
"_originalSource": "requirejs"
}
\ No newline at end of file
# requirejs-bower
Bower packaging for [RequireJS](http://requirejs.org).
{
"name": "requirejs",
"version": "2.1.20",
"ignore": [],
"homepage": "http://requirejs.org",
"authors": [
"jrburke.com"
],
"description": "A file and module loader for JavaScript",
"main": "require.js",
"keywords": [
"AMD"
],
"license": [
"BSD-3-Clause",
"MIT"
]
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment