Jose Anand
Jose Anand

Reputation: 35

RequireJS and Dojo conflicts

We are developing widgets using AngularJS and RequireJS. These widgets are imported inside an application which uses Dojo which internally has Require implementation.

Because of this architecture, widgets RequireJS are not working. I checked RequireJS http://requirejs.org/docs/dojo.html but not able to understand.

We are importing our widgets like below:

    <script src="dojo.js"></script>

    <!--Widget Snippet starts-->
    <div ng-controller="MySnippetController">
             <widget></widget>
    </div>
    <script src="vendor/require.js" data-main="main.js"></script>
    <!--Widget Snippet ends-->

In the above snippet, dojo.js has inbuilt RequireJS implementation which doesn't initialize our widget snippet.

Please help with some examples.

Upvotes: 0

Views: 400

Answers (1)

C Snover
C Snover

Reputation: 18766

Either load dojo.js, or load RequireJS. Do not load both. They are both compliant AMD loaders so you only need one or the other.

Upvotes: 1

Related Questions