<commit_before>carbon-ui
=========

An experimental UI framework for WSO2 Carbon.

# Building a custom module

## Initializing

Carbon modules are just plain old angular modules, with some infrastructure support from `carbonUiApp`, which is the base module for carbon-ui-framework.

1. When you want to create a new module, you will have to create a script which initializes the module like this:

	```js
	angular.module('carbonCastamere', []);
	```
2. Include the custom module in you `index.html` file for `carbonUiApp`.
3. And inject the dependency to the `carbonUiApp`

	```js
	angular.module('carbonUiApp', ['carbonCastamere']);
	```
	
## Routing

Carbon modules can define their own routes. This is supported by the `ui.router` module by the [ui-router](https://github.com/angular-ui/ui-router) project, and `carbonUiApp.navigation` module.

Defining a route is achieved by using the `$stateProvider` provider inside the `config` handler for your custom module. Like this:

```js
angular.module('carbonCastamere', ['ui.router'])
    .config(function($stateProvider) {
        $stateProvider.state('castamereHome', {
        	url: '/castamere',
            templateUrl: 'carbon_components/castamere/main.html',
            controller: 'CastemereCtrl',<commit_msg>updated docs<commit_after>carbon-ui
=========

An experimental UI framework for WSO2 Carbon.

# Building a custom module

## Creating a new carbon-ui module

Carbon modules are just plain old angular modules, with some infrastructure support from `carbonUiApp`, which is the base module for carbon-ui-framework.

1. When you want to create a new module, you will have to create a script which initializes the module like this:

	```js
	angular.module('carbon.castamere', []);
	```
2. Register the module with carbon-ui

	```js
	carbon.registerModule('carbon.castamere');
	```

That's it! For a full example, refer to the [carbon.castamere](https://github.com/ncthis/carbon-castamere) project.

## Using the carbon-ui module in carbon-ui

You need to distribute your module with [bower](http://www.bower.io). You can register your custom module with bower and install it on the carbon-ui project with: `bower install`.

To inject the custom module dependencies to the carbon-ui project run `grunt wiredep`.
	
## Routing and Navigation Support

Carbon modules can define their own routes. This is supported by the `ui.router` module by the amazing [ui-router](https://github.com/angular-ui/ui-router) project, and `carbonUiApp.navigation` module.

Defining a route is achieved by using the `$stateProvider` provider inside the `config` handler for your custom module. Like this:

```js
angular.module('carbonCastamere', ['ui.router'])
    .config(function($stateProvider) {
        $stateProvider.state('castamereHome', {
        	url: '/castamere',
            templateUrl: 'carbon_components/castamere/main.html',
            controller: 'CastemereCtrl',
{'fraction_non_alphanumeric': 0.10780287474332649, 'fraction_numerical': 0.0023956194387405884, 'mean_word_length': 4.304900181488203, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 3, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2291385', 'n_tokens_mistral': 849, 'n_tokens_neox': 803, 'n_words': 316}