I am working on ember application using ember-cli.
ember version is "2.0.0-beta.2"
I am integrating the foundation 5 in application, installed bower package for foundation and also included it in ember-cli-build.js file
app.import('bower_components/foundation/js/foundation/foundation.js');
app.import('bower_components/foundation/js/foundation/foundation.offcanvas.js');
Now i want to initialize the foundation as
Ember.$(document).foundation({
offcanvas: { close_on_click: true }
});
But in ember-2 they have removed views completely, where should i initialize it?
Any thoughts?
Thanks.
Finally able to fix it.. Thanks to "Taras Mankovski"
Here is the solution https://github.com/embersherpa/ama/issues/8
application.hbs
{{#app-canvas}}
<h2>Welcome to Ember.js</h2>
{{outlet}}
{{/app-canvas}}
components/app-canvas.js
import Ember from "ember";
export default Ember.Component.extend({
didInitAttrs() {
Ember.run.schedule("afterRender", function() {
Ember.$(document).foundation({
offcanvas: { close_on_click: true }
});
});
},
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With