Skip to content

Commit 3b7ae99

Browse files
authored
Users/benfeely/docs update (#8)
* Update to docs for github hosting. * Updates to docs and readme.
1 parent 4b35468 commit 3b7ae99

27 files changed

+743
-200
lines changed

README.1.md

Lines changed: 0 additions & 184 deletions
This file was deleted.

README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,32 @@
11
# React support for Angular
22

3+
[![npm version](https://badge.fury.io/js/%40angular-react%2Fcore.svg)](https://www.npmjs.com/package/@angular-react/core)
4+
35
Industry trends, organizational pressures, and other factors can lead to mandates regarding the use of component libraries or migration from one technology to another. In the case of [Office UI Fabric][fab], where its use is required, the client must be written in React (there is no Angular component library for the latest version). Rewrite from Angular to React may be cost-prohibitive or ill advised for other reasons.
46

57
Use of Angular-React allows consuming any React elements, but specifically Office UI Fabric, within an Angular [2+] application. The library of wrappers for Office UI Fabric simplifies the use of these components with Angular. However, any React code can make use of the custom Angular-React renderer.
8+
9+
#### Quick links
10+
[@angular-react/fabric](https://www.npmjs.com/package/@angular-react/fabric) |
11+
[Documentation, quick start, and guides][ard] |
12+
[Demo][ard-demo] |
13+
[Contributing](https://github.com/benfeely/angular-react/blob/master/CONTRIBUTING.md) |
14+
[StackBlitz Template](https://stackblitz.com/edit/angular-react) |
15+
[Office UI Fabric](https://developer.microsoft.com/en-us/fabric)
16+
17+
### Typical Use Cases
18+
- Use React component libraries with Angular
19+
- Incrementally rewrite an Angular application into React (moving from atomic/leaf nodes upward into full features/pages until the entire app is re-written)
20+
21+
### Getting started
22+
23+
See our [Getting Started Guide][getting-started]
24+
if you're building your first project with Angular-React.
25+
26+
If you'd like to contribute, you must follow our [contributing guidelines](https://github.com/angular/material2/blob/master/CONTRIBUTING.md).
27+
You can look through the issues (which should be up-to-date on who is working on which features and which pieces are blocked) and make a comment.
28+
29+
[ard]: https://benfeely.github.io/angular-react
30+
[ard-demo]: https://benfeely.github.io/angular-react
31+
[getting-started]: https://benfeely.github.io/angular-react/docs/getting-started
32+
[fab]: https://developer.microsoft.com/en-us/fabric

apps/docs/src/app/app-routing.module.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,13 @@ import {
66
ComponentDocsComponent,
77
DocsComponent,
88
FabricComponent,
9+
GettingStartedComponent,
910
LandingComponent,
10-
SemanticUiComponent,
1111
MixedPerfComponent,
1212
PerformanceComponent,
1313
ProfilesComponent,
14+
SemanticUiComponent,
15+
WrappersComponent,
1416
} from './containers';
1517

1618

@@ -28,7 +30,11 @@ const routes: Routes = [
2830
{ path: 'fabric', component: FabricComponent },
2931
{ path: 'semantic-ui', component: SemanticUiComponent },
3032
] },
31-
{ path: 'docs', component: DocsComponent },
33+
{ path: 'docs', component: DocsComponent, children: [
34+
{ path: '', redirectTo: 'getting-started', pathMatch: 'full' },
35+
{ path: 'getting-started', component: GettingStartedComponent },
36+
{ path: 'wrappers', component: WrappersComponent },
37+
] },
3238
];
3339

3440
@NgModule({

apps/docs/src/app/containers/docs/docs.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<app-sub-nav>
22
<div mat-tab-nav-bar>
3-
<a mat-tab-link routerLink="quick-start" routerLinkActive #rla1="routerLinkActive" [active]="rla1.isActive">
3+
<a mat-tab-link routerLink="getting-started" routerLinkActive #rla1="routerLinkActive" [active]="rla1.isActive">
44
<mat-icon>
55
directions_run
66
</mat-icon>

apps/docs/src/app/containers/docs/docs.module.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,14 @@ import { ComponentsModule } from '../../components';
99

1010
import { DocsComponent } from './docs.component';
1111
import { FabricModule } from '../../fabric.module';
12+
import { GettingStartedComponent } from './getting-started/getting-started.component';
13+
import { WrappersComponent } from './wrappers/wrappers.component';
1214

1315

1416
const components = [
1517
DocsComponent,
18+
GettingStartedComponent,
19+
WrappersComponent,
1620
];
1721

1822
@NgModule({
@@ -33,4 +37,6 @@ export class DocsModule { }
3337

3438
export {
3539
DocsComponent,
40+
GettingStartedComponent,
41+
WrappersComponent,
3642
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<p>
2+
getting-started works!
3+
</p>

apps/docs/src/app/containers/docs/getting-started/getting-started.component.scss

Whitespace-only changes.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
2+
3+
import { GettingStartedComponent } from './getting-started.component';
4+
5+
describe('GettingStartedComponent', () => {
6+
let component: GettingStartedComponent;
7+
let fixture: ComponentFixture<GettingStartedComponent>;
8+
9+
beforeEach(async(() => {
10+
TestBed.configureTestingModule({
11+
declarations: [ GettingStartedComponent ]
12+
})
13+
.compileComponents();
14+
}));
15+
16+
beforeEach(() => {
17+
fixture = TestBed.createComponent(GettingStartedComponent);
18+
component = fixture.componentInstance;
19+
fixture.detectChanges();
20+
});
21+
22+
it('should create', () => {
23+
expect(component).toBeTruthy();
24+
});
25+
});
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import { Component, OnInit } from '@angular/core';
2+
3+
@Component({
4+
selector: 'app-getting-started',
5+
templateUrl: './getting-started.component.html',
6+
styleUrls: ['./getting-started.component.scss']
7+
})
8+
export class GettingStartedComponent implements OnInit {
9+
10+
constructor() { }
11+
12+
ngOnInit() {
13+
}
14+
15+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<p>
2+
wrappers works!
3+
</p>

0 commit comments

Comments
 (0)