I'm using OSX 10.10, Webstorm 10.0.4, AngularJS 1.4.3
For example:
.factory('huodai.order.BatchPlanModel', function () {
var BatchPlanModel = function (date, batches) {
date = date || "";
batches = batches || {};
this.date = date;
this.batches = batches;
};
return BatchPlanModel;
})
I want when I type var a = new BatchPlanModel()
in the controller, some hint about the parameter or documentation shows up. But what did shows up when I press F1 is the definition of the controller. Like:
($filter,
[ optional ] $scope,
[ optional ] $state,
$timeout,
BatchPlanModel,
BatchPlanFactory,
EXAMINATION,
ARRIVE_TYPE )
Parameters:
$filter
$scope
$state
$timeout
BatchPlanModel
BatchPlanFactory
And adding something like
/**
*
* @param date
* @param batches
* @constructor
*/
before the var BatchPlanModel = ...
was no help.
Try changing your component declarations to use declared function references rather than anonymous functions