fix readme

This commit is contained in:
Mario Romano
2016-06-22 23:44:56 +01:00
parent 297c6eb572
commit 2d1da9d0ce
7 changed files with 127 additions and 225 deletions

View File

@@ -29,48 +29,15 @@ Add the following dependency to your index.html:
<script src="node_modules/alfresco-js-api/bundle.js"></script>
```
Also make sure you include these dependencies in your .html page:
The following component needs to be added to your systemjs.config:
```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">
```
- ng2-translate
- ng2-alfresco-core
- ng2-alfresco-login
Make sure your systemjs.config has the following configuration:
Please refer to the following example to have an idea of how your systemjs.config should look like :
```javascript
System.config({
defaultJSExtensions: true,
map: {
'ng2-alfresco-core': 'node_modules/ng2-alfresco-core',
'ng2-alfresco-login': 'node_modules/ng2-alfresco-login',
'rxjs': 'node_modules/rxjs',
'angular2' : 'node_modules/angular2',
'ng2-translate': 'node_modules/ng2-translate',
'src': 'src'
},
packages: {
'src': {
defaultExtension: 'js'
},
'ng2-alfresco-core': {
defaultExtension: 'js'
},
'ng2-alfresco-login': {
defaultExtension: 'js'
},
'rxjs': {
defaultExtension: 'js'
},
'angular2': {
defaultExtension: 'js'
}
}
});
```
https://github.com/Alfresco/dev-platform-webcomponents/blob/master/ng2-components/ng2-alfresco-login/demo/systemjs.config.js
#### Style
The style of this component is based on material design, so if you want to visualize it correctly you have to add the material
@@ -80,6 +47,15 @@ design dependency to your project:
npm install --save material-design-icons material-design-lite
```
Also make sure you include these dependencies in your .html page:
```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">
```
#### Basic usage