Angular.Less
This directive allows you to add Less and PrefixFree on the fly support for your Angular application (example).
Requirements
- AngularJS 1.x or newer
- Less.JS 1.x or newer
- PrefixFree An optional but recommended
Install
You can install this package either with npm or with bower.
npm
npm install angular.less
Add the Angular.Less module as a dependency to your application module:
var myAppModule = angular;
bower
bower install angular.less
This will copy the Angular.Less files into a bower_components
folder,
along with its dependencies. Load the script files in your application (index.html
):
Add the Angular.Less module as a dependency to your application module:
var myAppModule = angular;
Usage
Now you can use the power of Less CSS preprocessor in your application
by using default HTML tag link
.
To start off, link your .less
stylesheets with the rel attribute set to "stylesheet/less"
:
Visit plugin example page to see how it works.