Comment block for an AngularJS function in Doxygen

For my project, I am utilizing angularJS along with doxygen.

Within my angular controller, I have defined some functions in the following manner:

function MyCtrl($scope) {
     /**
      * @param page String Page name
      * @ingroup API
      * @author Sylvain
      */
     $scope.prev = function(page) {
        ... 
     }

     ... other functions
}

My goal is to have doxygen interpret this code as a function declaration.

I attempted to use the @fn command, but found that doxygen combines all comments for angular functions within the documentation of the MyCtrl function without creating separate function blocks.

Any suggestions on how to resolve this issue?

Thank you!

Answer №1

It's possible that Doxygen is getting confused by the $scope argument. Changing it to just "scope" and updating the @param comment to reflect this change seems to resolve the issue. This results in a correctly generated function declaration document section.

Although Doxygen officially does not claim support for JavaScript, it can still work as long as the code does not resemble PHP with its use of the $ symbol.

You may find this link useful:

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Encountering an issue when attempting to inject a personalized service into the ui-router configuration results in the following error message:

My goal is to incorporate my custom service into an angular app within the ui-router config function. I have defined the router as shown below, but when attempting to inject the service, I encounter an error: Unknown provider: Auth. Here is a snippet of th ...

checking karma rootScope.$on event for successfully changing location

In my code snippet, I have a simple function that reloads the current window when $locationChangeSuccess occurs: $rootScope.$on('$locationChangeSuccess', function(){ self.window.location.reload(); }); I am looking to test this function usin ...

Sending additional data to the multer Upload API

I have implemented the multer method for uploading files in node.js, with detailed instructions available at this link. In addition to the file data, I am also attempting to include extra information called invoiceId: Upload.upload({ ...

Websocket item deletion protocol

I am currently in the process of setting up a WebSocket client to showcase a synchronized list of items that mirror the server's state. My backend is powered by Spring, while my front-end utilizes AngularJS. I have scoured through numerous examples, a ...

The array remains static and unchanging

Just diving into the world of angular JS and running into a little hiccup when trying to edit an object in an array. The liked function below is triggered and receives the correct object. The loop successfully locates the right object and sets its liked va ...

Optimal Placement of jQuery Event Handlers in React/Redux Components with Asynchronous Data Loading

After reviewing the ReactJS documentation, it's clear that the most suitable lifecycle method for handling redux action calls is componentDidMount. However, I'm facing a challenge when it comes to incorporating jQuery operations within this parti ...

Is there a way to arrange list items to resemble a stack?

Typically, when floating HTML elements they flow from left to right and wrap to the next line if the container width is exceeded. I'm wondering if there's a way to make them float at the bottom instead. This means the elements would stack upward ...

Difference Between For Loop and Map Function

I encountered two scenarios while trying to understand what was happening, but the clarity eluded me. I came across information suggesting that when running async calls in a for loop or map, Promise.all must be used. Let me share my experiences: Initially ...

Launch pop-up window when the button is pressed

After successfully configuring the modal windows using Bootstrap and JQuery code along with certain values, a common query arises. The main question revolves around how to trigger the opening of this modal window upon pressing the process button? <butt ...

Having various Collada scenes in Three.js animation may not be compatible

I'm having trouble animating multiple models in Collada format (knight.dae & archer.dae). The issue is that I can't seem to get them all to animate properly, specifically in an idle state with only 2-3 frames. When I load the scene, I end up with ...

Creating a JavaScript and C# popup for deleting records in asp.net

I'm struggling a bit with understanding how server-side deletion works. I know how to use MessageBox, but it's not the best approach. I've been advised to use a popup on the server side. What I'm trying to achieve is that when you clic ...

Astro Project experiencing issues with loading SRC folder and style tags

After setting up a brand new astro repository with the following commands: npm create astro@latest npm run dev I encountered an issue where the default project template failed to display correctly on my computer. Here is how the page appeared: https://i. ...

Checking the condition prior to adding an item and displaying a message in ReactJS

I am currently working on an application using React.JS Before adding data, I want to implement a condition check. This is the code snippet: const App = () => { const [item, setItem] = useState([]) const [category, setCategory] = useState([]) ...

Leveraging nodejs fluent-ffmpeg for live streaming to an icecast server

I am attempting to create an API call using Express that invokes ffmpeg to output a stream to icecast. Although I have successfully achieved this using child_process, I recently discovered the fluent-ffmpeg library for Node.js. When I include .save(&apo ...

5 Tips for Importing Internal CSS Conditionally Using JavaScript in Vue.js

At the moment, I am facing a challenge where I need to import a CSS file conditionally based on the user's browser. To keep the CSS file from being global, I have implemented the following code: created() { this.checkIsMobile() }, methods ...

Demonstration of integrating services into Angular 1.5 components

Could someone provide an example of how to use services with Angular 1.5 components? I am attempting to inject a service into an Angular 1.5 component, but I'm encountering issues. For instance, I have a login component structured like this: class ...

Guidelines for allocating memory for a dense array in Javascript

When utilizing the new Array(size) constructor, it appears that if the value of size is not constant, certain browsers (such as Chrome) may create a sparse array, leading to slower access times compared to using the default constructor. You can see this pe ...

Using jQuery Accordion within the MVC Framework

I'm new to MVC and considering using an accordion. However, I'm facing issues as the accordion does not appear despite adding all necessary references for jquery accordion and creating the div. Here is my code: @{ ViewBag.Title = "Online Co ...

"Clicking on a jQuery div will cause it to slide down, and clicking again

I am currently working on this code snippet: $("#right").click(function() { $("#signin").stop().slideDown(300); }); At the moment, it drops down when clicked, but I would like it to slideUp() when clicked again. Your help is appreciated. On a relate ...

Error encountered during execution of Angular application, specifically TS2305 error?

Hello, I am currently running an angular application by using the 'ng serve' command. I encountered the following error: ERROR in src/app/accounts/account-form/account-form.component.ts(29,3): error TS2305: Module '"/home/prasanth/primecas ...