- separate document page
This commit is contained in:
1 parent
900f71b066
commit
7b6559e57d
6 files changed
-333
No files matched your search
@@ -1,32 +0,0 @@
|
||||
import UppercaseFirst from './filters/UppercaseFirst';
|
||||
|
||||
var app = angular.module("hudozhka.document", [
|
||||
"hudozhka.data",
|
||||
"angulartics",
|
||||
"angulartics.google.analytics"
|
||||
]);
|
||||
|
||||
app.factory("docname", function ($location) {
|
||||
return function(){
|
||||
var abs = $location.absUrl();
|
||||
var doc_uri = /\/([\w-]+)$/.exec(abs);
|
||||
if(doc_uri.length >= 2) {
|
||||
return doc_uri[1];
|
||||
}else{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
app.controller("DocumentController", function ($rootScope, $scope, docs, docname) {
|
||||
$scope.pageClass = "page-document";
|
||||
|
||||
var n = docname();
|
||||
if(n) {
|
||||
var d = docs.doc(n);
|
||||
$scope.document = d;
|
||||
$rootScope.title = d.title;
|
||||
}
|
||||
});
|
||||
|
||||
UppercaseFirst(app);
|
||||
Reference in new issue
Block a user