Select to view content in your preferred language

Using external libraries in the html of a custom widget?

2046
0
01-25-2016 01:34 PM
LanceVarney
Emerging Contributor

Has anyone had success in integrating an external library like Angular or Knockout on a custom widget?  I am creating a repeatable html template so we can format the output.

I can get this to work on the index.html page of app builder:

*************************

<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script>

<div ng-app="" ng-init="names=['Jani','Hege','Kai']">

                <p>Looping with ng-repeat:</p>

                <div ng-repeat="x in names">

                    <p>

                        {{ x }}

                    </p>

                </div>

</div> 

*************************

But, when I do the same thing in the widget.html, it ignores angular in html.  Even if the angular.js file gets loaded in the the index.html page.

Even a simple <script>Alert("hello");</script> will not work in the widget.html.

Any direction would be much appreciated!

0 Kudos
0 Replies