mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-3323] Fixed broken links in doc files (#3662)
* [ADF-3323] Fixed URL path to Typescript source files * [ADF-3323] Fixed and checked broken links caused by previous bug
This commit is contained in:
committed by
Eugenio Romano
parent
fd5978e81b
commit
e03f3a1a6b
@@ -4,7 +4,7 @@ Level: Basic
|
||||
|
||||
# Adding a new component
|
||||
|
||||
By definition, a *component* controls a patch of screen called a *view*. For example, individual components define and control menus, tabs, forms, buttons and every simple or complex portion ofan application's layout. In this tutorial, you will learn how to create a component using [Angular CLI](https://cli.angular.io/) within an existing application.
|
||||
By definition, a _component_ controls a patch of screen called a _view_. For example, individual components define and control menus, tabs, forms, buttons and every simple or complex portion ofan application's layout. In this tutorial, you will learn how to create a component using [Angular CLI](https://cli.angular.io/) within an existing application.
|
||||
|
||||
## Creating a component
|
||||
|
||||
@@ -25,7 +25,7 @@ Once the component is created, you can use the element
|
||||
anywhere within the HTML file of another component to render the content of `my-first-component`.
|
||||
|
||||
As an example, add `<app-my-first-component></app-my-first-component>` at the top of the
|
||||
`app.component.html` file in the `src` folder, and run the application again. In the browser you will
|
||||
[`app.component`](../../demo-shell/src/app/app.component.ts)`.html` file in the `src` folder, and run the application again. In the browser you will
|
||||
shortly see the text "my-first-component works!", as a placeholder to show where the component is
|
||||
rendered in the layout.
|
||||
|
||||
@@ -35,12 +35,12 @@ By default the new component is created in the `src/app` path and everything is
|
||||
same name as the component itself. Here, you should find a folder named `my-first-component` has been added
|
||||
to `src/app`, with the following contents:
|
||||
|
||||
- `my-first-component.component.scss` containing the CSS used by the component, initially empty.
|
||||
- `my-first-component.component.html` containing the HTML used to render the component. This file is
|
||||
created with a very basic placeholder message that displays the name of the component within a `p` tag.
|
||||
- `my-first-component.component.spec.ts` containing the unit tests for the component.
|
||||
- `my-first-component.component.ts` containing the `MyFirstComponentComponent` class that implements the
|
||||
business logic in typescript.
|
||||
- `my-first-component.component.scss` containing the CSS used by the component, initially empty.
|
||||
- `my-first-component.component.html` containing the HTML used to render the component. This file is
|
||||
created with a very basic placeholder message that displays the name of the component within a `p` tag.
|
||||
- `my-first-component.component.spec.ts` containing the unit tests for the component.
|
||||
- `my-first-component.component.ts` containing the `MyFirstComponentComponent` class that implements the
|
||||
business logic in typescript.
|
||||
|
||||
You must declare or import the component in one or more modules in order to use it. In this example the
|
||||
`app.module.ts` file stored in `src/app` contains the following code:
|
||||
|
Reference in New Issue
Block a user