@@ -7,15 +7,15 @@ var angularCodeUrl = '//code.angularjs.org/';
7
7
8
8
var cdnUrl = googleCdnUrl + versionInfo . cdnVersion ;
9
9
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) .
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 during the same time
15
+ // as the docs app .
16
16
var examplesCdnUrl = versionInfo . currentVersion . isSnapshot ?
17
17
( angularCodeUrl + 'snapshot' ) :
18
- ( googleCdnUrl + ( versionInfo . currentVersion . version || versionInfo . currentVersion ) ) ;
18
+ ( angularCodeUrl + ( versionInfo . currentVersion . version || versionInfo . currentVersion . version ) ) ;
19
19
20
20
module . exports = function productionDeployment ( getVersion ) {
21
21
return {
@@ -24,7 +24,7 @@ module.exports = function productionDeployment(getVersion) {
24
24
commonFiles : {
25
25
scripts : [ examplesCdnUrl + '/angular.min.js' ]
26
26
} ,
27
- dependencyPath : examplesCdnUrl + '/'
27
+ dependencyPath : examplesCdnUrl
28
28
} ,
29
29
scripts : [
30
30
cdnUrl + '/angular.min.js' ,
0 commit comments