11/**
2- * @license AngularJS v1.3.16
2+ * @license AngularJS v1.3.17
33 * (c) 2010-2014 Google, Inc. http://angularjs.org
44 * License: MIT
55 */
@@ -54,7 +54,7 @@ function minErr(module, ErrorConstructor) {
5454 return match;
5555 });
5656
57- message = message + '\nhttp://errors.angularjs.org/1.3.16 /' +
57+ message = message + '\nhttp://errors.angularjs.org/1.3.17 /' +
5858 (module ? module + '/' : '') + code;
5959 for (i = 2; i < arguments.length; i++) {
6060 message = message + (i == 2 ? '?' : '&') + 'p' + (i - 2) + '=' +
@@ -2139,11 +2139,11 @@ function toDebugString(obj) {
21392139 * - `codeName` – `{string}` – Code name of the release, such as "jiggling-armfat".
21402140 */
21412141var version = {
2142- full: '1.3.16 ', // all of these placeholder strings will be replaced by grunt's
2142+ full: '1.3.17 ', // all of these placeholder strings will be replaced by grunt's
21432143 major: 1, // package task
21442144 minor: 3,
2145- dot: 16 ,
2146- codeName: 'cookie-oatmealification '
2145+ dot: 17 ,
2146+ codeName: 'tsktskskly-euouae '
21472147};
21482148
21492149
@@ -4954,7 +4954,7 @@ function Browser(window, document, $log, $sniffer) {
49544954
49554955 function getHash(url) {
49564956 var index = url.indexOf('#');
4957- return index === -1 ? '' : url.substr(index + 1 );
4957+ return index === -1 ? '' : url.substr(index);
49584958 }
49594959
49604960 /**
@@ -5081,7 +5081,7 @@ function Browser(window, document, $log, $sniffer) {
50815081 // Do the assignment again so that those two variables are referentially identical.
50825082 lastHistoryState = cachedState;
50835083 } else {
5084- if (!sameBase) {
5084+ if (!sameBase || reloadLocation ) {
50855085 reloadLocation = url;
50865086 }
50875087 if (replace) {
@@ -7954,7 +7954,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
79547954
79557955 $compileNode.empty();
79567956
7957- $templateRequest($sce.getTrustedResourceUrl( templateUrl) )
7957+ $templateRequest(templateUrl)
79587958 .then(function(content) {
79597959 var compileNode, tempTemplateAttrs, $template, childBoundTranscludeFn;
79607960
@@ -10760,7 +10760,7 @@ function LocationHashbangUrl(appBase, hashPrefix) {
1076010760 var withoutBaseUrl = beginsWith(appBase, url) || beginsWith(appBaseNoFile, url);
1076110761 var withoutHashUrl;
1076210762
10763- if (withoutBaseUrl.charAt(0) === '#') {
10763+ if (!isUndefined(withoutBaseUrl) && withoutBaseUrl.charAt(0) === '#') {
1076410764
1076510765 // The rest of the url starts with a hash so we have
1076610766 // got either a hashbang path or a plain hash fragment
@@ -10774,7 +10774,15 @@ function LocationHashbangUrl(appBase, hashPrefix) {
1077410774 // There was no hashbang path nor hash fragment:
1077510775 // If we are in HTML5 mode we use what is left as the path;
1077610776 // Otherwise we ignore what is left
10777- withoutHashUrl = this.$$html5 ? withoutBaseUrl : '';
10777+ if (this.$$html5) {
10778+ withoutHashUrl = withoutBaseUrl;
10779+ } else {
10780+ withoutHashUrl = '';
10781+ if (isUndefined(withoutBaseUrl)) {
10782+ appBase = url;
10783+ this.replace();
10784+ }
10785+ }
1077810786 }
1077910787
1078010788 parseAppUrl(withoutHashUrl, this);
@@ -16169,23 +16177,34 @@ var $compileMinErr = minErr('$compile');
1616916177 * @name $templateRequest
1617016178 *
1617116179 * @description
16172- * The `$templateRequest` service downloads the provided template using `$http` and, upon success,
16173- * stores the contents inside of `$templateCache`. If the HTTP request fails or the response data
16174- * of the HTTP request is empty, a `$compile` error will be thrown (the exception can be thwarted
16175- * by setting the 2nd parameter of the function to true).
16176- *
16177- * @param {string} tpl The HTTP request template URL
16180+ * The `$templateRequest` service runs security checks then downloads the provided template using
16181+ * `$http` and, upon success, stores the contents inside of `$templateCache`. If the HTTP request
16182+ * fails or the response data of the HTTP request is empty, a `$compile` error will be thrown (the
16183+ * exception can be thwarted by setting the 2nd parameter of the function to true). Note that the
16184+ * contents of `$templateCache` are trusted, so the call to `$sce.getTrustedUrl(tpl)` is omitted
16185+ * when `tpl` is of type string and `$templateCache` has the matching entry.
16186+ *
16187+ * @param {string|TrustedResourceUrl} tpl The HTTP request template URL
1617816188 * @param {boolean=} ignoreRequestError Whether or not to ignore the exception when the request fails or the template is empty
1617916189 *
1618016190 * @return {Promise} the HTTP Promise for the given.
1618116191 *
1618216192 * @property {number} totalPendingRequests total amount of pending template requests being downloaded.
1618316193 */
1618416194function $TemplateRequestProvider() {
16185- this.$get = ['$templateCache', '$http', '$q', function($templateCache, $http, $q) {
16195+ this.$get = ['$templateCache', '$http', '$q', '$sce', function($templateCache, $http, $q, $sce ) {
1618616196 function handleRequestFn(tpl, ignoreRequestError) {
1618716197 handleRequestFn.totalPendingRequests++;
1618816198
16199+ // We consider the template cache holds only trusted templates, so
16200+ // there's no need to go through whitelisting again for keys that already
16201+ // are included in there. This also makes Angular accept any script
16202+ // directive, no matter its name. However, we still need to unwrap trusted
16203+ // types.
16204+ if (!isString(tpl) || !$templateCache.get(tpl)) {
16205+ tpl = $sce.getTrustedResourceUrl(tpl);
16206+ }
16207+
1618916208 var transformResponse = $http.defaults && $http.defaults.transformResponse;
1619016209
1619116210 if (isArray(transformResponse)) {
@@ -22395,8 +22414,8 @@ var ngIfDirective = ['$animate', function($animate) {
2239522414 * @param {Object} angularEvent Synthetic event object.
2239622415 * @param {String} src URL of content to load.
2239722416 */
22398- var ngIncludeDirective = ['$templateRequest', '$anchorScroll', '$animate', '$sce',
22399- function($templateRequest, $anchorScroll, $animate, $sce ) {
22417+ var ngIncludeDirective = ['$templateRequest', '$anchorScroll', '$animate',
22418+ function($templateRequest, $anchorScroll, $animate) {
2240022419 return {
2240122420 restrict: 'ECA',
2240222421 priority: 400,
@@ -22432,7 +22451,7 @@ var ngIncludeDirective = ['$templateRequest', '$anchorScroll', '$animate', '$sce
2243222451 }
2243322452 };
2243422453
22435- scope.$watch($sce.parseAsResourceUrl( srcExp) , function ngIncludeWatchAction(src) {
22454+ scope.$watch(srcExp, function ngIncludeWatchAction(src) {
2243622455 var afterAnimation = function() {
2243722456 if (isDefined(autoScrollExp) && (!autoScrollExp || scope.$eval(autoScrollExp))) {
2243822457 $anchorScroll();
0 commit comments