-
-
Notifications
You must be signed in to change notification settings - Fork 28
Closed
Description
I do not seem to be able to use a named function without including the annotation above it.
import '../common/responsive.service'
import '../common/cookie.service'
module.service('menuConfigService', MenuConfigService);
function MenuConfigService(responsiveUtils, cookieService) {
var cfg = {};
var keys = Object.keys(bladeData);
keys.forEach(function (key) {
var keyData = _.cloneDeep(bladeData[key]);
if (typeof keyData === 'object' && keyData.data) {
keyData.data = convertMobileData(keyData['data'], responsiveUtils, cookieService);
}
cfg[key] = keyData;
});
return cfg;
}
The above code will result in an error stating MenuConfigService is not using explicit annotation. This does appear to be supported by ng-annotate olov/ng-annotate#57. Is this an issue with the loader?
module: {
loaders: [
{
test: /\.jsx?$/,
loader: 'ng-annotate-loader!babel-loader?stage=0',
exclude: /web_modules|node_modules|bower_components/
},
{test: /\.(png|jpg|jpeg|gif|svg)$/, loader: 'url-loader?limit=10000'},
{test: /\.json$/, loader: 'json-loader'},
{test: /\.jade$/, loader: 'raw!sprint-jade-loader'}
]
}
Metadata
Metadata
Assignees
Labels
No labels