chore(resource): moved to module

This commit is contained in:
Misko Hevery
2012-03-26 21:45:38 -07:00
parent 8218c4b60b
commit 798bca62c6
5 changed files with 17 additions and 5 deletions

View File

@@ -146,7 +146,7 @@ function TutorialInstructionsCtrl($cookieStore) {
};
}
angular.module('ngdocs', ['ngdocs.directives'], function($locationProvider, $filterProvider, $compileProvider) {
angular.module('ngdocs', ['ngdocs.directives', 'ngResource'], function($locationProvider, $filterProvider, $compileProvider) {
$locationProvider.html5Mode(true).hashPrefix('!');
$filterProvider.register('title', function(){

View File

@@ -18,7 +18,6 @@
baseUrl = location.href.replace(rUrl, indexFile),
jQuery = /index-jq[^\.]*\.html$/.test(baseUrl),
debug = /index[^\.]*-debug\.html$/.test(baseUrl),
angularPath = debug ? '../angular.js' : '../angular.min.js',
headEl = document.getElementsByTagName('head')[0],
sync = true;
@@ -28,10 +27,15 @@
type: 'text/css'});
addTag('script', {src: 'syntaxhighlighter/syntaxhighlighter-combined.js'}, sync);
if (jQuery) addTag('script', {src: 'jquery.min.js'});
addTag('script', {src: angularPath}, sync);
addTag('script', {src: path('angular.js')}, sync);
addTag('script', {src: path('angular-resource.js') }, sync);
addTag('script', {src: 'docs-combined.js'}, sync);
addTag('script', {src: 'docs-keywords.js'}, sync);
function path(name) {
return '../' + name.replace(/\.js$/, debug ? '.js' : '.min.js');
}
function addTag(name, attributes, sync) {
var el = document.createElement(name),
attrName;