How to convert the pages in asserts folder to angular components

Forum rules
Please note that response time for technical support is within 3-5 business days.
Post Reply
danilolr
Posts: 1
Joined: 14 Mar 2016, 03:48

10 Dec 2019, 15:56

Hi,

I need create some pages who don't use the main template.
This pages will not show the header / footer / menu.
Like the login / landing page on the example.
But they must be angular components, not static pages on the asserts folder as in the example.

How can I do this ?

Danilo.

merve7
Posts: 861
Joined: 12 Sep 2017, 10:44

17 Dec 2019, 13:14

Hi,
Firstly, we will convert templates pages to the angular component for the next release but you can use the below steps to convert your pages until release;
1-create component files (example -> app.error.component.ts and app.error.component.html)
2-set your code and your configurations;
example -> app.error.component.html

Code: Select all

<div class="error-page">
    <div class="panel">
        <h1>Exception Occured</h1>
        <div class="exception-detail">Please contact system administrator</div>
        <p-button label="Homepage" [routerLink]="['/']" styleClass="pink-btn"></p-button>
    </div>
</div>
3-change routes for will not show menu or other main components
in app.route.ts

Code: Select all

export const routes: Routes = [
    { path: '', component: AppMainComponent,
        children: [
            { path: '', component: DashboardDemoComponent },
            { path: 'sample', component: SampleDemoComponent },
        ]
    },
    {path: 'error', component: AppErrorComponent},
];

Post Reply

Return to “Babylon - PrimeNG”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest