Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
directive - vertically and horizontally positioned overlay container
JavaScript CSS
Branch: master
Failed to load latest commit information.
test/unit Testing
.eslintrc Testing
.gitignore Testing
.jscsrc Testing
.travis.yml Testing
LICENSE Initial commit
README.md add travis build status
angular-centered.css Create angular-centered.css
angular-centered.js Testing
bower.json Testing
karma.conf.js Testing
package.json Testing

README.md

angular-centered

Build Status

An angular directive for rendering a vertically and horizontally positioned overlay.

fiddle : http://jsfiddle.net/vCL9P/2/

bower : bower install angular-centered

npm : npm install angular-centered

<div ng-app="myApp">
  <centered>
    <h2>This text should be centered</h2>
  </centered>
</div>
.angular-center-container {
  position: fixed;
  top:0;
    left:0;
    height:100%;
    width:100%;
    display:table;
    pointer-events: none;
    z-index:9999;
}
.angular-centered {
    display: table-cell;
    vertical-align: middle;
    text-align: center;
}
angular.module("myApp", ["angular-centered"]);
Something went wrong with that request. Please try again.