mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-26 17:24:56 +00:00
Update README.md
This commit is contained in:
parent
e0deaa2ba8
commit
573b064339
@ -29,6 +29,14 @@ Add the following dependency to your index.html:
|
|||||||
<script src="node_modules/alfresco-js-api/bundle.js"></script>
|
<script src="node_modules/alfresco-js-api/bundle.js"></script>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
#### 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
|
||||||
|
design dependency to your project:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
npm install --save material-design-icons material-design-lite
|
||||||
|
```
|
||||||
|
|
||||||
Also make sure you include these dependencies in your .html page:
|
Also make sure you include these dependencies in your .html page:
|
||||||
|
|
||||||
```html
|
```html
|
||||||
@ -38,48 +46,6 @@ Also make sure you include these dependencies in your .html page:
|
|||||||
<link rel="stylesheet" href="node_modules/material-design-icons/iconfont/material-icons.css">
|
<link rel="stylesheet" href="node_modules/material-design-icons/iconfont/material-icons.css">
|
||||||
```
|
```
|
||||||
|
|
||||||
Make sure your systemjs.config has the following configuration:
|
|
||||||
|
|
||||||
```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'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
#### 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
|
|
||||||
design dependency to your project:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
npm install --save material-design-icons material-design-lite
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Basic usage
|
#### Basic usage
|
||||||
|
|
||||||
|
|
||||||
@ -92,15 +58,23 @@ Example of an App that use Alfresco login component :
|
|||||||
main.ts
|
main.ts
|
||||||
```ts
|
```ts
|
||||||
|
|
||||||
import { bootstrap } from 'angular2/platform/browser';
|
import { bootstrap } from '@angular/platform-browser-dynamic';
|
||||||
import { Component } from 'angular2/core';
|
import { Component } from '@angular/core';
|
||||||
import { Router, RouteConfig, ROUTER_DIRECTIVES } from 'angular2/router';
|
import {
|
||||||
import { AlfrescoSettingsService, AlfrescoAuthenticationService } from 'ng2-alfresco-core/dist/ng2-alfresco-core';
|
Router,
|
||||||
import { AlfrescoLoginComponent } from 'ng2-alfresco-login/dist/ng2-alfresco-login';
|
RouteConfig,
|
||||||
import { ROUTER_PROVIDERS } from 'angular2/router';
|
ROUTER_DIRECTIVES,
|
||||||
import { HTTP_PROVIDERS } from 'angular2/http';
|
ROUTER_PROVIDERS
|
||||||
import { ALFRESCO_CORE_PROVIDERS, AlfrescoTranslationService, AlfrescoTranslationLoader } from 'ng2-alfresco-core/dist/ng2-alfresco-core';
|
} from '@angular/router-deprecated';
|
||||||
|
import { AlfrescoLoginComponent } from 'ng2-alfresco-login';
|
||||||
|
import { HTTP_PROVIDERS } from '@angular/http';
|
||||||
|
import {
|
||||||
|
ALFRESCO_CORE_PROVIDERS,
|
||||||
|
AlfrescoTranslationService,
|
||||||
|
AlfrescoTranslationLoader,
|
||||||
|
AlfrescoSettingsService,
|
||||||
|
AlfrescoAuthenticationService
|
||||||
|
} from 'ng2-alfresco-core';
|
||||||
|
|
||||||
@RouteConfig([
|
@RouteConfig([
|
||||||
{path: '/', name: 'Login', component: AlfrescoLoginComponent, useAsDefault: true}
|
{path: '/', name: 'Login', component: AlfrescoLoginComponent, useAsDefault: true}
|
||||||
@ -132,9 +106,6 @@ export class AppComponent {
|
|||||||
bootstrap(AppComponent, [
|
bootstrap(AppComponent, [
|
||||||
ROUTER_PROVIDERS,
|
ROUTER_PROVIDERS,
|
||||||
HTTP_PROVIDERS,
|
HTTP_PROVIDERS,
|
||||||
AlfrescoTranslationLoader,
|
|
||||||
AlfrescoTranslationService,
|
|
||||||
AlfrescoAuthenticationService,
|
|
||||||
ALFRESCO_CORE_PROVIDERS
|
ALFRESCO_CORE_PROVIDERS
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user