This project was generated with Angular CLI version 6.2.7.
Run npm install inside your project folder.
Run ng serve for a dev server. Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files.
After you run ng g c components/example to create a new component, open the example.component.html file and paste this lines:
<!-- Content Header (Page header) -->
<section class="content-header">
<h1 *ngIf="title">{{title}}
<small *ngIf="subTitle">{{subTitle}}</small>
</h1>
</section>
<!-- content-header -->
<!-- Main content -->
<section class="content">
<!-- PUT YOUR CONTENT BELOW THIS LINE ================================================== -->
Hello world
<!-- END OF YOUR CONTENT ================================================== -->
</section>
<!-- /.content -->Open your example.component.ts and paste this lines inside of the class:
title = 'Example';
subTitle = 'Version 2.0';Finally, don't forget to include a new menu (a link) inside of sidebar.component.html.
├───components
│ ├───control-sidebar
│ ├───dashboard
│ ├───footer
│ ├───header
│ ├───login
│ ├───page-not-found
│ ├───register
│ ├───sidebar
│ └───user-profile
├───guards
└───servicesWe use an Auth Service and an Auth Guard to control the access to specific pages to prevent not-authenticated users to see them. Right now, inside of src/app/services/auth.service.ts we have userDetails = 1, this means that the current user is authenticated and you can navigate to any page of the website. To access the login and register page, change userDetails to null.