2017-09-03 5 views
0

をレンダリングします。私はhttp://requirejs.org/docs/release/2.2.0/minified/require.jsは私が別のボタンを押したときに、正しくgithubのボタンを「リロード」レンダリングするgithubのフォークボタン

+0

あなたはどのフレームワーク/ libを使用していますか?すなわち:角度、反応、またはvue? – Microsmsm

+0

純粋ジャバスクリプトが、私は最近require.jsを含み、動作しません。 @Microsmsm –

答えて

0

Node.JS is a server-side technology, not a browser technology. Thus, Node-specific calls, like require(), do not work in the browser.

See browserify or webpack if you wish to serve browser-specific modules from Node.

含む場合

Uncaught Error: Module name "github-buttons" has not been loaded yet for context: _. Use require([]).

しかし、あなたは、このボタンを作るために彼らの手順を使用することができます。私は検索と私はthis informationを得たが、私はそれを行うことができない、私は別のエラーに直面しました...

Usage:

  1. Place this tag where you want the button to render
<a class="github-button" href="https://github.com/microsmsm" data- 
size="large" aria-label="Follow @microsmsm on GitHub">Follow 
@microsmsm</a> 
  1. Place this tag in your head or just before your close body tag
<script async defer src="https://buttons.github.io/buttons.js"></script> 

コード例

https://codepen.io/Microsmsm/pen/NvJaNm?editors=1100

リファレンス

https://buttons.github.io/

+0

クリックするたびにこのgithubボタンを作成するボタンを作成し、エラーが発生しました! https://buttons.github.io/ –

+0

スタイルであり、ただの要素として見えます。私はそうするように、このLIBを使用することはお勧めしません@Microsmsm – Microsmsm

+0

を押すときに、このhttps://codepen.io/zeyadetman/pen/ZJPXxBをチェックし、ボタンフォークボタンが表示されない「クリック」:あなたがここで提供されるように頼む何 –

関連する問題