mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-04-29 19:04:42 +00:00
fix(docs.js): handle empty deps array for plunkr/jsfiddle
Change return value of docsApp.serviceFactory.prepareDefaultAppModule to include empty array `[]` instead of array containing one empty string element `['']`. This will correct script.js for simple plunkr/jsfiddle examples such as [ngChecked](http://docs.angularjs.org/api/ng.directive:ngChecked).
This commit is contained in:
parent
ba38de2212
commit
1f686c489d
1 changed files with 2 additions and 1 deletions
|
|
@ -359,7 +359,8 @@ docsApp.serviceFactory.prepareDefaultAppModule = function() {
|
||||||
var moduleName = 'App';
|
var moduleName = 'App';
|
||||||
return {
|
return {
|
||||||
module : moduleName,
|
module : moduleName,
|
||||||
script : "angular.module('" + moduleName + "', ['" + deps.join("','") + "']);\n\n"
|
script : "angular.module('" + moduleName + "', [" +
|
||||||
|
(deps.length ? "'" + deps.join("','") + "'" : "") + "]);\n\n"
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue