-
Notifications
You must be signed in to change notification settings - Fork 35
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
childViews array #92
Comments
Is this in regards to the
How would this be written when using your Ember-CLI port? |
I think we're talking about two different things here.
Basically this: CustomTilesApp.IndexView =
EmberLeaflet.MapView.extend({
childLayers: [CustomTilesApp.TileLayer]}); turns into this: CustomTilesApp.IndexView =
EmberLeaflet.MapView.extend({
init: function(){
this._super();
this.pushObject(this.createChildView(CustomTilesApp.TileLayer));
}
}); Regarding your question about an ember-cli version of your code, you could do it like this (still without the deprecation): // app/layers/tile.js
import TileLayer from 'ember-leaflet/layers/tile';
export default TileLayer.extend({
tileUrl:
'http://{s}.tile.cloudmade.com' +
'/{key}/{styleId}/256/' +
'{z}/{x}/{y}.png',
options: {key: 'API-key', styleId: 997}
}); // app/templates/index.hbs
{{ember-leaflet childLayers=controller.childLayers}} // app/controllers/index.js
import Ember from 'ember';
import CustomTileLayer from '../layers/tile';
export default Ember.Controller.extend({
childLayers: [CustomTileLayer]
}); Another option would be to override the component. |
I was checking Ember 1.10 release post, and stumbled upon an interesting deprecation: http://emberjs.com/blog/2015/02/07/ember-1-10-0-released.html#toc_notable-deprecations
Of course this doesn't affect this project because we're not using Ember Views.
However, since they were one of the motivations, we should stick with their best practices as much as possible. Also, it would be easier for Ember users.
I'm opening this issue for a discussion on this matter.
The text was updated successfully, but these errors were encountered: