Aphrodite
Angular-Aphrodite: Angular bindings forInstallation
npm install --save angular aphrodite angular-aphrodite
Usage
You can use the binding to Aphrodite via a ng-class
filter, or as a css
attribute directive.
Considering an Aphrodite StyleSheet that looks like this:
$scopestyles = StyleSheet;
ng-class | css
filter
This is red.This is blue and small.
css
attribute directive
This is red.This is blue and small.
Template Style Definitions
Alternatively, you can define the styles in the template instead of the JavaScript. If you choose to do it this way, you must use JSON syntax:
{ "red": { "backgroundColor": "red" } } red stuffred stuff
CommonJS Bootstrapping
JS:
;;; var styles = StyleSheet; angular;
UMD Bootstrapping
HTML:
JS:
var styles = aphroditeStyleSheet; angular;