alcoceba / ngcarouseldirective Goto Github PK
View Code? Open in Web Editor NEWA simple NativeScript + Angular 4 images carousel for iOS and Android
A simple NativeScript + Angular 4 images carousel for iOS and Android
Hi,
I tried to load image from local resource, but its not working. If i give url means its working perfectly.
FYI, My folder structure is as follows,
And my code is,
this.images = [ { title: 'Image 1', file: '~/res/logo.png' }, { title: 'Image 2', url:'https://unsplash.it/400/300/?image=870'} ];
Please suggest how to refer the image source from local res folder.
Regarding this issue, I have raised the topic on NS community forum thread
Thanks in advance.
I need swipe controls.
For use in NS 5 use long import
It would be great if it equipped with manual scroll by sliding the image
How to configure decodeWidth, decodeHeight and useCache properties for images?
Hi am getting below error when am using when am using carousel in nativescript 4 with angular 5 (ios)
[native code]: ERROR Error: StaticInjectorError(AppModule)[CarouselDirective -> ElementRef]:
StaticInjectorError(Platform: core)[CarouselDirective -> ElementRef]:
NullInjectorError: No provider for ElementRef!
I am getting this error
Project successfully created.
Executing before-prepare hook from /home/urvesh/Miscellaneous/Nativescript/Carousel/hooks/before-prepare/nativescript-dev-typescript.js
Found peer TypeScript 2.2.2
node_modules/nativescript-ng2-carousel/nativescript-ng2-carousel.directive.ts(102,9): error TS2322: Type 'string' is not assignable to type 'HorizontalAlignment'.
node_modules/nativescript-ng2-carousel/nativescript-ng2-carousel.directive.ts(103,60): error TS2339: Property 'auto' does not exist on type 'typeof GridUnitType'.
node_modules/nativescript-ng2-carousel/nativescript-ng2-carousel.directive.ts(104,63): error TS2339: Property 'star' does not exist on type 'typeof GridUnitType'.
node_modules/nativescript-ng2-carousel/nativescript-ng2-carousel.directive.ts(105,63): error TS2339: Property 'star' does not exist on type 'typeof GridUnitType'.
node_modules/nativescript-ng2-carousel/nativescript-ng2-carousel.directive.ts(125,60): error TS2339: Property 'auto' does not exist on type 'typeof GridUnitType'.
node_modules/nativescript-ng2-carousel/nativescript-ng2-carousel.directive.ts(126,13): error TS2322: Type 'string' is not assignable to type 'Visibility'.
node_modules/nativescript-ng2-carousel/nativescript-ng2-carousel.directive.ts(141,68): error TS2339: Property 'auto' does not exist on type 'typeof GridUnitType'.
node_modules/nativescript-ng2-carousel/nativescript-ng2-carousel.directive.ts(204,13): error TS2322: Type 'string' is not assignable to type 'HorizontalAlignment'.
node_modules/nativescript-ng2-carousel/nativescript-ng2-carousel.directive.ts(220,13): error TS2322: Type 'string' is not assignable to type 'HorizontalAlignment'.
node_modules/nativescript-ng2-carousel/nativescript-ng2-carousel.directive.ts(290,13): error TS2322: Type '"visible" | "collapsed"' is not assignable to type 'Visibility'.
Type '"collapsed"' is not assignable to type 'Visibility'.
Is there a way to bind a function in the component in order to handle an interaction event?
Android Build issue after upgrading Nativescript (tns --version = 4.0.0) and angular 5.2.0 versions
rg.nativescript.am2pro8/com.tns.NativeScriptActivity
System.err: java.lang.RuntimeException: Unable to create application com.tns.NativeScriptApplication: com.tns.NativeScriptException:
System.err:
System.err: Error calling module function
System.err:
System.err: Error calling module function
System.err:
System.err: Error calling module function
System.err:
System.err: Error: com.tns.NativeScriptException: Failed to find module: "./nativescript-ng2-carousel.directive", relative to: app/tns_modules/nativescript-ng2-carousel/
Im getting the following error when trying to swipe images in the carousel.
CONSOLE ERROR file:///app/tns_modules/nativescript-angular/zone-js/dist/zone-nativescript.js:569:26: Unhandled Promise rejection: Animation cancelled. ; Zone: <root> ; Task: null ; Value: Error: Animation cancelled. _rejectAnimationFinishedPromise@file:///app/tns_modules/tns-core-modules/ui/animation/animation-common.js:98:31 [<root>]
CONSOLE ERROR file:///app/tns_modules/nativescript-angular/zone-js/dist/zone-nativescript.js:571:22: Error: Uncaught (in promise): Error: Animation cancelled.
{
"nativescript": {
"tns-android": {
"version": "3.3.1"
},
"tns-ios": {
"version": "3.3.0"
}
},
"dependencies": {
"@angular/animations": "~4.4.1",
"@angular/common": "~4.4.1",
"@angular/compiler": "~4.4.1",
"@angular/core": "~4.4.1",
"@angular/forms": "~4.4.1",
"@angular/http": "~4.4.1",
"@angular/platform-browser": "~4.4.1",
"@angular/router": "~4.4.1",
"nativescript-angular": "^4.4.1",
"nativescript-couchbase": "^1.0.18",
"nativescript-loading-indicator": "^2.4.0",
"nativescript-ng2-carousel": "0.0.5",
"nativescript-purchase": "^1.0.5",
"nativescript-theme-core": "^1.0.4",
"nativescript-zip": "^1.3.2",
"reflect-metadata": "~0.1.8",
"rxjs": "~5.4.2",
"tns-core-modules": "^3.3.0",
"zone.js": "~0.8.2"
},
"devDependencies": {
"babel-traverse": "6.26.0",
"babel-types": "6.26.0",
"babylon": "6.18.0",
"lazy": "1.0.11",
"nativescript-dev-typescript": "~0.5.0",
"typescript": "~2.4.2"
}
}
Your package json file has several issues;
"nativescript": {
"platforms": {
"android": "3.0.0",
"ios": "3.0.0"
},
"plugin": {
"nan": "true",
"pan": "false",
"core3": "true",
"category": "Interface"
}
},
We are using this package in our app and our most recent push to iTunes was rejected because "the bundle at '/Payload//app/tns_modules/nativescript-ng2-carousel/demo/app/App_Resources/iOS/Info.plist' does not contain a bundle executable". Upon further investigation, we found that (1) the nativescript-ng2-carousel
directory in our node-modules
folder contained a demo
directory with app
files and that (2) there is a .npmignore
file, but it specifies specific files and folders within the demo
directory instead of excluding the demo
directory as a whole. We have not verified that deleting the demo
directory from the plugin in our node-modules
folder will solve our issue, but you may want to consider editing your .npmignore
file.
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.