Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

angular-owl-carousel2

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular-owl-carousel2 - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

2

package.json
{
"name": "angular-owl-carousel2",
"version": "1.0.2",
"version": "1.0.3",
"description": "Owl carousel 2 imp for angularjs",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -19,4 +19,25 @@ # Angular Owl Carousel - 2

```js
$scope.items = [1, 2, 3, 4, 5, 6, 7, 8];
$scope.properties = {
items: 2,
onChange: function () {
console.dir(arguments);
}
};
$scope.ready = function ($api) {
owlAPi = $api;
};
$timeout(function () {
console.dir(owlAPi);
owlAPi.trigger('next.owl.carousel',[2000]);
}, 2000)
```
```html
<ng-owl-carousel class="owl-theme" owl-items="items" owl-properties="properties">
<ng-owl-carousel class="owl-theme" owl-items="items" owl-properties="properties" owl-ready="ready($api)">
<div class="item"><h4>Free Item</h4></div>

@@ -23,0 +44,0 @@ <div class="item" data-ng-repeat="item in items"><h4>{{$index}}</h4></div>

@@ -9,2 +9,19 @@ /**

function OwlController() {
this.owlApi = {};
}
OwlController.prototype.init = function () {
this.owlApi = arguments[0];
};
OwlController.prototype.getApi = function () {
var self = this;
return {
trigger: function () {
self.owlApi.trigger.apply(self.owlApi, arguments);
}
}
};
var owlProperties = [

@@ -107,6 +124,7 @@ //OPTIONS

},
controller: OwlController,
transclude: true,
template: '<div class="owl-carousel" data-ng-transclude></div>'
};
function link($scope, $element, $attr) {
function link($scope, $element, $attr, owlCtrl) {
var options = {},

@@ -156,4 +174,5 @@ initial = true,

owlCarousel = $element.find(owlCarouselClassName).owlCarousel(options);
owlCtrl.init(owlCarousel);
if (angular.isDefined($scope.owlReady)) {
$scope.owlReady({$api: owlCarousel});
$scope.owlReady({$api: owlCtrl.getApi()});
}

@@ -160,0 +179,0 @@ });

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc