Nativescript + Angular Gradients
An Angular directive for adding Gradients to your Nativescript UI.
How To
- Install.
tns plugin add nativescript-ng-gradient
- In your App module.
;;;;@
- In your Component.
;;@public gColors = '#666666' '#eeeeee';public gType = TypesLINEAR_GRADIENT;public gOrient = OrientationLEFT_RIGHT;public gRadius = 0;
Properties
[nsgrad]
: Initiates the Directive with an optional value of an array of colors. Defaults to a gradient from black to white.
[nsgradType]
: Specifies the type of gradient to use. Defaults to Types.LINEAR_GRADIENT
[nsgradOrient]
: Specifies the Orientation of the gradient. Defaults to Orientation.LEFT_RIGHT
[nsgradRadius]
: Specifies the Radius of the gradient is any. Defaults to 0
(none);
Note
Still can't seem to get RADIAL_GRADIENT to work and this only supported on Android for now.
- Thats all. No dependencies.