web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Pages / How to integrate an an...
Power Pages
Answered

How to integrate an angular app into portal?

(0) ShareShare
ReportReport
Posted on by

I have developed an angular 9 app. After production build it has produced several files like 5 JavaScript files, two css files and a html file. 

 

Now I want to integrate this app into my portal app.

 

I have attached all js files from portal manager into a single web file as notes. 

I have attached two css files from portal manager into a single css file as notes.

 

Added 

Content Snippet -> Tracking Code -> Value:

<script type="text/javascript" src="/test.js" />

 

Added the html code: 

<app-root></app-root>
 
in the home page using studio editor
 
but no output is rendering.
 
Categories:
I have the same question (0)
  • OOlashyn Profile Picture
    3,496 Most Valuable Professional on at

    Hi @Anonymous,

     

    Please see this article from Inogic where they show an example of using angular with the portal.

  • justinburch Profile Picture
    Microsoft Employee on at

    Hi @Anonymous,

    When you say you attached all generated JS files as Notes in a single Web File, do you mean multiple attachments or combined all JS into a single attachment? The Portal will only use the latest Note attachment of a Web File. You should have a Web File for each generated file and use script tags to include each. The new Dynamics Marketing app is a great example of what to do, as it's sample website is built on Angular (albeit a much older version).

    https://docs.microsoft.com/en-us/dynamics365/marketing/developer/manually-overwriting-sample-website has the import solutions for the latest versions.

    Here is their single page app Template, note that you will need to adjust to fit your needs:

    <!doctype html>
    <html lang="en">
    <head>
     <meta charset="utf-8">
     <title>Event Management</title>
     <base href="/">
     <meta name="token" content="{{ request.params['__RequestVerificationToken'] }}">
     <meta name="viewport" content="width=device-width, initial-scale=1">
     <link rel="stylesheet" href="eventmanagementapp/styles.css">
    </head>
    <body>
     <app-root></app-root>
     <script type="text/javascript" src="eventmanagementapp/runtime.js"></script><script type="text/javascript" src="eventmanagementapp/polyfills.js"></script><script type="text/javascript" src="eventmanagementapp/scripts.js"></script><script type="text/javascript" src="eventmanagementapp/main.js"></script>
    </body>
    </html>
  • Verified answer
    Community Power Platform Member Profile Picture
    on at

    Thanks @justinburch , I already have resolved the issue making individual files for all of them then added them as script tags. It works fine.

  • ragavanrajan Profile Picture
    7,044 Most Valuable Professional on at

    Hi @justinburch  and @Anonymous , 

     

     Thank you for this.  I am getting an error when I try to upload my build files under "Web Files" Note attachment. 

     

    ragavanrajan_0-1606356467265.png

     

    I have few JS file with extension.js created when the build was completed. But I created new web file and trying to upload. Kindly let me know how to proceed further. 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Pages

#1
Fubar Profile Picture

Fubar 74 Super User 2025 Season 2

#2
Jerry-IN Profile Picture

Jerry-IN 55

#3
sannavajjala87 Profile Picture

sannavajjala87 31

Last 30 days Overall leaderboard