
Getting started
Dependencies
This repository contains a set of native AngularJS directives based on Foundation's markup and CSS. As a result no dependency on jQuery or Foundation's JavaScript is required. The only required dependencies are:
- AngularJS 1.5 (tested with <%= ngversion %>)
- Foundation 6 CSS (tested with version <%= fdversion %>).
Downloading
Build files for all directives are distributed in several flavours: minified for production usage, un-minified for development, with or without templates. All the options are described and can be downloaded from here.
Installation
As soon as you've got all the files downloaded and included in your page you just need to declare
a dependency on the mm.foundation
module:
angular.module('myModule', ['mm.foundation']);
You can fork one of the plunkers from this page to see a working example of what is described here.
<%= module.displayName %> (mm.foundation.<%= module.name %>)
<%- module.docs.html %>
<%- module.docs.js %>
Animations
Animations are supported via ngAnimate. This can be used in conjuction with Zurb's MotionUI library.
$motion-ui-classes: (
chain: true,
prefix: 'ng-',
active: '-active',
);
@import 'motion-ui';
.tooltip {
@include mui-fade(
$state: in,
$duration: 0.25s,
$delay: 0s
);
}
.tooltip {
@include mui-fade(
$state: out,
$from: 1,
$to: 0,
$duration: 0.25s,
$delay: 0s
);
}
.reveal-overlay {
@include mui-fade($state: in);
}
.reveal-overlay {
@include mui-fade(
$state: out,
$from: 1,
$to: 0
);
}
.reveal {
@include mui-slide(
$state: in, // Specify in or out
$direction: down, // Can be top, right, bottom, or left
$fade: true, // If true, the element fades simultaneously
$duration: 0.25s,
$timing: cubic-bezier,
$delay: 0s
);
}
.reveal {
@include mui-zoom(
$state: out,
$from: 1,
$to: 0,
$duration: 0.25s
);
}