Skip to content

Latest commit

 

History

History
188 lines (124 loc) · 5.11 KB

UsersGuide.md

File metadata and controls

188 lines (124 loc) · 5.11 KB

Pip.WebUI.Core User's Guide

Contents

Installing

Add dependency to pip-webui into your bower.json or package.json file depending what you use.

"dependencies": {
  ...
  "pip-webui": "*"
  ...
}

Alternatively you can install pip-webui manually using bower:

bower install pip-webui

or install it using npm:

npm install pip-webui

Include pip-webui files into your web application.

<link rel="stylesheet" href=".../pip-webui-lib.min.css"/>
<link rel="stylesheet" href=".../pip-webui.min.css"/>
...
<script src=".../pip-webui-lib.min.js"></script>
<script src=".../pip-webui.min.js"></script>

pipTranslate service

pipTranslate service enables translations of strings in web applications.

Usage

Before using the service, you shall define string resources in your components during configure phase:

    var myModule = angular.module('myModule.Translate', []);

    myModule.config(function (pipTranslateProvider) {

        pipTranslateProvider.translations('en', {
            KEY1: 'Text for key 1',
            KEY2: 'Text for key 2',
            KEY3: '<b>HTML</b> for <i>key 3</i>'
        });

        pipTranslateProvider.translations('ru', {
            KEY1: 'Текст для ключа 1',
            KEY2: 'Текст для ключа 2',
            KEY3: '<b>HTML</b> для <i>ключа 3</i>'
        });
        
    });

Then you can all pipTranslate service to extract text by key translated for the current language:

// Set language
pipTranslate.use('ru');
pipTranslate.translate('KEY1');

Methods: Todo: Describe the service methods

pip-translate directive

pip-translate directive translates strings inside HTML page.

Usage

<pip-translate key="KEY1"/>

Attributes

  • key - key of resource string to translate

pip-translate-html directive

pip-translate-tml directive translates strings, but instead of text it injects HTML into a page.

Usage

<pip-translate-html key="KEY3"/>

Attributes

  • key - key of resource string to translate

pipError service

When page communicates with server, it may perform several transactions at once. When failures occure, they may come in batches. pipError service allows to combine multiple errors in specific context. It also helps to decouple business logic that throws errors from UI that visualizes them.

Usage

Todo: Add code snippet that shows usage of the service

Methods

Todo: Describe service methods

pipTransaction service

When page communicates with server, it may execute multiple concurrent requests. pipTransaction helps to coordinate one or multiple concurrent requests and combine them into a single transaction. It also helps to decouple business logic that performs transaction from UI that visualizes transaction state.

Usage

Todo: Add code snippet that shows usage of the service

Todo: Add screenshot that shows how transaction state is visualized

Methods

Todo: Describe service methods

pipState service

pipState service extends ui-router with few useful features

Usage

Todo: Add code snippet that shows usage of the service

Methods

Todo: Describe service methods

pipTheme service

pipTheme service allows to change color themes in the application. Theme colors are defined in pip-webui-css module

Usage

Todo: Add code snippet that shows usage of the service

Todo: Add screenshot that shows how few themes

Methods

Todo: Describe service methods

pipTimer service

Web applications often need to perform some tasks periodically - check new data on the server, refresh screen and so on. pipTimer service sends events in configured time intervals. That helps to minimize number of timers in the code and coordinate asynchronous processing.

Usage

Todo: Add code snippet that shows usage of the service

Methods

Todo: Describe service methods

pipDebug service

pipDebug service allows to turn on/off debugging state and log debug messages when debugging is enabled.

Usage

Todo: Add code snippet that shows usage of the service

Methods

Todo: Describe service methods

Questions and bugs

If you have any questions regarding the module, you can ask them using our discussion forum.

Bugs related to this module can be reported using github issues.