jonahbron / angular-owl-carousel Goto Github PK
View Code? Open in Web Editor NEW**ARCHIVED**: This library is for AngularJS. Neither that framework nor this library should be used at this point in time.
**ARCHIVED**: This library is for AngularJS. Neither that framework nor this library should be used at this point in time.
Fix
$sce
into controller$sce.trustAsHtml to each string
<div ng-controller="MyController">
<div owl-carousel="items">
<div class="item" ng-bind-html="item"></div>
</div>
</div>
Could you put together a working example of this code in the project? Or possibly a link to it working on Plunkr.co?
Hi, I need add Custom Events, how it could be implemented? Thanks.
Hi,
I found that running grunt serve didn't include all the js and css files necessary.
So I created a bower.json file.
As follows...
{ "name": "owlcarousel", "main": ["owl-carousel/owl.carousel.js", "owl-carousel/owl.carousel.css", "owl-carousel/owl.theme.css"], "license": "MIT", "ignore": [ "package.json" ], "keywords": [ "owlcarousel", "javascript", "browser", "library" ] }
how do i template the items? there are no clear directions? am i supposed to pass html as an array for items? this sucks balls.
Hi,
Are you still developing this? attributes.owlOptions is required. It not passed in, the directive fails.
This is not documented in the example but the owl-options attribute is required or the JSON.parse
fails on line 15
.
I am getting this when adding an item:
TypeError: Cannot read property 'dom' of undefined
at e.destroy (owl.carousel.min.js:formatted:599)
at e.destroy (owl.carousel.min.js:formatted:309)
at angular-owl-carousel.js:23
at Object.$watchCollectionAction as fn
at Scope.$get.Scope.$digest (angular.js:14308)
at Scope.$get.Scope.$apply (angular.js:14571)
at HTMLButtonElement. (angular.js:21571)
at HTMLButtonElement.jQuery.event.dispatch (jquery.js:4676)
at HTMLButtonElement.jQuery.event.add.elemData.handle (jquery.js:4360)
The version in your bower.json is out of sync with your most recently tagged release, causing v0.1.0 to be installed with a bower install of this package.
When I run two carousels on one page the last carousel doesn't populate. If the array is populated with static data then there is no problem but as soon as I load the data from my api the problem occurs again.
Downloaded and tested software as is, however throws an error.
angular.js:14110 SyntaxError: [verstraetenIo Error] Unexpected token v in JSON at position 0 at JSON.parse (<anonymous>) at Object.link (http://10.10.10.10:3000/bower_components/angular-owl-carousel/src/angular-owl-carousel.js:18:36) at http://10.10.10.10:3000/bower_components/angular/angular.js:1259:18 at invokeLinkFn (http://10.10.10.10:3000/bower_components/angular/angular.js:10095:9) at nodeLinkFn (http://10.10.10.10:3000/bower_components/angular/angular.js:9492:11) at compositeLinkFn (http://10.10.10.10:3000/bower_components/angular/angular.js:8757:13) at compositeLinkFn (http://10.10.10.10:3000/bower_components/angular/angular.js:8760:13) at compositeLinkFn (http://10.10.10.10:3000/bower_components/angular/angular.js:8760:13) at compositeLinkFn (http://10.10.10.10:3000/bower_components/angular/angular.js:8760:13) at nodeLinkFn (http://10.10.10.10:3000/bower_components/angular/angular.js:9486:11) <div owl-carousel="vm.owl.items" owl-options="vm.owl.options">(anonymous function) @ angular.js:14110(anonymous function) @ angular.js:10633(anonymous function) @ exception-handler.provider.js:55invokeLinkFn @ angular.js:10097nodeLinkFn @ angular.js:9492compositeLinkFn @ angular.js:8757compositeLinkFn @ angular.js:8760compositeLinkFn @ angular.js:8760compositeLinkFn @ angular.js:8760nodeLinkFn @ angular.js:9486compositeLinkFn @ angular.js:8757publicLinkFn @ angular.js:8637(anonymous function) @ angular-ui-router.js:4089(anonymous function) @ angular.js:1259invokeLinkFn @ angular.js:10095nodeLinkFn @ angular.js:9492compositeLinkFn @ angular.js:8757publicLinkFn @ angular.js:8637lazyCompilation @ angular.js:8994updateView @ angular-ui-router.js:4021(anonymous function) @ angular-ui-router.js:3959$broadcast @ angular.js:18239$state.transition.resolved.then.$state.transition @ angular-ui-router.js:3352processQueue @ angular.js:16606(anonymous function) @ angular.js:16622$eval @ angular.js:17913$digest @ angular.js:17727$apply @ angular.js:18021done @ angular.js:12002completeRequest @ angular.js:12211requestLoaded @ angular.js:12139 angular.js:14110 Error: [verstraetenIo Error] Unexpected token v in JSON at position 0 Object {exception: SyntaxError: [verstraetenIo Error] Unexpected token v in JSON at position 0 at JSON.parse (<anon…, cause: "<div owl-carousel="vm.owl.items" owl-options="vm.owl.options">"}
When I set the loop option to true, the html ends up looking like this:
<div class="item {{ item }} ng-scope">
...
</div>
where {{ item }}
is not replaced
Could you add a licence in your repo please so that everyone could fork/use it?
How do we use the owl carousel options?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.