Unofficial GitHub buttons in Angular.
npm install ng-github-button --save
import GithubButtonModule。
import { GithubButtonModule } from 'ng-github-button';
@NgModule({
imports: [ BrowserModule, GithubButtonModule ],
declarations: [AppComponent],
bootstrap: [AppComponent]
})
export class AppModule { }<github-button token="REQUIRED" type="stargazers" size="large" namespace="cipchk" repo="ng-github-button"></github-button>| Name | Type | Default | Summary |
|---|---|---|---|
token |
string |
- | REQUIRED To communicate with the GraphQL server, you'll need an OAuth token with the right scopes, Creating a personal access token for the command line |
namespace |
string |
- | REQUIRED Your GitHub id or organization name. |
repo |
string |
- | REQUIRED The name of your repository. |
type |
stargazers,subscribers,watchers,forks |
stargazers |
- |
size |
default,large |
- | - |
showZero |
boolean |
false |
Can be show zero value |
query |
string |
- | Custom query string in github api v4, pls refer to GraphQL API v4 |
callback |
(data: any) => string |
- | Callback in data render |
svg |
string |
- | Icon |
Please follow this guidelines when reporting bugs and feature requests:
- Use GitHub Issues board to report bugs and feature requests (not our email address)
- Please always write steps to reproduce the error. That way we can focus on fixing the bug, not scratching our heads trying to reproduce it.
Thanks for understanding!
The MIT License (see the LICENSE file for the full text)