especializa / nativescript-ng-shadow Goto Github PK
View Code? Open in Web Editor NEWAngular directive to apply shadows to native elements according to the elevation level guidelines of material design specification
License: Apache License 2.0
Angular directive to apply shadows to native elements according to the elevation level guidelines of material design specification
License: Apache License 2.0
Hello there,
I'm just wondering whether or not this plugin works on Button element? I tried to change around in your demo by changing the Label to Button tag; however, the shadow seems couldn't hold. Please advice.
Thanks.
LH
Hi,
I'm not able to use shadow when inside of a RadListView and ng-template. Always throw that error..
Any workaround?
Thanks
iOS emulator
<SwipeLayout class="card-container"
*ngFor="let card of cards"
(loaded)="swipeLayoutLoaded($event)"
(swipeLeft)="swipeLeftCallback($event)"
(swipeRight)="swipeRightCallback($event)"
[animationState]="swipeLayoutAnimated"
[gestureMode]="gestureMode">
<StackLayout width="85%" height="80%" shadow="2">
<Label></Label>
</StackLayout>
</SwipeLayout>
basically I wish to have both shadow and border radius on StackLayout. Yet, since they don't work together, I just wondering is there any workarounds?
Download this repository.
Go to demo folder
Run npm install
Run tns run ios
There is a typescript error that says it cannot find nativescript-ng-shadow package in import statement.
Please, ensure your title is less than 63 characters long and starts with a capital
letter.
tns --version
to fetch it)node_modules/tns-core-modules/package.json
file in your project)"tns-android"
and "tns-ios"
properties in the package.json
file of your project)package.json
file of yourDescribe the steps to reproduce it.
Please, ensure your title is less than 63 characters long and starts with a capital
letter.
{
"dependencies": {
"@angular/animations": "6.1.10",
"@angular/common": "6.1.10",
"@angular/compiler": "6.1.10",
"@angular/core": "6.1.10",
"@angular/forms": "6.1.10",
"@angular/http": "6.1.10",
"@angular/platform-browser": "6.1.10",
"@angular/platform-browser-dynamic": "6.1.10",
"@angular/router": "6.1.10",
"@progress-nativechat/nativescript-nativechat": "2.0.3",
"kinvey-nativescript-sdk": "3.11.6",
"nativescript-accelerometer": "2.0.1",
"nativescript-angular": "6.2.0",
"nativescript-background-http": "3.3.0",
"nativescript-camera": "4.0.3",
"nativescript-fresco": "5.1.0",
"nativescript-geolocation": "4.3.1",
"nativescript-imagepicker": "6.0.4",
"nativescript-intl": "3.0.0",
"nativescript-iqkeyboardmanager": "1.3.0",
"nativescript-ng-shadow": "^2.1.0",
"nativescript-social-share": "1.5.1",
"nativescript-theme-core": "1.0.4",
"nativescript-ui-autocomplete": "3.10.1",
"nativescript-ui-calendar": "3.9.0",
"nativescript-ui-chart": "3.9.1",
"nativescript-ui-dataform": "3.7.4",
"nativescript-ui-gauge": "3.7.1",
"nativescript-ui-listview": "3.7.2",
"nativescript-ui-sidedrawer": "5.0.0",
"reflect-metadata": "0.1.12",
"rxjs": "6.2.2",
"tns-core-modules": "5.0.1",
"zone.js": "0.8.26"
},
"devDependencies": {
"babel-traverse": "6.26.0",
"babel-types": "6.26.0",
"babylon": "6.18.0",
"codelyzer": "^4.5.0",
"lazy": "1.0.11",
"nativescript-dev-typescript": "0.7.2",
"tns-platform-declarations": "4.2.0",
"typescript": "~2.7.2"
}
}
Describe the steps to reproduce it.
I'm using the files from the {N} Angular Tutorial and added this plugin like it is described in the README.
When I now start my application with the plugin loaded in my app.module.ts it is showing me the following error:
Start syncing changes for platform ios.
Skipping prepare.
Successfully synced changes for platform ios.
LOG from device iPhone: 2018-11-13 21:38:59.090 nsplaydev[4164:1757408] ***** Fatal JavaScript exception - application has been terminated. *****
2018-11-13 21:38:59.091 nsplaydev[4164:1757408] Native stack trace:
1 0x104887f84 NativeScript::reportFatalErrorBeforeShutdown(JSC::ExecState*, JSC::Exception*, bool, bool)
2 0x1048c06bc -[TNSRuntime executeModule:referredBy:]
3 0x104614154 -[UIApplication(PlayLiveSync) swizzled_executeModule:]
4 0x10409b4f4
5 0x21ed06bb4 <redacted>
2018-11-13 21:38:59.092 nsplaydev[4164:1757408] JavaScript stack trace:
2018-11-13 21:38:59.092 nsplaydev[4164:1757408] 1 require@file:///app/app.module.js:9:39
2 anonymous@file:///app/app.module.js:9:39
3 evaluate@[native code]
4 moduleEvaluation@[native code]
5 promiseReactionJob@[native code]
6 require@[native code]
7 anonymous@file:///app/main.js:6:27
8 evaluate@[native code]
9 moduleEvaluation@[native code]
10 promiseReactionJob@[native code]
2018-11-13 21:38:59.092 nsplaydev[4164:1757408] JavaScript error:
file:///app/app.module.js:9:39: JS ERROR Error: Could not find module 'nativescript-ng-shadow'. Computed path '/var/mobile/Containers/Data/Application/D0C52803-CC7E-486B-BA79-0C6C062291E1/Documents/Playground/LiveSync/app/tns_modules/nativescript-ng-shadow'.
2018-11-13 21:38:59.093 nsplaydev[4164:1757408] PlayLiveSync: Uncaught Exception
2018-11-13 21:38:59.094 nsplaydev[4164:1757408] *** JavaScript call stack:
(
)
2018-11-13 21:38:59.094 nsplaydev[4164:1757408] *** Terminating app due to uncaught exception 'NativeScript encountered a fatal error: Error: Could not find module 'nativescript-ng-shadow'. Computed path '/var/mobile/Containers/Data/Application/D0C52803-CC7E-486B-BA79-0C6C062291E1/Documents/Playground/LiveSync/app/tns_modules/nativescript-ng-shadow'.
at
1 require@file:///app/app.module.js:9:39
2 anonymous@file:///app/app.module.js:9:39
3 evaluate@[native code]
4 moduleEvaluation@[native code]
5 promiseReactionJob@[native code]
6 require@[native code]
7 anonymous@file:///app/main.js:6:27
8 evaluate@[native code]
9 moduleEvaluation@[native code]
10 promiseReactionJob@[native code]
', reason: '(null)'
*** First throw call stack:
(0x21f2bbea0 0x21e48da40 0x1048882d4 0x1048c06bc 0x104614154 0x10409b4f4 0x21ed06bb4)
libc++abi.dylib: terminating with uncaught exception of type NSException
2018-11-13 21:38:59.094 nsplaydev[4164:1757408] PlayLiveSync: Uncaught Exception
System.err: java.lang.RuntimeException: Unable to create application com.tns.NativeScriptApplication: com.tns.NativeScriptException:
System.err: Error calling module function
System.err: Error calling module function
System.err: Error calling module function
System.err: Error calling module function
System.err: Error: com.tns.NativeScriptException: Failed to find module: "nativescript-ng-shadow", relative to: app/tns_modules/
System.err: com.tns.Module.resolvePathHelper(Module.java:146)
System.err: com.tns.Module.resolvePath(Module.java:55)
System.err: com.tns.Runtime.runModule(Native Method)
System.err: com.tns.Runtime.runModule(Runtime.java:543)
System.err: com.tns.Runtime.run(Runtime.java:535)
System.err: com.tns.NativeScriptApplication.onCreate(NativeScriptApplication.java:21)
System.err: android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1018)
System.err: android.app.ActivityThread.handleBindApplication(ActivityThread.java:4959)
System.err: android.app.ActivityThread.-wrap1(ActivityThread.java)
System.err: android.app.ActivityThread$H.handleMessage(ActivityThread.java:1549)
System.err: android.os.Handler.dispatchMessage(Handler.java:111)
System.err: android.os.Looper.loop(Looper.java:207)
System.err: android.app.ActivityThread.main(ActivityThread.java:5728)
System.err: java.lang.reflect.Method.invoke(Native Method)
System.err: com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
System.err: com.android.internal.os.ZygoteInit.main(ZygoteInit.java:679)
System.err: File: ", line: 1, column: 265
System.err: StackTrace:
System.err: Frame: function:'require', file:'', line: 1, column: 266
System.err: Frame: function:'', file:'file:///data/data/org.nativescript.goshaedurood/files/app/dashboard-content/dashboard-content.component.js', line: 5, column: 32
System.err: Frame: function:'require', file:'', line: 1, column: 266
System.err: Frame: function:'', file:'file:///data/data/org.nativescript.goshaedurood/files/app/app.routing.js', line: 11, column: 37
System.err: Frame: function:'require', file:'', line: 1, column: 266
System.err: Frame: function:'', file:'file:///data/data/org.nativescript.goshaedurood/files/app/app.module.js', line: 5, column: 21
System.err: Frame: function:'require', file:'', line: 1, column: 266
System.err: Frame: function:'', file:'file:///data/data/org.nativescript.goshaedurood/files/app/main.js', line: 5, column: 20
System.err: Frame: function:'require', file:'', line: 1, column: 266
System.err: Error: com.tns.NativeScriptException: Failed to find module: "nativescript-ng-shadow", relative to: app/tns_modules/
System.err: com.tns.Module.resolvePathHelper(Module.java:146)
System.err: com.tns.Module.resolvePath(Module.java:55)
System.err: com.tns.Runtime.runModule(Native Method)
System.err: com.tns.Runtime.runModule(Runtime.java:543)
System.err: com.tns.Runtime.run(Runtime.java:535)
System.err: com.tns.NativeScriptApplication.onCreate(NativeScriptApplication.java:21)
System.err: android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1018)
System.err: android.app.ActivityThread.handleBindApplication(ActivityThread.java:4959)
System.err: android.app.ActivityThread.-wrap1(ActivityThread.java)
System.err: android.app.ActivityThread$H.handleMessage(ActivityThread.java:1549)
System.err: android.os.Handler.dispatchMessage(Handler.java:111)
System.err: android.os.Looper.loop(Looper.java:207)
System.err: android.app.ActivityThread.main(ActivityThread.java:5728)
System.err: java.lang.reflect.Method.invoke(Native Method)
System.err: com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
System.err: com.android.internal.os.ZygoteInit.main(ZygoteInit.java:679)
System.err: File: ", line: 1, column: 265
System.err: StackTrace:
System.err: Frame: function:'require', file:'', line: 1, column: 266
System.err: Frame: function:'', file:'file:///data/data/org.nativescript.goshaedurood/files/app/dashboard-content/dashboard-content.component.js', line: 5, column: 32
System.err: Frame: function:'require', file:'', line: 1, column: 266
System.err: Frame: function:'', file:'file:///data/data/org.nativescript.goshaedurood/files/app/app.routing.js', line: 11, column: 37
System.err: Frame: function:'require', file:'', line: 1, column: 266
System.err: Frame: function:'', file:'file:///data/data/org.nativescript.goshaedurood/files/app/app.module.js', line: 5, column: 21
System.err: Frame: function:'require', file:'', line: 1, column: 266
System.err: Frame: function:'', file:'file:///data/data/org.nativescript.goshaedurood/files/app/main.js', line: 5, column: 20
System.err: Frame: function:'require', file:'', line: 1, column: 266
System.err: Error: com.tns.NativeScriptException: Failed to find module: "nativescript-ng-shadow", relative to: app/tns_modules/
System.err: com.tns.Module.resolvePathHelper(Module.java:146)
System.err: com.tns.Module.resolvePath(Module.java:55)
System.err: com.tns.Runtime.runModule(Native Method)
System.err: com.tns.Runtime.runModule(Runtime.java:543)
System.err: com.tns.Runtime.run(Runtime.java:535)
System.err: com.tns.NativeScriptApplication.onCreate(NativeScriptApplication.java:21)
System.err: android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1018)
System.err: android.app.ActivityThread.handleBindApplication(ActivityThread.java:4959)
System.err: android.app.ActivityThread.-wrap1(ActivityThread.java)
System.err: android.app.ActivityThread$H.handleMessage(ActivityThread.java:1549)
System.err: android.os.Handler.dispatchMessage(Handler.java:111)
System.err: android.os.Looper.loop(Looper.java:207)
System.err: android.app.ActivityThread.main(ActivityThread.java:5728)
System.err: java.lang.reflect.Method.invoke(Native Method)
System.err: com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
System.err: com.android.internal.os.ZygoteInit.main(ZygoteInit.java:679)
System.err: File: ", line: 1, column: 265
System.err: StackTrace:
System.err: Frame: function:'require', file:'', line: 1, column: 266
System.err: Frame: function:'', file:'file:///data/data/org.nativescript.goshaedurood/files/app/dashboard-content/dashboard-content.component.js', line: 5, column: 32
System.err: Frame: function:'require', file:'', line: 1, column: 266
System.err: Frame: function:'', file:'file:///data/data/org.nativescript.goshaedurood/files/app/app.routing.js', line: 11, column: 37
System.err: Frame: function:'require', file:'', line: 1, column: 266
System.err: Frame: function:'', file:'file:///data/data/org.nativescript.goshaedurood/files/app/app.module.js', line: 5, column: 21
System.err: Frame: function:'require', file:'', line: 1, column: 266
System.err: Frame: function:'', file:'file:///data/data/org.nativescript.goshaedurood/files/app/main.js', line: 5, column: 20
System.err: Frame: function:'require', file:'', line: 1, column: 266
System.err: Error: com.tns.NativeScriptException: Failed to find module: "nativescript-ng-shadow", relative to: app/tns_modules/
System.err: com.tns.Module.resolvePathHelper(Module.java:146)
System.err: com.tns.Module.resolvePath(Module.java:55)
System.err: com.tns.Runtime.runModule(Native Method)
System.err: com.tns.Runtime.runModule(Runtime.java:543)
System.err: com.tns.Runtime.run(Runtime.java:535)
System.err: com.tns.NativeScriptApplication.onCreate(NativeScriptApplication.java:21)
System.err: android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1018)
System.err: android.app.ActivityThread.handleBindApplication(ActivityThread.java:4959)
System.err: android.app.ActivityThread.-wrap1(ActivityThread.java)
System.err: android.app.ActivityThread$H.handleMessage(ActivityThread.java:1549)
System.err: android.os.Handler.dispatchMessage(Handler.java:111)
System.err: android.os.Looper.loop(Looper.java:207)
System.err: android.app.ActivityThread.main(ActivityThread.java:5728)
System.err: java.lang.reflect.Method.invoke(Native Method)
System.err: com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
System.err: com.android.internal.os.ZygoteInit.main(ZygoteInit.java:679)
System.err: File: ", line: 1, column: 265
System.err: StackTrace:
System.err: Frame: function:'require', file:'', line: 1, column: 266
System.err: Frame: function:'', file:'file:///data/data/org.nativescript.goshaedurood/files/app/dashboard-content/dashboard-content.component.js', line: 5, column: 32
System.err: Frame: function:'require', file:'', line: 1, column: 266
System.err: Frame: function:'', file:'file:///data/data/org.nativescript.goshaedurood/files/app/app.routing.js', line: 11, column: 37
System.err: Frame: function:'require', file:'', line: 1, column: 266
System.err: Frame: function:'', file:'file:///data/data/org.nativescript.goshaedurood/files/app/app.module.js', line: 5, column: 21
System.err: Frame: function:'require', file:'', line: 1, column: 266
System.err: Frame: function:'', file:'file:///data/data/org.nativescript.goshaedurood/files/app/main.js', line: 5, column: 20
System.err: Frame: function:'require', file:'', line: 1, column: 266
System.err: Error: com.tns.NativeScriptException: Failed to find module: "nativescript-ng-shadow", relative to: app/tns_modules/
System.err: com.tns.Module.resolvePathHelper(Module.java:146)
System.err: com.tns.Module.resolvePath(Module.java:55)
System.err: com.tns.Runtime.runModule(Native Method)
System.err: com.tns.Runtime.runModule(Runtime.java:543)
System.err: com.tns.Runtime.run(Runtime.java:535)
System.err: com.tns.NativeScriptApplication.onCreate(NativeScriptApplication.java:21)
System.err: android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1018)
System.err: android.app.ActivityThread.handleBindApplication(ActivityThread.java:4959)
System.err: android.app.ActivityThread.-wrap1(ActivityThread.java)
System.err: android.app.ActivityThread$H.handleMessage(ActivityThread.java:1549)
System.err: android.os.Handler.dispatchMessage(Handler.java:111)
System.err: android.os.Looper.loop(Looper.java:207)
System.err: android.app.ActivityThread.main(ActivityThread.java:5728)
System.err: java.lang.reflect.Method.invoke(Native Method)
System.err: com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
System.err: com.android.internal.os.ZygoteInit.main(ZygoteInit.java:679)
System.err: File: ", line: 1, column: 265
System.err: StackTrace:
System.err: Frame: function:'require', file:'', line: 1, column: 266
System.err: Frame: function:'', file:'file:///data/data/org.nativescript.goshaedurood/files/app/dashboard-content/dashboard-content.component.js', line: 5, column: 32
System.err: Frame: function:'require', file:'', line: 1, column: 266
System.err: Frame: function:'', file:'file:///data/data/org.nativescript.goshaedurood/files/app/app.routing.js', line: 11, column: 37
System.err: Frame: function:'require', file:'', line: 1, column: 266
System.err: Frame: function:'', file:'file:///data/data/org.nativescript.goshaedurood/files/app/app.module.js', line: 5, column: 21
System.err: Frame: function:'require', file:'', line: 1, column: 266
System.err: Frame: function:'', file:'file:///data/data/org.nativescript.goshaedurood/files/app/main.js', line: 5, column: 20
System.err: Frame: function:'require', file:'', line: 1, column: 266
System.err: at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4962)
System.err: at android.app.ActivityThread.-wrap1(ActivityThread.java)
System.err: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1549)
System.err: at android.os.Handler.dispatchMessage(Handler.java:111)
System.err: at android.os.Looper.loop(Looper.java:207)
System.err: at android.app.ActivityThread.main(ActivityThread.java:5728)
System.err: at java.lang.reflect.Method.invoke(Native Method)
System.err: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:679)
System.err: Caused by: com.tns.NativeScriptException:
System.err: Error calling module function
System.err: Error calling module function
System.err: Error calling module function
System.err: Error calling module function
System.err: Error: com.tns.NativeScriptException: Failed to find module: "nativescript-ng-shadow", relative to: app/tns_modules/
System.err: com.tns.Module.resolvePathHelper(Module.java:146)
System.err: com.tns.Module.resolvePath(Module.java:55)
System.err: com.tns.Runtime.runModule(Native Method)
System.err: com.tns.Runtime.runModule(Runtime.java:543)
System.err: com.tns.Runtime.run(Runtime.java:535)
System.err: com.tns.NativeScriptApplication.onCreate(NativeScriptApplication.java:21)
System.err: android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1018)
System.err: android.app.ActivityThread.handleBindApplication(ActivityThread.java:4959)
System.err: android.app.ActivityThread.-wrap1(ActivityThread.java)
System.err: android.app.ActivityThread$H.handleMessage(ActivityThread.java:1549)
System.err: android.os.Handler.dispatchMessage(Handler.java:111)
System.err: android.os.Looper.loop(Looper.java:207)
System.err: android.app.ActivityThread.main(ActivityThread.java:5728)
System.err: java.lang.reflect.Method.invoke(Native Method)
System.err: com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
System.err: com.android.internal.os.ZygoteInit.main(ZygoteInit.java:679)
System.err: File: ", line: 1, column: 265
System.err: StackTrace:
System.err: Frame: function:'require', file:'', line: 1, column: 266
System.err: Frame: function:'', file:'file:///data/data/org.nativescript.goshaedurood/files/app/dashboard-content/dashboard-content.component.js', line: 5, column: 32
System.err: Frame: function:'require', file:'', line: 1, column: 266
System.err: Frame: function:'', file:'file:///data/data/org.nativescript.goshaedurood/files/app/app.routing.js', line: 11, column: 37
System.err: Frame: function:'require', file:'', line: 1, column: 266
System.err: Frame: function:'', file:'file:///data/data/org.nativescript.goshaedurood/files/app/app.module.js', line: 5, column: 21
System.err: Frame: function:'require', file:'', line: 1, column: 266
System.err: Frame: function:'', file:'file:///data/data/org.nativescript.goshaedurood/files/app/main.js', line: 5, column: 20
System.err: Frame: function:'require', file:'', line: 1, column: 266
System.err: Error: com.tns.NativeScriptException: Failed to find module: "nativescript-ng-shadow", relative to: app/tns_modules/
System.err: com.tns.Module.resolvePathHelper(Module.java:146)
System.err: com.tns.Module.resolvePath(Module.java:55)
System.err: com.tns.Runtime.runModule(Native Method)
System.err: com.tns.Runtime.runModule(Runtime.java:543)
System.err: com.tns.Runtime.run(Runtime.java:535)
System.err: com.tns.NativeScriptApplication.onCreate(NativeScriptApplication.java:21)
System.err: android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1018)
System.err: android.app.ActivityThread.handleBindApplication(ActivityThread.java:4959)
System.err: android.app.ActivityThread.-wrap1(ActivityThread.java)
System.err: android.app.ActivityThread$H.handleMessage(ActivityThread.java:1549)
System.err: android.os.Handler.dispatchMessage(Handler.java:111)
System.err: android.os.Looper.loop(Looper.java:207)
System.err: android.app.ActivityThread.main(ActivityThread.java:5728)
System.err: java.lang.reflect.Method.invoke(Native Method)
System.err: com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
System.err: com.android.internal.os.ZygoteInit.main(ZygoteInit.java:679)
System.err: File: ", line: 1, column: 265
System.err: StackTrace:
System.err: Frame: function:'require', file:'', line: 1, column: 266
System.err: Frame: function:'', file:'file:///data/data/org.nativescript.goshaedurood/files/app/dashboard-content/dashboard-content.component.js', line: 5, column: 32
System.err: Frame: function:'require', file:'', line: 1, column: 266
System.err: Frame: function:'', file:'file:///data/data/org.nativescript.goshaedurood/files/app/app.routing.js', line: 11, column: 37
System.err: Frame: function:'require', file:'', line: 1, column: 266
System.err: Frame: function:'', file:'file:///data/data/org.nativescript.goshaedurood/files/app/app.module.js', line: 5, column: 21
System.err: Frame: function:'require', file:'', line: 1, column: 266
System.err: Frame: function:'', file:'file:///data/data/org.nativescript.goshaedurood/files/app/main.js', line: 5, column: 20
System.err: Frame: function:'require', file:'', line: 1, column: 266
System.err: Error: com.tns.NativeScriptException: Failed to find module: "nativescript-ng-shadow", relative to: app/tns_modules/
System.err: com.tns.Module.resolvePathHelper(Module.java:146)
System.err: com.tns.Module.resolvePath(Module.java:55)
System.err: com.tns.Runtime.runModule(Native Method)
System.err: com.tns.Runtime.runModule(Runtime.java:543)
System.err: com.tns.Runtime.run(Runtime.java:535)
System.err: com.tns.NativeScriptApplication.onCreate(NativeScriptApplication.java:21)
System.err: android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1018)
System.err: android.app.ActivityThread.handleBindApplication(ActivityThread.java:4959)
System.err: android.app.ActivityThread.-wrap1(ActivityThread.java)
System.err: android.app.ActivityThread$H.handleMessage(ActivityThread.java:1549)
System.err: android.os.Handler.dispatchMessage(Handler.java:111)
System.err: android.os.Looper.loop(Looper.java:207)
System.err: android.app.ActivityThread.main(ActivityThread.java:5728)
System.err: java.lang.reflect.Method.invoke(Native Method)
System.err: com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
System.err: com.android.internal.os.ZygoteInit.main(ZygoteInit.java:679)
System.err: File: ", line: 1, column: 265
System.err: StackTrace:
System.err: Frame: function:'require', file:'', line: 1, column: 266
System.err: Frame: function:'', file:'file:///data/data/org.nativescript.goshaedurood/files/app/dashboard-content/dashboard-content.component.js', line: 5, column: 32
System.err: Frame: function:'require', file:'', line: 1, column: 266
System.err: Frame: function:'', file:'file:///data/data/org.nativescript.goshaedurood/files/app/app.routing.js', line: 11, column: 37
System.err: Frame: function:'require', file:'', line: 1, column: 266
System.err: Frame: function:'', file:'file:///data/data/org.nativescript.goshaedurood/files/app/app.module.js', line: 5, column: 21
System.err: Frame: function:'require', file:'', line: 1, column: 266
System.err: Frame: function:'', file:'file:///data/data/org.nativescript.goshaedurood/files/app/main.js', line: 5, column: 20
System.err: Frame: function:'require', file:'', line: 1, column: 266
System.err: Error: com.tns.NativeScriptException: Failed to find module: "nativescript-ng-shadow", relative to: app/tns_modules/
System.err: com.tns.Module.resolvePathHelper(Module.java:146)
System.err: com.tns.Module.resolvePath(Module.java:55)
System.err: com.tns.Runtime.runModule(Native Method)
System.err: com.tns.Runtime.runModule(Runtime.java:543)
System.err: com.tns.Runtime.run(Runtime.java:535)
System.err: com.tns.NativeScriptApplication.onCreate(NativeScriptApplication.java:21)
System.err: android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1018)
System.err: android.app.ActivityThread.handleBindApplication(ActivityThread.java:4959)
System.err: android.app.ActivityThread.-wrap1(ActivityThread.java)
System.err: android.app.ActivityThread$H.handleMessage(ActivityThread.java:1549)
System.err: android.os.Handler.dispatchMessage(Handler.java:111)
System.err: android.os.Looper.loop(Looper.java:207)
System.err: android.app.ActivityThread.main(ActivityThread.java:5728)
System.err: java.lang.reflect.Method.invoke(Native Method)
System.err: com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
System.err: com.android.internal.os.ZygoteInit.main(ZygoteInit.java:679)
System.err: File: ", line: 1, column: 265
System.err: StackTrace:
System.err: Frame: function:'require', file:'', line: 1, column: 266
System.err: Frame: function:'', file:'file:///data/data/org.nativescript.goshaedurood/files/app/dashboard-content/dashboard-content.component.js', line: 5, column: 32
System.err: Frame: function:'require', file:'', line: 1, column: 266
System.err: Frame: function:'', file:'file:///data/data/org.nativescript.goshaedurood/files/app/app.routing.js', line: 11, column: 37
System.err: Frame: function:'require', file:'', line: 1, column: 266
System.err: Frame: function:'', file:'file:///data/data/org.nativescript.goshaedurood/files/app/app.module.js', line: 5, column: 21
System.err: Frame: function:'require', file:'', line: 1, column: 266
System.err: Frame: function:'', file:'file:///data/data/org.nativescript.goshaedurood/files/app/main.js', line: 5, column: 20
System.err: Frame: function:'require', file:'', line: 1, column: 266
System.err: Error: com.tns.NativeScriptException: Failed to find module: "nativescript-ng-shadow", relative to: app/tns_modules/
System.err: com.tns.Module.resolvePathHelper(Module.java:146)
System.err: com.tns.Module.resolvePath(Module.java:55)
System.err: com.tns.Runtime.runModule(Native Method)
System.err: com.tns.Runtime.runModule(Runtime.java:543)
System.err: com.tns.Runtime.run(Runtime.java:535)
System.err: com.tns.NativeScriptApplication.onCreate(NativeScriptApplication.java:21)
System.err: android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1018)
System.err: android.app.ActivityThread.handleBindApplication(ActivityThread.java:4959)
System.err: android.app.ActivityThread.-wrap1(ActivityThread.java)
System.err: android.app.ActivityThread$H.handleMessage(ActivityThread.java:1549)
System.err: android.os.Handler.dispatchMessage(Handler.java:111)
System.err: android.os.Looper.loop(Looper.java:207)
System.err: android.app.ActivityThread.main(ActivityThread.java:5728)
System.err: java.lang.reflect.Method.invoke(Native Method)
System.err: com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
System.err: com.android.internal.os.ZygoteInit.main(ZygoteInit.java:679)
System.err: File: ", line: 1, column: 265
System.err: StackTrace:
System.err: Frame: function:'require', file:'', line: 1, column: 266
System.err: Frame: function:'', file:'file:///data/data/org.nativescript.goshaedurood/files/app/dashboard-content/dashboard-content.component.js', line: 5, column: 32
System.err: Frame: function:'require', file:'', line: 1, column: 266
System.err: Frame: function:'', file:'file:///data/data/org.nativescript.goshaedurood/files/app/app.routing.js', line: 11, column: 37
System.err: Frame: function:'require', file:'', line: 1, column: 266
System.err: Frame: function:'', file:'file:///data/data/org.nativescript.goshaedurood/files/app/app.module.js', line: 5, column: 21
System.err: Frame: function:'require', file:'', line: 1, column: 266
System.err: Frame: function:'', file:'file:///data/data/org.nativescript.goshaedurood/files/app/main.js', line: 5, column: 20
System.err: Frame: function:'require', file:'', line: 1, column: 266
System.err: at com.tns.Runtime.runModule(Native Method)
System.err: at com.tns.Runtime.runModule(Runtime.java:543)
System.err: at com.tns.Runtime.run(Runtime.java:535)
System.err: at com.tns.NativeScriptApplication.onCreate(NativeScriptApplication.java:21)
System.err: at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1018)
System.err: at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4959)
System.err: ... 8 more
ActivityManager: Process org.nativescript.goshaedurood (pid 32243) has died
ActivityManager: SVC-handleAppDiedLocked: app = ProcessRecord{c09dc8a 32243:org.nativescript.goshaedurood/u0a955}, app.pid = 32243
Hello,
Is it possible to disable the Tab View shadow?
I tried shadow=""
and elevation="0"
, both don't seem to work.
It can be very helpful if we can set shadow offset (positive/negative) in android platform.
It doesn't build
No shadows on iOS. I set the shadow with shadow="2"
in xml file.
Hi guys,
I'm getting the following alerts from the console with TypeScript 2.2.2. I'm using the https://github.com/TeamMaestro/angular-native-seed
Found peer TypeScript 2.2.2
2 RECTANGLE = "RECTANGLE",
~~~~~~~~~~~
node_modules/nativescript-ng-shadow/common/shape.enum.d.ts(2,17): error TS1066: In ambient enum declarations member initializer must be constant expression.
3 OVAL = "OVAL",
~~~~~~
node_modules/nativescript-ng-shadow/common/shape.enum.d.ts(3,12): error TS1066: In ambient enum declarations member initializer must be constant expression.
4 RING = "RING",
~~~~~~
node_modules/nativescript-ng-shadow/common/shape.enum.d.ts(4,12): error TS1066: In ambient enum declarations member initializer must be constant expression.
5 LINE = "LINE",
~~~~~~
node_modules/nativescript-ng-shadow/common/shape.enum.d.ts(5,12): error TS1066: In ambient enum declarations member initializer must be constant expression.
Thanks in advance
it is possible to use the shadows in layouts ? , to do squares highlighted. Algomo as in the image.
https://drive.google.com/file/d/1XLcvTzQLKqai2COd6lgJ8TbHeJD0Bsbi/view?usp=sharing
Are there any plans to update this plugin to support NativeScript 7?
This is more of a question about the implementation. On Android, the background is set to a GradientDrawable with color and corner (https://github.com/Especializa/nativescript-ng-shadow/blob/master/src/common/shadow.ts#L52). Why is this done?
It seems most of the shadow code is in the elevation bit, and this is serving only to remove the CSS background. Am I missing something?
I notice that the demo app doesn't show the use of binding to an IOSData object.
Is this supposed to work?
I can set the properties individually in my html but not from an IOSData object in the component .ts file.
Thanks
Currently it appears that the cornerRadius
property on android uses pixels to calculate the shadow. It would be great if it used DIPs instead so that it is easier to get pixel perfect matching of shadows when combined with an inner layout with border-radius while also supporting multiple screen resolutions and sizes.
Hi, all the demo examples here use this with <Label>
...
I'm trying to add shadows to NativeScript 's, is this supported?
It doesn't seem to have any effect...๐ค
`ERROR in Unexpected value 'NgShadowModule in /node_modules/nativescript-ng-shadow/angular/ng-shadow.module.d.ts' imported by the module 'AppModule in app/app.module.ts'. Please add a @NgModule annotation.
ERROR in ./main.aot.ts
Module not found: Error: Can't resolve './app.module.ngfactory' in '...App\app'
@ ./main.aot.ts 5:29-62
Hi!
Awesome plugin, found the directive extremely useful, so first of all, thank you!
Anyway, I did have to use *ngIf to hide a view with a shadow on phones running android with APIs lower than 21 (LOLLIPOP) since the method View.setElevation() was not added until that update. Think it would be nice if you could add that validation to the directive before it sets the elevation...
To recreate the issue just run any app using the directive on an Android phone running Android 4.4 or lower (API 21 is implemented on Android 5.0)
Hi,
I use this Nativescript plugin, it's very a good job, congratulations. But the fix of the problem mentioned here : #12 for this error : ERROR Error: java.lang.NoSuchFieldError: no static field with name='LOLLIPOP' signature='I' in class Landroid/os/Build$VERSION_CODES;
is not available with the npm package.
The documentation says you can pass null
or an empty string to the shadow directive to remove the shadow. I'm dynamically passing a number value or null depending on the platform with this method:
public iosShadow(level: string): number {
if (this.platform === 'ios') {
return Number(level);
}
return null;
}
And view:
<StackLayout [shadow]="iosShadow(2)">
...
</StackLayout>
Though I always get this error when passing null: Cannot read property 'elevation' of null
Please, make shadow-plugin for Nativescript via pure JS.
I'm currently trying to implement this plugin in an existing app, but I don't get any shadows on my android development phone. Do you have any direction on where i should start debugging?
I included the module in my app.module.ts, then i added a Label with a shadow property. Did i forget anything?
package.json
file of your "@angular/animations": "~4.2.5",
"@angular/common": "~4.2.5",
"@angular/compiler": "~4.2.5",
"@angular/core": "~4.2.5",
"@angular/forms": "~4.2.5",
"@angular/http": "~4.2.5",
"@angular/platform-browser": "~4.2.5",
"@angular/router": "~4.2.5",
"nativescript-angular": "~4.2.0",
"@angular/compiler-cli": "~4.2.5",
"@ngtools/webpack": "~1.6.0",
"babel-traverse": "6.26.0",
"babel-types": "6.26.0",
"babylon": "6.18.0",
"copy-webpack-plugin": "~4.0.1",
"extract-text-webpack-plugin": "~3.0.0",
"lazy": "1.0.11",
"nativescript-css-loader": "~0.26.0",
"nativescript-dev-typescript": "~0.5.1",
"nativescript-dev-webpack": "^0.8.0",
"nativescript-worker-loader": "~0.8.1",
"raw-loader": "~0.5.1",
"resolve-url-loader": "~2.1.0",
"typescript": "^2.5.3",
"webpack": "~3.2.0",
"webpack-bundle-analyzer": "^2.8.2",
"webpack-sources": "~1.0.1"
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.