Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,13 @@ Ideally you would use a module loader or a compilation step to import using ES6
import * as pbi from 'powerbi-client';
```

To embed Power BI artifacts, you need an instance of the Service class from the `powerbi-client` package.

```javascript
import { service, factories } from 'powerbi-client';
const powerbi = new service.Service(factories.hpmFactory, factories.wpmpFactory, factories.routerFactory);
```

However, the library is exported as a Universal Module and the powerbi.js script can be included before your app's closing `</body>` tag as:

```html
Expand Down