Skip to content
This repository has been archived by the owner on Nov 14, 2017. It is now read-only.

awinogradov/bem-ng

Repository files navigation

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

Resources

Stars

Watchers

Forks

Packages

No packages published