Coder Social home page Coder Social logo

envoc.directives's Introduction

Travis Status ย  NuGet Version

Envoc Directives

This is going to be a home for a common set of AngularJS directives that can be reused throught projects.

Prefix all directives with o

Example:

<div o-validation-message-for="firstName"></div>

Installing

This will install all node_modules and bower_components needed

npm install

Building

This will run the concatenation build script and inline all html templates into the template cache.

gulp

Project Use

Install-Package Envoc.Directives


Directives

oTable

https://github.com/Envoc/envoc.directives/blob/master/src/datatables/discovery.md

oValidateWith

  • Used as wrapper to map child validation messages to keys bound to error property
  • Child directive oValidationMessageFor maps propertyName of error object in collection
  • Child directive oValidationSummary displays a validation summary
<div o-validate-with errors="ctrl1.errors">
	<div o-validation-summary></div>
    <div o-validation-message-for="firstName"></div>
    <div o-validation-message-for="lastName"></div>
</div>

where ctrl1.errors:

[
    { propertyName: '', type: 'length', errorMessage: 'This is global' },
    { propertyName: 'firstName', type: 'required', errorMessage: 'First Name is required' },
    { 
        propertyName: 'lastName', 
        type: 'length', 
        errorMessage: 'Last Name must be between 2 and 256 characters' 
    }
];

envoc.directives's People

Contributors

justinobney avatar rschroeder avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.