mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-19 17:14:57 +00:00
Added ReadMe
This commit is contained in:
parent
9750a90b1a
commit
b3b381536e
@ -1,28 +1,58 @@
|
|||||||
# ng2-alfresco-userinfo
|
# Alfresco User Info Component for Angular 2
|
||||||
This component will show the user information for ECM and BPM
|
This component will show the user information for ECM and BPM
|
||||||
|
|
||||||
|
|
||||||
|
## Prerequisites
|
||||||
|
|
||||||
|
Before you start using this development framework, make sure you have installed all required software and done all the
|
||||||
|
necessary configuration, see this [page](https://github.com/Alfresco/alfresco-ng2-components/blob/master/PREREQUISITES.md).
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
npm install ng2-alfresco-userinfo --save
|
npm install ng2-alfresco-userinfo --save
|
||||||
```
|
```
|
||||||
|
## Dependencies
|
||||||
|
|
||||||
|
Add the following dependency to your index.html:
|
||||||
|
```html
|
||||||
|
<script src="node_modules/alfresco-js-api/dist/alfresco-js-api.js"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
You must separately install the following libraries for your application:
|
||||||
|
|
||||||
|
- [ng2-translate](https://github.com/ocombe/ng2-translate)
|
||||||
|
- [ng2-alfresco-core](https://www.npmjs.com/package/ng2-alfresco-core)
|
||||||
|
|
||||||
|
```sh
|
||||||
|
npm install --save ng2-translate ng2-alfresco-core
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Material Design Lite
|
||||||
|
|
||||||
|
The style of this component is based on [material design](https://getmdl.io/), so if you want to visualize it correctly you have to add the material
|
||||||
|
design dependency to your project:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
npm install --save material-design-icons material-design-lite
|
||||||
|
```
|
||||||
|
|
||||||
|
Also make sure you include these dependencies in your `index.html` file:
|
||||||
|
|
||||||
|
```html
|
||||||
|
<!-- Google Material Design Lite -->
|
||||||
|
<link rel="stylesheet" href="node_modules/material-design-lite/material.min.css">
|
||||||
|
<script src="node_modules/material-design-lite/material.min.js"></script>
|
||||||
|
<link rel="stylesheet" href="node_modules/material-design-icons/iconfont/material-icons.css">
|
||||||
|
```
|
||||||
|
|
||||||
## Example
|
## Example
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<ng2-alfresco-userinfo></ng2-alfresco-userinfo>
|
<ng2-alfresco-userinfo></ng2-alfresco-userinfo>
|
||||||
```
|
```
|
||||||
|
This will show a round icon with user and on click some user information are showed.
|
||||||
## Reference
|
If user is logged in with ECM and BPM the ECM image will be showed.
|
||||||
|
|
||||||
Attribute | Options | Default | Description
|
|
||||||
--- | --- | --- | ---
|
|
||||||
`foo` | *string* | `bar` | Lorem ipsum dolor.
|
|
||||||
|
|
||||||
|
|
||||||
Method | Parameters | Returns | Description
|
|
||||||
--- | --- | --- | ---
|
|
||||||
`methodName()` | None. | void | Lorem ipsum dolor.
|
|
||||||
|
|
||||||
## NPM scripts
|
## NPM scripts
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user