Skip to content

Commit d8d7275

Browse files
authored
Merge pull request #56 from sourcefuse/GH-20-E
feat(arc-docs)-documentation of installation
2 parents d35e389 + 949ff6c commit d8d7275

File tree

10 files changed

+124
-5
lines changed

10 files changed

+124
-5
lines changed

projects/arc-docs/src/app/app.module.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,13 @@ import {AppComponent} from './app.component';
66
import {ThemeModule} from '@project-lib/theme/theme.module';
77
import {HeaderComponent} from '@project-lib/components/header/header.component';
88
import {SidebarComponent} from '@project-lib/components/sidebar/sidebar.component';
9+
import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
910

1011
@NgModule({
1112
declarations: [AppComponent],
1213
imports: [
1314
BrowserModule,
15+
BrowserAnimationsModule,
1416
AppRoutingModule,
1517
ThemeModule.forRoot('default'),
1618
HeaderComponent,

projects/arc-docs/src/app/docs/auth-doc/auth-doc-routing.module.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import {NgModule} from '@angular/core';
22
import {RouterModule, Routes} from '@angular/router';
33
import {DocIntrodutionComponent} from './components/doc-introdution/doc-introdution.component';
4+
import {InstallationDocComponent} from './components/installation-doc/installation-doc.component';
45

56
const routes: Routes = [
67
{
@@ -12,6 +13,10 @@ const routes: Routes = [
1213
path: 'authDocIntro',
1314
component: DocIntrodutionComponent,
1415
},
16+
{
17+
path: 'installation',
18+
component: InstallationDocComponent,
19+
},
1520
];
1621

1722
@NgModule({

projects/arc-docs/src/app/docs/auth-doc/auth-doc.module.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@ import {AuthDocRoutingModule} from './auth-doc-routing.module';
55
import {DocIntrodutionComponent} from './components/doc-introdution/doc-introdution.component';
66
import {CliWrapperComponent} from '@project-lib/components/cli-wrapper/cli-wrapper.component';
77
import {ThemeModule} from '@project-lib/theme/theme.module';
8+
import {InstallationDocComponent} from './components/installation-doc/installation-doc.component';
89

910
@NgModule({
10-
declarations: [DocIntrodutionComponent],
11+
declarations: [DocIntrodutionComponent, InstallationDocComponent],
1112

1213
imports: [
1314
CommonModule,
Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
.note {
2-
background-color: #e0f7fa;
3-
border-left: 4px solid #036ea3;
2+
background-color: #e0f7fa;
3+
border-left: 4px solid #036ea3;
44
padding: 16px;
55
margin: 16px 0;
6-
76
}
87
a {
98
text-decoration: none;
109
color: #19a5ff;
1110
}
1211

1312
a:hover {
14-
text-decoration: underline;
13+
text-decoration: underline;
1514
}
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
<div class="intro-wrapper">
2+
<div class="1st-phase">
3+
<nb-card>
4+
<nb-card-header fixed>
5+
<h2 class="nb-card-header-title">Install the module</h2>
6+
</nb-card-header>
7+
<nb-card-body>
8+
<p>
9+
First, Install the module as it's distributed as npm package. Make
10+
sure you have the Nebular Theme module up and running. Nebular Theme
11+
is required to use built-in Auth Components.
12+
</p>
13+
</nb-card-body>
14+
</nb-card>
15+
16+
<nb-card>
17+
<nb-card-header fixed>
18+
<h2 class="nb-card-header-title">HttpClientModule</h2>
19+
</nb-card-header>
20+
<nb-card-body>
21+
<p>
22+
Auth module utilizes features of HttpClientModule and since it should
23+
only be imported in the root module, please make sure you've done
24+
this:
25+
</p>
26+
<div class="wrapper" *ngFor="let data of dataWrapper">
27+
{{ data.code }}
28+
</div>
29+
</nb-card-body>
30+
</nb-card>
31+
32+
<nb-card>
33+
<nb-card-header fixed>
34+
<h2 class="nb-card-header-title">Configure a strategy</h2>
35+
</nb-card-header>
36+
<nb-card-body>
37+
<p>
38+
Now, let's configure the module by specifying available strategies, in
39+
our case, we add NbPasswordAuthStrategy. To add a strategy we need to
40+
call static setup method to pass a list of options:
41+
</p>
42+
<img
43+
height="300px"
44+
width="500px"
45+
src="../../.././../../assets/env img/authmodule.png"
46+
alt="moduleImg"
47+
/>
48+
</nb-card-body>
49+
</nb-card>
50+
51+
<nb-card>
52+
<nb-card-header fixed>
53+
<h2 class="nb-card-header-title">Enable Auth Components</h2>
54+
</nb-card-header>
55+
<nb-card-body>
56+
<p>
57+
we need to configure Auth Components routes, and add those into your
58+
app-routing.module.ts
59+
</p>
60+
<img
61+
height="600px"
62+
width="500px"
63+
src="../../.././../../assets/env img/route.png"
64+
alt="routeImg"
65+
/>
66+
</nb-card-body>
67+
</nb-card>
68+
</div>
69+
</div>
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.wrapper {
2+
background-color: #0a0b0c ;
3+
border-left: 4px solid #e0f7fa;
4+
padding: 16px;
5+
margin: 16px 0;
6+
color: #e0f7fa;
7+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import {ComponentFixture, TestBed} from '@angular/core/testing';
2+
3+
import {InstallationDocComponent} from './installation-doc.component';
4+
5+
describe('InstallationDocComponent', () => {
6+
let component: InstallationDocComponent;
7+
let fixture: ComponentFixture<InstallationDocComponent>;
8+
9+
beforeEach(async () => {
10+
await TestBed.configureTestingModule({
11+
declarations: [InstallationDocComponent],
12+
}).compileComponents();
13+
14+
fixture = TestBed.createComponent(InstallationDocComponent);
15+
component = fixture.componentInstance;
16+
fixture.detectChanges();
17+
});
18+
19+
it('should create', () => {
20+
expect(component).toBeTruthy();
21+
});
22+
});
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import {Component} from '@angular/core';
2+
3+
@Component({
4+
selector: 'app-installation-doc',
5+
templateUrl: './installation-doc.component.html',
6+
styleUrls: ['./installation-doc.component.scss'],
7+
})
8+
export class InstallationDocComponent {
9+
dataWrapper: object[] = [
10+
{
11+
code: `import { HttpClientModule } from '@angular/common/http';`,
12+
},
13+
];
14+
}
Loading
272 KB
Loading

0 commit comments

Comments
 (0)