@@ -7,24 +7,24 @@ var angularCodeUrl = '//code.angularjs.org/';
77
88var cdnUrl = googleCdnUrl + versionInfo . cdnVersion ;
99
10- // The plnkr examples must use the code.angularjs.org repo for the snapshot,
11- // and the cdn for the tagged version and, if the build is not tagged, the currentVersion.
12- //
13- // The currentVersion may not be available on the cdn (e.g. if built locally, or hasn't been pushed
14- // yet). This will lead to a 404, but this is preferable to loading a version with which the example
15- // might not work (possibly in subtle ways) .
16- var examplesCdnUrl = versionInfo . currentVersion . isSnapshot ?
10+ // The "examplesCdnUrl" here applies to the examples when they are opened in plnkr.co.
11+ // The embedded examples instead always include the files from the *default* deployment,
12+ // to ensure that the source files are always available.
13+ // The plnkr examples must always use the code.angularjs.org source files.
14+ // We cannot rely on the CDN files here, because they are not deployed by the time
15+ // docs.angularjs.org and code.angularjs.org need them .
16+ var examplesDependencyPath = versionInfo . currentVersion . isSnapshot ?
1717 ( angularCodeUrl + 'snapshot' ) :
18- ( googleCdnUrl + ( versionInfo . currentVersion . version || versionInfo . currentVersion ) ) ;
18+ ( angularCodeUrl + ( versionInfo . currentVersion . version || versionInfo . currentVersion . version ) ) ;
1919
2020module . exports = function productionDeployment ( getVersion ) {
2121 return {
2222 name : 'production' ,
2323 examples : {
2424 commonFiles : {
25- scripts : [ examplesCdnUrl + '/angular.min.js' ]
25+ scripts : [ examplesDependencyPath + '/angular.min.js' ]
2626 } ,
27- dependencyPath : examplesCdnUrl + '/'
27+ dependencyPath : examplesDependencyPath
2828 } ,
2929 scripts : [
3030 cdnUrl + '/angular.min.js' ,
0 commit comments