3fde3c11c1
# Conflicts: # apps/demo/src/app/app.component.ts # libs/core/package-lock.json # libs/core/package.json # libs/fabric/package.json # libs/fabric/public-api.ts # libs/fabric/src/lib/components/command-bar/command-bar.component.ts # package-lock.json # package.json |
||
---|---|---|
.vscode | ||
apps | ||
docs | ||
libs | ||
tools | ||
.editorconfig | ||
.gitignore | ||
.prettierrc | ||
CONTRIBUTING.md | ||
README.md | ||
angular.json | ||
nx.json | ||
package-lock.json | ||
package.json | ||
tsconfig.json | ||
tsconfig.packages.json | ||
tslint.json |
README.md
React support for Angular
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, 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.
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.
Quick links
@angular-react/fabric | Documentation, quick start, and guides | Demo | Contributing | StackBlitz Template | Office UI Fabric
Typical Use Cases
- Use React component libraries with Angular
- Incrementally rewrite an Angular application into React (moving from atomic/leaf nodes upward into full features/pages until the entire app is re-written)
Getting started
See our Getting Started Guide if you're building your first project with Angular-React.
If you'd like to contribute, you must follow our contributing guidelines. 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.
Pull Requests
See: https://gist.github.com/piscisaureus/3342247
Locate the section for your github remote in the .git/config
file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = git@github.com:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = git@github.com:joyent/node.git
fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
Now fetch all the pull requests:
$ git fetch origin
From github.com:joyent/node
* [new ref] refs/pull/1000/head -> origin/pr/1000
* [new ref] refs/pull/1002/head -> origin/pr/1002
* [new ref] refs/pull/1004/head -> origin/pr/1004
* [new ref] refs/pull/1009/head -> origin/pr/1009
...
To check out a particular pull request:
$ git checkout pr/999
Branch pr/999 set up to track remote branch pr/999 from origin.
Switched to a new branch 'pr/999'
To get latest changes to the PR:
$ git checkout pr/1000
$ git pull --tags origin refs/pull/1000/head
From https://github.com/benfeely/angular-react
* branch refs/pull/1000/head -> FETCH_HEAD
Updating aab92e2..2896b73
Fast-forward
...
Note: "git pull" did not work for me by itself for the PR branch... Perhaps "git pull origin".