mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2026-09-09 18:03:21 +00:00
[ADF-2679] Reviewed tutorials (#3254)
* [ADF_2679] Reviewed tutorial text * [ADF-2679] Reviewed tutorials * [ADF-2679] Fixed glitches in index page
This commit is contained in:
committed by
Eugenio Romano
parent
ebfc40b1c8
commit
8037d4c76c
@@ -1,31 +1,44 @@
|
||||
---
|
||||
Level: Intermediate
|
||||
---
|
||||
# Customising the Login component
|
||||
|
||||
In this tutorial you will learn how to customise the [`Login` component](https://alfresco.github.io/adf-component-catalog/components/LoginComponent.html) assuming that you read the [technical documentation](https://alfresco.github.io/adf-component-catalog/components/LoginComponent.html). In this tutorial we are going to describe a very simple task, considering that the technical documentation is complete and it is presented in form of examples and tutorial.
|
||||
# Customizing the Login component
|
||||
|
||||
In this tutorial you will learn how to customize the [`Login` component](https://alfresco.github.io/adf-component-catalog/components/LoginComponent.html) following the [technical documentation](https://alfresco.github.io/adf-component-catalog/components/LoginComponent.html). The task will be very simple. See the documentation for further details about customizing this component, along with examples.
|
||||
|
||||
## Locating the component into your application
|
||||
|
||||
Starting from an existing ADF application, the `Login` component, like any other component, is stored in a subfolder of the `app` folder: in [Alfresco Content App](https://github.com/Alfresco/alfresco-content-app) it is stored into the `/src/app/components/login` path, in an ADF app created with [Yeoman](http://yeoman.io/) it is stored into the `/src/app/login` path.
|
||||
Starting from an existing ADF application, the `Login` component, like any other component, is stored in a subfolder of the `app` folder. In the
|
||||
[Alfresco Content App](https://github.com/Alfresco/alfresco-content-app)
|
||||
it is stored in the `/src/app/components/login` path. In an ADF app created with [Yeoman](http://yeoman.io/)
|
||||
it is stored in the `/src/app/login` path.
|
||||
|
||||
As an example, locate the `Login` component for your application and proceed to customise it as described below.
|
||||
Once you have located the `Login` component for your application, you can customize it as described below.
|
||||
|
||||
## Changing the header
|
||||
|
||||
As every regular [Angular Component](https://angular.io/guide/architecture-components), the `Login` component can be customised through the CSS, HTML and Typescript. In this simple example we are going to customise the header (as described also into the [technical documentation](https://alfresco.github.io/adf-component-catalog/components/LoginComponent.html)).
|
||||
As with every regular
|
||||
[Angular Component](https://angular.io/guide/architecture-components),
|
||||
you can customize the `Login` component can be customised via CSS, HTML and Typescript. In this simple
|
||||
example, we will customize the header (as described also in the
|
||||
[technical documentation](https://alfresco.github.io/adf-component-catalog/components/LoginComponent.html)).
|
||||
|
||||
To complete the task, edit the login.component.html file and change the content accordingly to the following source code.
|
||||
Open the `login.component.html` file and change the content to match the following source code:
|
||||
|
||||
<adf-login ...>
|
||||
<login-header><ng-template>My custom HTML for the header</ng-template></login-header>
|
||||
</adf-login>
|
||||
```html
|
||||
<adf-login ...>
|
||||
<login-header><ng-template>My custom HTML for the header</ng-template></login-header>
|
||||
</adf-login>
|
||||
```
|
||||
|
||||
After saving the file, the login form will look like the following picture.
|
||||
After saving the file, the login form will look like this:
|
||||
|
||||

|
||||
|
||||
## More examples
|
||||
|
||||
As introduced above in this tutorial, this is a very basic example and the `Login` component can be customised many more than this. For a complete and detailed description, full of examples, check the [technical documentation about the component](https://alfresco.github.io/adf-component-catalog/components/LoginComponent.html) that contains everything you might want to know about the customisation of the `Login` component
|
||||
As mentioned earlier, this is a very basic example and the `Login` component can be customized
|
||||
much more extensively than this. For a complete and detailed description, full of examples, check the
|
||||
[technical documentation about the component](https://alfresco.github.io/adf-component-catalog/components/LoginComponent.html).
|
||||
This describes every customization available for the `Login` component.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user