Comments (16)
Got it! new Offcanvas($('[data-toggle="offcanvas"]'));
from bootstrap-offcanvas.
Do you have a demo app that you could share?
from bootstrap-offcanvas.
I've made you one: http://plnkr.co/edit/ZmUVTgp6xJctlZ0Xk14R?p=preview
The trick is ng-include
which loads the specified html file into that exact spot.
from bootstrap-offcanvas.
Thanks! I'll look into getting a fix for this 😄
from bootstrap-offcanvas.
Thanks! It would be awesome if you could fix it soon 😉
from bootstrap-offcanvas.
Any update on this? I'm eager to intergrate it into my website!
from bootstrap-offcanvas.
Unfortunately it's s bit harder than I originally though. I think I need to do a bit of a refactor of how it works, which is something I want to do anyway. However I don't have the time to do this at the moment.
Is there anyway you can use the class I've created? It should be a global object that you should be able to init from in angular.
from bootstrap-offcanvas.
That could work. How can I initialize your class?
from bootstrap-offcanvas.
You should be able to use new Offcanvas(TOGGLE ELEMENT)
from bootstrap-offcanvas.
Sorry, but I'm not sure what to write into TOGGLE ELEMENT.
I have this as a toggle button:
<button type="button" class="navbar-toggle offcanvas-toggle ng-scope" data-toggle="offcanvas" data-target="#js-bootstrap-offcanvas">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
I copied it from your example: http://iamphill.github.io/Bootstrap-Offcanvas/example.html
from bootstrap-offcanvas.
In the meanwhile I've updated the Plunkr code. Look for the "init Offcanvas here" line. That should be the place to put your Offcanvas init logic.
http://plnkr.co/edit/ZmUVTgp6xJctlZ0Xk14R?p=preview
from bootstrap-offcanvas.
I'll fork the plunkr & get it working 😄
from bootstrap-offcanvas.
Nice one! I was just about to send it back with that!
Happy to close?
from bootstrap-offcanvas.
Sure I am! Thanks a lot :-) Amazing support!
from bootstrap-offcanvas.
You're welcome! 👍
from bootstrap-offcanvas.
This should be way more prominent! Have been trying make this plugin work with RequireJS for a couple of hours.
require.config({
shim: {
bootstrap: {
deps: ['jquery']
},
bootstrapOffcanvas: {
deps: ['jquery', 'bootstrap'],
exports: 'Offcanvas'
},
},
paths: {
jquery: '../bower_components/jquery/dist/jquery',
bootstrap: '../bower_components/bootstrap-sass-official/assets/javascripts/bootstrap',
bootstrapOffcanvas: '../bower_components/bootstrap-offcanvas/dist/js/bootstrap.offcanvas.min'
}
});
And just new Offcanvas($('[data-toggle="offcanvas"]'));
in the render function after loading the template
from bootstrap-offcanvas.
Related Issues (20)
- Events fire in wrong order
- The offcanvas menu automatically closes when the input is clicked in mobile HOT 6
- Android HOT 1
- Multiple offcanvas menus
- Dropdowns don't open in desktop view HOT 9
- Doesn't work using AngularJS ngView
- Can't scroll contents when window resized HOT 1
- Gap below offcanvas menu area when scrolled down HOT 6
- Composer HOT 1
- Move to ES6 HOT 2
- Drop jQuery
- Plugins
- On window resize - remove the body class "offcanvas-stop-scrolling"
- Incompatible with Turbolinks HOT 3
- Disable close offcanvas menu after click on document
- Manually open menu when click on button not in menu
- New logo for Bootstrap-Offcanvas
- Allow to have several elements that use the same target
- menu maximizes invisibly when touching anywhere on the page
- offcanvas does not work if there are more elements inside the button. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bootstrap-offcanvas.