locked
Use Angular 2 in CRM RRS feed

  • Question

  • Hello,

    I am trying to use Angular 2 in CRM i.e. I am trying to load the files using "require and "SystemJs" but facing the issue. So has anybody ever use the Angular 2 in CRM? If yes, then can you please tell me the steps you are following. 
    Tuesday, August 22, 2017 7:45 AM

All replies

  • Hi,

    We are trying to use Angular 2 in CRM i.e. trying to load the files using "SystemJs" in my HTML file. Below is the code snippet.

    <html>
    <head>
        <title>Angular start</title>
        <script src="./node_modules/core.js/client/shim.min.js"></script>
        <script src="./node_modules/zone.js/dist/zone.js"></script>
        <script src="./node_modules/systemjs/dist/system.src.js"></script>
        <script src="system.config.js"></script>
    <script>     
            SystemJS.import("../new_/TypeScriptFiles/Main.js")
        </script>
    </head>

    Here is the error we are getting.

    So has anybody ever use the Angular 2 in CRM? If yes, then can you please tell me the steps you are following.

    Thanks!

    Balasaheb


    Balasaheb

    Tuesday, August 22, 2017 9:19 AM
  • Does anyone worked on it?

    Balasaheb

    Tuesday, August 22, 2017 1:27 PM
  • Hello,

    Can you please provide url of webresource you mentioned and can you confirm that you imported that js webresource you're trying to load in your script?


    Dynamics CRM/Business Solutions MVP
    Read My blog

    Tuesday, August 22, 2017 5:40 PM
    Moderator
  • Hi,

    You probably need to import the Angular javascript files as web resources and then reference them from within your code with the CRM structures.

    Its seems you are trying to load your files from a directory not within the CRM structures, which is a security feature.

    regards,

    Don

    • Proposed as answer by Moh Helper Monday, September 4, 2017 9:37 AM
    Monday, September 4, 2017 3:16 AM