-
Notifications
You must be signed in to change notification settings - Fork 486
@lends does not work with member expressions like My.Collection #687
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
Comments
Hi Sanja! Sorry for the delay, looking at this now, the proper solution is: /**
* Class representing a Collection of Models
*
* @class MyCollection
* @extends Backbone.Collection
*
*
*/
MyCollection = Backbone.Collection.extend(/** @lends MyCollection.prototype */{
/**
* Where to access API.
*
* @type {string} [urlRoot=My.Config.apiUrl] -
*/
urlRoot: My.Config.apiUrl,
/**
* Init function
*
* @type {function}
* @param {Object} options - my options
*/
initialize: function(options) {
Backbone.Collection.prototype.initialize.call(this, options);
}
}); The ^ This example works in my testing, but unfortunately I identified that |
@tmcw does this look like correct test reproduction? /**
* Class representing a Collection of Models
*
* @class My.Collection
* @extends Backbone.Collection
*
*
*/
My.Collection = Backbone.Collection.extend(/** @lends My.Collection.prototype */{
/**
* Where to access API.
*
* @type {string} [urlRoot=My.Config.apiUrl] -
*/
urlRoot: My.Config.apiUrl,
/**
* Init function
*
* @type {function}
* @param {Object} options - my options
*/
initialize: function(options) {
Backbone.Collection.prototype.initialize.call(this, options);
}
}); |
Perhaps it's linked to #591 (I don't see the whole picture yet) |
These 3 comment blocks appear completely separate in the docs. I would expect the 'urlRoot' attribute & 'initialize' function to be grouped with My.Collection class doc. They are all in alphabetical order, meaning I have several 'initialize' functions listed together without any context as I'm extending other Backbone base classes.
The text was updated successfully, but these errors were encountered: