<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Angular 2 and Power BI Embedded in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Angular-2-and-Power-BI-Embedded/m-p/112993#M3915</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/19683"&gt;@gauz09&lt;/a&gt; wrote:&lt;BR /&gt;&lt;BR /&gt;&lt;P&gt;I spent quite a lot of time figuring this out. Hope this will save some time for somebody!&amp;nbsp;&lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://community.fabric.microsoft.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;P.S. - Your secured token for the report expires after some time. Don't know the default.&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think it expires after 1 hour but I'm not sure. After that you can send a request to obtain a refresh_token (which has longer duration)&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.microsoft.com/azure/active-directory/active-directory-protocols-oauth-code" target="_blank"&gt;https://docs.microsoft.com/azure/active-directory/active-directory-protocols-oauth-code&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 13 Jan 2017 08:43:28 GMT</pubDate>
    <dc:creator>GianniB</dc:creator>
    <dc:date>2017-01-13T08:43:28Z</dc:date>
    <item>
      <title>Angular 2 and Power BI Embedded</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Angular-2-and-Power-BI-Embedded/m-p/112226#M3904</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to embed a Power BI report in an Angular 2 app (and also Ionic 2 app) and I have managed to "import" my PBIX file from my local to my Workspace in Azure Cloud. I used Node JS baser powerbi-cli tool/plugin to do that.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now that the report is there on my cloud I would like to embed it in a simple HTML in my Angular 2 app. I am not sure how to go about it, I am new to this and not able to figure out a way.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can somebody please help me on what I need to write in my TypeScript file and what needs to be done in the HTML of my Angular 2 app. &lt;U&gt;If possible a sample code will be of great help!&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would highly appreciate if you&amp;nbsp;could please help me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Jan 2017 02:13:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Angular-2-and-Power-BI-Embedded/m-p/112226#M3904</guid>
      <dc:creator>gauz09</dc:creator>
      <dc:date>2017-01-12T02:13:46Z</dc:date>
    </item>
    <item>
      <title>Re: Angular 2 and Power BI Embedded</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Angular-2-and-Power-BI-Embedded/m-p/112803#M3912</link>
      <description>&lt;P&gt;Done!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If anybody wants, you can use following libraries to do this.&lt;/P&gt;&lt;P&gt;* powerbi-cli&lt;BR /&gt;* powerbi-client&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You will need the following also:&lt;/P&gt;&lt;P&gt;1. Azure Cloud access to create a Workspace Collection and Workspace with Power BI Embedded by logging into Azure Cloud&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. Then using powerbi-cli command on your prompt, config the workspace with its Access Key. Like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;powerbi config -c &amp;lt;workspace-name&amp;gt; -k &amp;lt;workspace-access-key&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3. Create an actual workspace using using following command. This will give you workspace-id.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; powerbi create-workspace&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;4. Add the above generated workspace-id to the configuration as below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; powerbi config -w &amp;lt;workspace-id&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;5. Go to the directory where you have your Power BI report (.pbix). Import the report file from your local to the workspace on Azure using following command. You would create this file using Power BI Desktop.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; powerbi import -f &amp;lt;./report-file-name.pbix&amp;gt; -n &amp;lt;report-name&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;6. Run following command to get the report-id of the report(s) you have imported in the previous steps.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; powerbi get-reports&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;7. And finally, using the following command, create a secured token for the report(s) you want to embed in your app by providing the report's report-id.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; powerbi create-embed-token -r &amp;lt;report-id&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Once the above steps are done, you will use the secured token created in step #7, the report-id and the embed URL with report-id (&lt;A href="https://embedded.powerbi.com/appTokenReportEmbed?reportId=&amp;lt;report-id" target="_blank"&gt;https://embedded.powerbi.com/appTokenReportEmbed?reportId=&amp;lt;report-id&lt;/A&gt;&amp;gt;) for the report to be embedded in your app.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;HTML code:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&amp;lt;div id="reportContainer" style="height:500px;"&amp;gt;&amp;lt;/div&amp;gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;TypeScript/JS code:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;import * as pbi from 'powerbi-client';

showReport() {
    // Report's Secured Token
    let accessToken = '&amp;lt;ADD-THE-SECURED-TOKEN-FOR-REPORT-HERE&amp;gt;';

    // Embed URL
    let embedUrl = 'https://embedded.powerbi.com/appTokenReportEmbed?reportId=&amp;lt;YOUR-REPORT-ID&amp;gt;';

    // Report ID
    let embedReportId = '&amp;lt;YOUR-REPORT-ID&amp;gt;';

    // Configuration used to describe the what and how to embed.
    // This object is used when calling powerbi.embed.
    // This also includes settings and options such as filters.
    // You can find more information at https://github.com/Microsoft/PowerBI-JavaScript/wiki/Embed-Configuration-Details.
    let config= {
        type: 'report',
        accessToken: accessToken,
        embedUrl: embedUrl,
        id: embedReportId,
        settings: {
            filterPaneEnabled: true,
            navContentPaneEnabled: true
        }
    };

    // Grab the reference to the div HTML element that will host the report.
    let reportContainer = &amp;lt;HTMLElement&amp;gt;document.getElementById('reportContainer');

    // Embed the report and display it within the div container.
    let powerbi = new pbi.service.Service(pbi.factories.hpmFactory, pbi.factories.wpmpFactory, pbi.factories.routerFactory);
    let report = powerbi.embed(reportContainer, config);

    // Report.off removes a given event handler if it exists.
    report.off("loaded");

    // Report.on will add an event handler which prints to Log window.
    report.on("loaded", function() {
        console.log("Loaded");
    });
}&lt;/PRE&gt;&lt;P&gt;I spent quite a lot of time figuring this out. Hope this will save some time for somebody!&amp;nbsp;&lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://community.fabric.microsoft.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;P.S. - Your secured token for the report expires after some time. Don't know the default.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Jan 2017 23:14:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Angular-2-and-Power-BI-Embedded/m-p/112803#M3912</guid>
      <dc:creator>gauz09</dc:creator>
      <dc:date>2017-01-12T23:14:51Z</dc:date>
    </item>
    <item>
      <title>Re: Angular 2 and Power BI Embedded</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Angular-2-and-Power-BI-Embedded/m-p/112969#M3913</link>
      <description>&lt;P&gt;Thanks for your sharing. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Jan 2017 07:59:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Angular-2-and-Power-BI-Embedded/m-p/112969#M3913</guid>
      <dc:creator>Eric_Zhang</dc:creator>
      <dc:date>2017-01-13T07:59:31Z</dc:date>
    </item>
    <item>
      <title>Re: Angular 2 and Power BI Embedded</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Angular-2-and-Power-BI-Embedded/m-p/112993#M3915</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/19683"&gt;@gauz09&lt;/a&gt; wrote:&lt;BR /&gt;&lt;BR /&gt;&lt;P&gt;I spent quite a lot of time figuring this out. Hope this will save some time for somebody!&amp;nbsp;&lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://community.fabric.microsoft.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;P.S. - Your secured token for the report expires after some time. Don't know the default.&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think it expires after 1 hour but I'm not sure. After that you can send a request to obtain a refresh_token (which has longer duration)&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.microsoft.com/azure/active-directory/active-directory-protocols-oauth-code" target="_blank"&gt;https://docs.microsoft.com/azure/active-directory/active-directory-protocols-oauth-code&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Jan 2017 08:43:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Angular-2-and-Power-BI-Embedded/m-p/112993#M3915</guid>
      <dc:creator>GianniB</dc:creator>
      <dc:date>2017-01-13T08:43:28Z</dc:date>
    </item>
    <item>
      <title>Re: Angular 2 and Power BI Embedded</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Angular-2-and-Power-BI-Embedded/m-p/113008#M3916</link>
      <description>&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/19552"&gt;@GianniB&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;Actually you can generate some token never expiring, though not recommended. Check &lt;A href="https://github.com/Azure-Samples/power-bi-embedded-integrate-report-into-web-app/search?utf8=%E2%9C%93&amp;amp;q=CreateReportEmbedToken" target="_self"&gt;power-bi-embedded-integrate-report-into-web-app&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;                var embedToken = PowerBIToken.CreateReportEmbedToken(this.workspaceCollection, this.workspaceId, report.Id, Convert.ToDateTime("2099-12-31"));
&lt;/PRE&gt;</description>
      <pubDate>Fri, 13 Jan 2017 08:57:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Angular-2-and-Power-BI-Embedded/m-p/113008#M3916</guid>
      <dc:creator>Eric_Zhang</dc:creator>
      <dc:date>2017-01-13T08:57:06Z</dc:date>
    </item>
    <item>
      <title>Re: Angular 2 and Power BI Embedded</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Angular-2-and-Power-BI-Embedded/m-p/113319#M3924</link>
      <description>&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/19552"&gt;@GianniB&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/6971"&gt;@Eric_Zhang&lt;/a&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Awesome! Thanks for sharing that info!&lt;/P&gt;</description>
      <pubDate>Fri, 13 Jan 2017 20:35:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Angular-2-and-Power-BI-Embedded/m-p/113319#M3924</guid>
      <dc:creator>gauz09</dc:creator>
      <dc:date>2017-01-13T20:35:59Z</dc:date>
    </item>
    <item>
      <title>Re: Angular 2 and Power BI Embedded</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Angular-2-and-Power-BI-Embedded/m-p/138049#M4765</link>
      <description>&lt;PRE&gt;import { Component, Inject, OnInit, ElementRef }  from '@angular/core';
import { DomSanitizer, SafeHtml } from "@angular/platform-browser";
import { ActivatedRoute }     from '@angular/router';
import { Observable }         from 'rxjs/Observable';
import 'rxjs/add/operator/map';
import * as pbi from 'powerbi-client';
@Component({
    templateUrl: '../../template/dashboard/dashboard.html'
})
export class DashboardComponent implements OnInit {

    PBmodel: pbi.IEmbedConfiguration;
    title: string;
    report: pbi.Report;
    pages: pbi.Page[];
    currentPage: pbi.Page;
    powerbi: pbi.service.Service;
    //report: any;


    constructor(private route: ActivatedRoute) {
        this.title = "Sample Check";    
    }
    
	ngOnInit(){
		this.showReport();
	}
    apply(): void {
       let advanceFilter = {
            $schema: "http://powerbi.com/product/schema#advanced",
            target: {
                table: "Meter",
                column: "MeterDate"
            },
            logicalOperator: "And",
            conditions: [
                {
                    operator: "GreaterThanOrEqual",
                    value: "2017-01-01T00:00:00.000Z"
                },
                {
                    operator: "LessThanOrEqual",
                    value: "2017-01-31T00:00:00.000Z"
                }
            ]
        };
        console.log(advanceFilter);
        console.log(this.report);
        
        this.report.getFilters().then(allTargetFilters=&amp;gt; {
            //for (var i = 0; i &amp;lt; allfilter.length; i++) {
            allTargetFilters.push(advanceFilter);
            //}
            // Set filters
            
            this.report.setFilters(allTargetFilters);
        });
    }

    showReport(PBIData: pbi.IEmbedConfiguration) {

        let config = {
            type: 'report',
            accessToken: PBIData.accessToken,
            embedUrl: PBIData.embedUrl,
            id: PBIData.id,
            settings: {
                filterPaneEnabled: false
            }
        };

        // Grab the reference to the div HTML element that will host the report.
        let reportContainer = &amp;lt;HTMLElement&amp;gt;document.getElementById('pbi-report');

        // Embed the report and display it within the div container.
        
        this.powerbi = new pbi.service.Service(pbi.factories.hpmFactory, pbi.factories.wpmpFactory, pbi.factories.routerFactory);
        this.report = &amp;lt;pbi.Report&amp;gt;this.powerbi.embed(reportContainer, config);
        
        // Report.off removes a given event handler if it exists.
        this.report.off("loaded");

        this.report.on("loaded", this.loadReport);

        this.report.off("pageChanged");

        this.report.on("pageChanged", e =&amp;gt; {
            console.log(e);
            //this.currentPage = e;
            ////pageName.innerText = e.detail.newPage.displayName;

            //if (this.pages.length === 0) {
            //    return;
            //}

            //pageIndex = pages.findIndex(function (el) {
            //    return el.name === e.detail.newPage.name;
            //});
        });
    }

    loadReport()
    {
        this.report.getPages()
            .then(reportPages =&amp;gt; this.pages = reportPages);
        console.log(this.pages);
    }
    &lt;/PRE&gt;</description>
      <pubDate>Tue, 07 Mar 2017 15:10:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Angular-2-and-Power-BI-Embedded/m-p/138049#M4765</guid>
      <dc:creator>Anuj_Shaubhari</dc:creator>
      <dc:date>2017-03-07T15:10:44Z</dc:date>
    </item>
    <item>
      <title>Re: Angular 2 and Power BI Embedded</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Angular-2-and-Power-BI-Embedded/m-p/138051#M4766</link>
      <description>&lt;PRE&gt;import { Component, Inject, OnInit, ElementRef }  from '@angular/core';
import { DomSanitizer, SafeHtml } from "@angular/platform-browser";
import { ActivatedRoute }     from '@angular/router';
import { Observable }         from 'rxjs/Observable';
import 'rxjs/add/operator/map';
import * as pbi from 'powerbi-client';
@Component({
    templateUrl: '../../template/dashboard/dashboard.html'
})
export class DashboardComponent implements OnInit {

    PBmodel: pbi.IEmbedConfiguration;
    title: string;
    report: pbi.Report;
    pages: pbi.Page[];
    currentPage: pbi.Page;
    //report: any;


    constructor(private route: ActivatedRoute) {
        this.title = "Sample Check";    
    }
    
	ngOnInit(){
		this.showReport();
	}
    apply(): void {
       let advanceFilter = {
            $schema: "http://powerbi.com/product/schema#advanced",
            target: {
                table: "Meter",
                column: "MeterDate"
            },
            logicalOperator: "And",
            conditions: [
                {
                    operator: "GreaterThanOrEqual",
                    value: "2017-01-01T00:00:00.000Z"
                },
                {
                    operator: "LessThanOrEqual",
                    value: "2017-01-31T00:00:00.000Z"
                }
            ]
        };
        console.log(advanceFilter);
        console.log(this.report);
        
        this.report.getFilters().then(allTargetFilters=&amp;gt; {
            //for (var i = 0; i &amp;lt; allfilter.length; i++) {
            allTargetFilters.push(advanceFilter);
            //}
            // Set filters
            
            this.report.setFilters(allTargetFilters);
        });
    }

    showReport(PBIData: pbi.IEmbedConfiguration) {

        let config = {
            type: 'report',
            accessToken: PBIData.accessToken,
            embedUrl: PBIData.embedUrl,
            id: PBIData.id,
            settings: {
                filterPaneEnabled: false
            }
        };

        // Grab the reference to the div HTML element that will host the report.
        let reportContainer = &amp;lt;HTMLElement&amp;gt;document.getElementById('pbi-report');

        // Embed the report and display it within the div container.
        
        this.powerbi = new pbi.service.Service(pbi.factories.hpmFactory, pbi.factories.wpmpFactory, pbi.factories.routerFactory);
        this.report = &amp;lt;pbi.Report&amp;gt;this.powerbi.embed(reportContainer, config);
        
        // Report.off removes a given event handler if it exists.
        this.report.off("loaded");

        this.report.on("loaded", this.loadReport);

        this.report.off("pageChanged");

        this.report.on("pageChanged", e =&amp;gt; {
            console.log(e);
            //this.currentPage = e;
            ////pageName.innerText = e.detail.newPage.displayName;

            //if (this.pages.length === 0) {
            //    return;
            //}

            //pageIndex = pages.findIndex(function (el) {
            //    return el.name === e.detail.newPage.name;
            //});
        });
    }

    loadReport()
    {
        this.report.getPages()
            .then(reportPages =&amp;gt; this.pages = reportPages);
        console.log(this.pages);
    }
    &lt;/PRE&gt;</description>
      <pubDate>Tue, 07 Mar 2017 15:17:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Angular-2-and-Power-BI-Embedded/m-p/138051#M4766</guid>
      <dc:creator>Anuj_Shaubhari</dc:creator>
      <dc:date>2017-03-07T15:17:19Z</dc:date>
    </item>
    <item>
      <title>Re: Angular 2 and Power BI Embedded</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Angular-2-and-Power-BI-Embedded/m-p/144090#M4945</link>
      <description>&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/23141"&gt;@Anuj_Shaubhari&lt;/a&gt;, What is this suppose to represent as opposed to the previous HTML posted?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Mar 2017 16:20:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Angular-2-and-Power-BI-Embedded/m-p/144090#M4945</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-03-20T16:20:52Z</dc:date>
    </item>
    <item>
      <title>Re: Angular 2 and Power BI Embedded</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Angular-2-and-Power-BI-Embedded/m-p/144093#M4946</link>
      <description>&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/19683"&gt;@gauz09&lt;/a&gt;, I am new to html. I suppose I combine the HTML and JS in one HTML file and then try to open the file via a browser? I have tried to do this but the page is blank just showing the "import" code on the top.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,bdiouf&lt;/P&gt;</description>
      <pubDate>Fri, 17 Mar 2017 03:14:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Angular-2-and-Power-BI-Embedded/m-p/144093#M4946</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-03-17T03:14:59Z</dc:date>
    </item>
    <item>
      <title>Re: Angular 2 and Power BI Embedded</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Angular-2-and-Power-BI-Embedded/m-p/153633#M5191</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;Thanks for sharing the code. We are able to integrate the power bi reports in our Angular 2 app. But, the problem is, we are seeing empty areas with in the iframe around the report. Is it possible to set viewPage property in the config settings as below. If so, how are we going to get the &lt;STRONG&gt;powerbi-client&lt;/STRONG&gt; using &lt;STRONG&gt;window&lt;/STRONG&gt; object in Angular 2, and use its models to set the &lt;STRONG&gt;pageView&lt;/STRONG&gt;&amp;nbsp;setting on the configuration . Below is not working for us(Source: &lt;A href="https://microsoft.github.io/PowerBI-JavaScript/demo/code-demo/index.html" target="_self"&gt;https://microsoft.github.io/PowerBI-JavaScript/demo/code-demo/index.html&lt;/A&gt; - in edit mode.)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &lt;STRONG&gt;&amp;nbsp; let&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;&amp;nbsp;models&amp;nbsp;=&amp;nbsp;window['powerbi-client'].models;&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;var&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;config&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;=&amp;nbsp;{&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;type:&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;'report'&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;accessToken:&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;this&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;pbiToken&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;embedUrl:&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;CONFIGURATION&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;baseUrls&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;PowerBIEmbedURL&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;+&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;this&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;ReportID&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;id:&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;this&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;ReportID&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;pageName:&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;this&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;PageName&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;permissions:&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;models&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;Permissions&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;All&lt;/SPAN&gt;&lt;SPAN&gt;,&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;pageView:&amp;nbsp;models.PageView.fitToWidth,&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;settings:&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;{&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;filterPaneEnabled:&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;false&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;navContentPaneEnabled:&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;false&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;};&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Apr 2017 21:14:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Angular-2-and-Power-BI-Embedded/m-p/153633#M5191</guid>
      <dc:creator>nagarjunb</dc:creator>
      <dc:date>2017-04-04T21:14:18Z</dc:date>
    </item>
    <item>
      <title>Re: Angular 2 and Power BI Embedded</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Angular-2-and-Power-BI-Embedded/m-p/153638#M5194</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;Thanks for sharing the code. We are able to integrate the power bi reports in our Angular 2 app. But, the problem is, we are seeing empty areas with in the iframe around the report. Is it possible to set viewPage property in the config settings as below. If so, how are we going to get the &lt;STRONG&gt;powerbi-client&lt;/STRONG&gt; using &lt;STRONG&gt;window&lt;/STRONG&gt; object in Angular 2, and use its models to set the &lt;STRONG&gt;pageView&lt;/STRONG&gt;&amp;nbsp;setting on the configuration . Below is not working for us(Source: &lt;A href="https://microsoft.github.io/PowerBI-JavaScript/demo/code-demo/index.html" target="_blank"&gt;https://microsoft.github.io/PowerBI-JavaScript/demo/code-demo/index.html&lt;/A&gt; - in edit mode.)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &lt;STRONG&gt;&amp;nbsp; let&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;&amp;nbsp;models&amp;nbsp;=&amp;nbsp;window['powerbi-client'].models;&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;var&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;config&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;=&amp;nbsp;{&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;type:&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;'report'&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;accessToken:&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;this&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;pbiToken&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;embedUrl:&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;CONFIGURATION&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;baseUrls&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;PowerBIEmbedURL&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;+&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;this&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;ReportID&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;id:&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;this&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;ReportID&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;pageName:&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;this&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;PageName&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;permissions:&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;models&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;Permissions&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;All&lt;/SPAN&gt;&lt;SPAN&gt;,&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;pageView:&amp;nbsp;models.PageView.fitToWidth,&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;settings:&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;{&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;filterPaneEnabled:&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;false&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;navContentPaneEnabled:&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;false&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;};&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Apr 2017 21:26:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Angular-2-and-Power-BI-Embedded/m-p/153638#M5194</guid>
      <dc:creator>nagarjunb</dc:creator>
      <dc:date>2017-04-04T21:26:49Z</dc:date>
    </item>
    <item>
      <title>Re: Angular 2 and Power BI Embedded</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Angular-2-and-Power-BI-Embedded/m-p/153640#M5195</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;Thanks for sharing the code. We are able to integrate the power bi reports in our Angular 2 app. But, the problem is, we are seeing empty areas with in the iframe around the report. Is it possible to set viewPage property in the config settings as below. If so, how are we going to get the powerbi-client using window object in Angular 2, and use its models to set the pageView setting on the configuration . Below is not working for us(Source: &lt;A href="https://microsoft.github.io/PowerBI-JavaScript/demo/code-demo/index.html" target="_blank"&gt;https://microsoft.github.io/PowerBI-JavaScript/demo/code-demo/index.html&lt;/A&gt; - in edit mode.)&lt;BR /&gt;&lt;BR /&gt;let models = window['powerbi-client'].models;&lt;BR /&gt;var config = {&lt;BR /&gt;type: 'report',&lt;BR /&gt;accessToken: this.pbiToken,&lt;BR /&gt;embedUrl: CONFIGURATION.baseUrls.PowerBIEmbedURL + this.ReportID,&lt;BR /&gt;id: this.ReportID,&lt;BR /&gt;pageName: this.PageName,&lt;BR /&gt;permissions: models.Permissions.All,&lt;BR /&gt;pageView: models.PageView.fitToWidth,&lt;BR /&gt;settings: {&lt;BR /&gt;filterPaneEnabled: false,&lt;BR /&gt;navContentPaneEnabled: false&lt;BR /&gt;}&lt;BR /&gt;};&lt;BR /&gt;&lt;BR /&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Apr 2017 21:28:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Angular-2-and-Power-BI-Embedded/m-p/153640#M5195</guid>
      <dc:creator>nagarjunb</dc:creator>
      <dc:date>2017-04-04T21:28:51Z</dc:date>
    </item>
    <item>
      <title>Re: Angular 2 and Power BI Embedded</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Angular-2-and-Power-BI-Embedded/m-p/288847#M8483</link>
      <description>&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;I copied the code to embed power bi report in angular -2 app, but seems like code has errors. Can somebody point me to full code please. Do we have git repository . any help on this well appreciated.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Oct 2017 10:08:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Angular-2-and-Power-BI-Embedded/m-p/288847#M8483</guid>
      <dc:creator>prabhuss</dc:creator>
      <dc:date>2017-10-24T10:08:27Z</dc:date>
    </item>
    <item>
      <title>Re: Angular 2 and Power BI Embedded</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Angular-2-and-Power-BI-Embedded/m-p/408882#M12193</link>
      <description>&lt;P&gt;I am having some dependency issues while using this. Is there something else that you did? Maybe added some extra packages?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 May 2018 13:25:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Angular-2-and-Power-BI-Embedded/m-p/408882#M12193</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-05-02T13:25:50Z</dc:date>
    </item>
    <item>
      <title>Variable 'powerbi' must be of type 'Service', but here has type 'Service'.</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Angular-2-and-Power-BI-Embedded/m-p/436789#M13484</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to embed Power BI report using config having token and filter , but getting this error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a groupId and report Id, which i have added to embedUrl and have given the report id to config.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;node_modules/angular2-powerbi/node_modules/powerbi-client/dist/powerbi.d.ts (13,9): Subsequent variable declarations must have the same type.&amp;nbsp; Variable 'powerbi' must be of type 'Service', but here has type 'Service'.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;my code :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;showReports(projectsListReportLink,listOfProjects,noId) {&lt;BR /&gt;// Get models. models contains enums that can be used.&lt;BR /&gt;var models = window['powerbi-client'].models;&lt;BR /&gt;&lt;BR /&gt;// We give All permissions to demonstrate switching between View and Edit mode and saving report.&lt;BR /&gt;var permissions = models.Permissions.All;&lt;BR /&gt;var projList = this.addSelectedProjectToLink(listOfProjects,noId);&lt;BR /&gt;console.log(projList);&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;var basicFilter = {&lt;BR /&gt;$schema: "&lt;A href="http://powerbi.com/product/schema#basic" target="_blank"&gt;http://powerbi.com/product/schema#basic&lt;/A&gt;",&lt;BR /&gt;target: {&lt;BR /&gt;table: "dim_projects",&lt;BR /&gt;column: "ProjectName"&lt;BR /&gt;},&lt;BR /&gt;operator: "eq",&lt;BR /&gt;values: projList&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;// Report's Secured Token&lt;BR /&gt;let accessToken = 'eyJrIjoiNWFhOGUwN2ItNDBmYS00NzBmLWIyNGMtMjZmYTAwNjNhYzQ0IiwidCI6IjA3ZjAyYzczLTI1NDktNDNiZS05ZWRkLWY5NDc4YmY4MDhlOSIsImMiOjZ9';&lt;/P&gt;&lt;P&gt;// Report ID&lt;BR /&gt;let embedReportId = '3c46197b-6bee-4097-8635-c1fdb01d5058';&lt;/P&gt;&lt;P&gt;// Embed URL&lt;BR /&gt;let embedUrl = '&lt;A href="https://embedded.powerbi.com/appTokenReportEmbed?reportId=3c46197b-6bee-4097-8635-c1fdb01d5058&amp;amp;groupId=49ae0a55-8a74-406f-99f9-6d4e3c23f66c" target="_blank"&gt;https://embedded.powerbi.com/appTokenReportEmbed?reportId=3c46197b-6bee-4097-8635-c1fdb01d5058&amp;amp;groupId=49ae0a55-8a74-406f-99f9-6d4e3c23f66c&lt;/A&gt;';&lt;BR /&gt;&lt;BR /&gt;let config = {&lt;BR /&gt;type: 'report',&lt;BR /&gt;accessToken: accessToken,&lt;BR /&gt;embedUrl: embedUrl,&lt;BR /&gt;filters: [basicFilter],&lt;BR /&gt;id: embedReportId&lt;BR /&gt;};&lt;BR /&gt;&lt;BR /&gt;// Grab the reference to the div HTML element that will host the report.&lt;BR /&gt;let reportContainer = document.getElementById('reportContainer');&lt;/P&gt;&lt;P&gt;// Embed the report and display it within the div container.&lt;BR /&gt;let powerbi = new pbi.service.Service(pbi.factories.hpmFactory, pbi.factories.wpmpFactory, pbi.factories.routerFactory);&lt;BR /&gt;let report = powerbi.embed(reportContainer, config);&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jun 2018 08:51:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Angular-2-and-Power-BI-Embedded/m-p/436789#M13484</guid>
      <dc:creator>upadsha</dc:creator>
      <dc:date>2018-06-11T08:51:04Z</dc:date>
    </item>
    <item>
      <title>Hi  I am trying to embed MS-BI report but getting error....</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Angular-2-and-Power-BI-Embedded/m-p/436792#M13485</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to embed MS-BI report but getting error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have group Id and report Id which i am appending to embedUrl and have set the config as per desc.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Error:&lt;/P&gt;&lt;P&gt;ERROR in C:/Users/Shashikanth.Kumbashi/Desktop/Flex/node_modules/angular2-powerbi/node_modules/powerbi-client/dist/powerbi.d.ts (13,9): Subsequent variable declarations must have the same type.&amp;nbsp; Variable 'powerbi' must be of type 'Service', but here has type 'Service'.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My Code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;showReports(projectsListReportLink,listOfProjects,noId) {&lt;BR /&gt;// Get models. models contains enums that can be used.&lt;BR /&gt;var models = window['powerbi-client'].models;&lt;BR /&gt;&lt;BR /&gt;// We give All permissions to demonstrate switching between View and Edit mode and saving report.&lt;BR /&gt;var permissions = models.Permissions.All;&lt;BR /&gt;var projList = this.addSelectedProjectToLink(listOfProjects,noId);&lt;BR /&gt;console.log(projList);&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;var basicFilter = {&lt;BR /&gt;$schema: "&lt;A href="http://powerbi.com/product/schema#basic" target="_blank"&gt;http://powerbi.com/product/schema#basic&lt;/A&gt;",&lt;BR /&gt;target: {&lt;BR /&gt;table: "dim_projects",&lt;BR /&gt;column: "ProjectName"&lt;BR /&gt;},&lt;BR /&gt;operator: "eq",&lt;BR /&gt;values: projList&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;// Report's Secured Token&lt;BR /&gt;let accessToken = 'myToken';&lt;/P&gt;&lt;P&gt;// Report ID&lt;BR /&gt;let embedReportId = '3c46197b-6bee-4097-8635-c1fdb01d5058';&lt;/P&gt;&lt;P&gt;// Embed URL&lt;BR /&gt;let embedUrl = '&lt;A href="https://embedded.powerbi.com/appTokenReportEmbed?reportId=3c46197b-6bee-4097-8635-c1fdb01d5058&amp;amp;groupId=49ae0a55-8a74-406f-99f9-6d4e3c23f66c" target="_blank"&gt;https://embedded.powerbi.com/appTokenReportEmbed?reportId=3c46197b-6bee-4097-8635-c1fdb01d5058&amp;amp;groupId=49ae0a55-8a74-406f-99f9-6d4e3c23f66c&lt;/A&gt;';&lt;BR /&gt;&lt;BR /&gt;let config = {&lt;BR /&gt;type: 'report',&lt;BR /&gt;accessToken: accessToken,&lt;BR /&gt;embedUrl: embedUrl,&lt;BR /&gt;filters: [basicFilter],&lt;BR /&gt;id: embedReportId&lt;BR /&gt;};&lt;BR /&gt;&lt;BR /&gt;// Grab the reference to the div HTML element that will host the report.&lt;BR /&gt;let reportContainer = document.getElementById('reportContainer');&lt;/P&gt;&lt;P&gt;// Embed the report and display it within the div container.&lt;BR /&gt;let powerbi = new pbi.service.Service(pbi.factories.hpmFactory, pbi.factories.wpmpFactory, pbi.factories.routerFactory);&lt;BR /&gt;let report = powerbi.embed(reportContainer, config);&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can any one help.&lt;/P&gt;&lt;P&gt;Shashi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jun 2018 09:31:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Angular-2-and-Power-BI-Embedded/m-p/436792#M13485</guid>
      <dc:creator>upadsha</dc:creator>
      <dc:date>2018-06-11T09:31:43Z</dc:date>
    </item>
    <item>
      <title>Re: Angular 2 and Power BI Embedded</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Angular-2-and-Power-BI-Embedded/m-p/461509#M14197</link>
      <description>&lt;P&gt;Thanks so much&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/23141"&gt;@Anuj_Shaubhari&lt;/a&gt;. That was a great help getting the PowerBI-Javascript library going with Typescript and Angular 2+.&lt;/P&gt;</description>
      <pubDate>Fri, 13 Jul 2018 03:00:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Angular-2-and-Power-BI-Embedded/m-p/461509#M14197</guid>
      <dc:creator>sdaviesnz</dc:creator>
      <dc:date>2018-07-13T03:00:47Z</dc:date>
    </item>
    <item>
      <title>Re: Angular 2 and Power BI Embedded</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Angular-2-and-Power-BI-Embedded/m-p/476912#M14626</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/23141"&gt;@Anuj_Shaubhari&lt;/a&gt;&amp;nbsp;for the sample code. When i am trying the code i can see the embedded report but&amp;nbsp;the &amp;nbsp;loaded event or in fact any other event doesn't fire.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 31 Jul 2018 20:25:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Angular-2-and-Power-BI-Embedded/m-p/476912#M14626</guid>
      <dc:creator>pkamboj</dc:creator>
      <dc:date>2018-07-31T20:25:16Z</dc:date>
    </item>
    <item>
      <title>Re: Angular 2 and Power BI Embedded</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Angular-2-and-Power-BI-Embedded/m-p/478898#M14690</link>
      <description>&lt;P&gt;Thanks for sharing.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Aug 2018 12:38:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Angular-2-and-Power-BI-Embedded/m-p/478898#M14690</guid>
      <dc:creator>sarfaraz0819</dc:creator>
      <dc:date>2018-08-02T12:38:02Z</dc:date>
    </item>
  </channel>
</rss>

