[ADF-1769] Added JSDocs for directives (#2964)

This commit is contained in:
Andy Stark
2018-02-20 14:00:18 +00:00
committed by Eugenio Romano
parent d731cc651c
commit b45048b5ed
26 changed files with 137 additions and 69 deletions

View File

@@ -185,14 +185,14 @@ var ServiceDocAutoContent = /** @class */ (function () {
}());
function updatePhase(tree, pathname, aggData) {
var fileNameNoSuffix = path.basename(pathname, ".md");
var itemType = fileNameNoSuffix.match(/component|service/);
var itemType = fileNameNoSuffix.match(/component|directive|service/);
if (itemType) {
var srcData = aggData.srcData[fileNameNoSuffix];
if (srcData) {
var srcPath = srcData.path;
var className = fixAngularFilename(fileNameNoSuffix);
var classData = void 0;
if (itemType[0] === "component") {
if ((itemType[0] === "component") || (itemType[0] === "directive")) {
classData = new ComponentDocAutoContent();
}
else if (itemType[0] === "service") {

View File

@@ -264,7 +264,7 @@ class ServiceDocAutoContent implements NgDocAutoContent {
export function updatePhase(tree, pathname, aggData) {
let fileNameNoSuffix = path.basename(pathname, ".md");
let itemType = fileNameNoSuffix.match(/component|service/);
let itemType = fileNameNoSuffix.match(/component|directive|service/);
if (itemType) {
let srcData = aggData.srcData[fileNameNoSuffix];
@@ -275,7 +275,7 @@ export function updatePhase(tree, pathname, aggData) {
let classData: NgDocAutoContent;
if (itemType[0] === "component") {
if ((itemType[0] === "component") || (itemType[0] === "directive")) {
classData = new ComponentDocAutoContent();
} else if (itemType[0] === "service") {
classData = new ServiceDocAutoContent();