Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't figure out to document angular with typescript #183

Open
caseyhoward opened this issue Jun 17, 2016 · 2 comments
Open

Can't figure out to document angular with typescript #183

caseyhoward opened this issue Jun 17, 2016 · 2 comments

Comments

@caseyhoward
Copy link

I created a fork of a project that works for generating angular documentation. However, I need to be able to use typescript. I tried modifying it to make typescript work. It acts like it works (no errors in the console when building) but the documentation is blank. The repo is here: https://github.com/caseyhoward/angular-dgeni-seed

Help would greatly be appreciated.

@tommck
Copy link

tommck commented Mar 20, 2017

I can't figure it out either. I really wish there was an official typescript example. I've been struggling with this on and off for weeks

@chriscasola
Copy link

I got it working by adding a factory like this:

.factory('tsngFileReader', function (jsdocFileReader) {
  return {
    name: 'tsngFileReader',
    defaultPattern: /\.ts$/,
    getDocs: jsdocFileReader.getDocs
  };
})

And then adding the file reader:

.config(function (readFilesProcessor, writeFilesProcessor, log, tsngFileReader) {
  // scrape .ts files for ngdoc comments
  readFilesProcessor.fileReaders.push(tsngFileReader);
})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants