awinogradov / bem-ng

Library for work with AngularJS in bem-projects

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

bem-ng

This README also available in russian.

Library for using AngularJS in bem-projects.

Dependencies

Install

If you want some easy way use generator-bem for Yeoman. Follow link before and read instruction for install and using it. It help you to easy creating AngularJS essences and get NodeJS application for testing.

Another way like connecting with bem-bl, bem-core and bem-components libraries. Use bower-npm-install to install bem-ng from GitHub or Bower register.

Add levels form bem-ng to your make.js file:

[ 'libs/bem-ng/common.blocks' ]

Directives

Use attrs mod for writing AngularJS directives:

{ 
    block: 'alert', 
    attrs: { 'ng-show': 'form.$valid' } 
}

Templates

Use ng-template block for creating AngularJS templates on BEMJSON.

({ 
    block: 'ng-template', 
    content: [ 
        'Awesome AngularJS template' 
    ] 
})

Rendering

Use ng-view block for render AngularJS templates.

One template on page:

{ block: 'ng-view' }

Two templates on page:

{ block: 'ng-view', template: 'contacts' },
{ block: 'ng-view', template: 'copyright' }

Build

Page skeleton, templates, CSS and JavaScript sources from external libs will builds with bem-tools.

Authors

Ideas

Please, talk about your ideas by GitHub issues.

MIT License

About

Library for work with AngularJS in bem-projects


Languages

Language:JavaScript 100.0%