You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/**
* @ngdoc service
* @name example
* @description
* # This does stuff
* @example
<example module="myApp">
<file name="script.js">
console.log('This should execute');
</file>
</example>
*/
angular.module( 'myApp', [] )
.factory( 'example', function ( $log ) {
...
} );
Gives me the following error:
E:\development\js\proj\node_modules\gulp-ngdocs\src\example.js:142
out.push(' ng-set-html="' + this.html[0].id + '"');
TypeError: Cannot read property 'id' of undefined at exports.Example.toHtmlEmbed (E:\development\js\proj\node_modules\gulp-ngdocs\src\example.js:142:43)
at exports.Example.toHtml (E:\development\js\proj\node_modules\gulp-ngdocs\src\example.js:80:16)
at E:\development\js\proj\node_modules\gulp-ngdocs\src\ngdoc.js:220:38
at String.replace (native)
at E:\development\js\proj\node_modules\gulp-ngdocs\src\ngdoc.js:193:9
at Array.forEach (native)
at Object.Doc.markdown (E:\development\js\proj\node_modules\gulp-ngdocs\src\ngdoc.js:191:11)
at Object.Doc.parse (E:\development\js\proj\node_modules\gulp-ngdocs\src\ngdoc.js:401:25)
at E:\development\js\proj\node_modules\gulp-ngdocs\src\reader.js:49:99
at Array.forEach (native)
at processJsFile (E:\development\js\proj\node_modules\gulp-ngdocs\src\reader.js:34:9)
at Object.process (E:\development\js\proj\node_modules\gulp-ngdocs\src\reader.js:17:5)
at DestroyableTransform.transformFunction [as _transform] (E:\development\js\proj\node_modules\gulp-ngdocs\index.js:204:14)
at DestroyableTransform.Transform._read (E:\development\js\proj\node_modules\gulp-ngdocs\node_modules\readable-stream\lib\_stream_transform.js:184:10)
at DestroyableTransform.Transform._write (E:\development\js\proj\node_modules\gulp-ngdocs\node_modules\readable-stream\lib\_stream_transform.js:172:12)
at doWrite (E:\development\js\proj\node_modules\gulp-ngdocs\node_modules\readable-stream\lib\_stream_writable.js:237:10)
I've seen this done in Angular's documentation. However, the package works with...
@example
<example module="myApp">
<file name="index.html">
<div ng-repeat="i in [1,2,3] | oddFilter">
{{ i }}
</div>
</file>
</example>
But not with the script.js to document a JavaScript example.
Please advise on how I can work around this.
The text was updated successfully, but these errors were encountered:
I've been trying to create an example like:
Gives me the following error:
I've seen this done in Angular's documentation. However, the package works with...
But not with the
script.js
to document a JavaScript example.Please advise on how I can work around this.
The text was updated successfully, but these errors were encountered: