JavaScript Simple RequireJS, AngularJS, Electron App, Dependencies not Executing

I am writing my first Electron/Angular/RequireJS single page desktop app. I started with the electron-boilerplate and it works great. However, I need to add AngularJs to the equation--the boiler plate already uses RequireJS. I've tried a number of solutions but I either get errors, or dependencies not being executed. So I tried to implement the simple example from a previous stack overflow question, "Simple requireJS with angularJS - angular is not defined". However, what I see is that the files are being parsed, but it never executes the code inside. It's almost like one or more of the dependencies are not met so they do not execute. My files are as follows--I have added some logging so I can easily see the execution path.

app.html -- The starting point that includes RequireJS.

<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <title>Electron Boilerplate</title>
</head>
<body ng-app="ReqApp" ng-controller="GreetCtrl">

    <h1>{{greeting}}!</h1>
    <script data-main="require_config" src="vendor/require.js"></script>

</body>
</html>

require_config.js -- This contains the RequireJS configuration.

console.log("REQUIRE_CONFIG.JS-------------"+requirejs.version);    
requirejs.config({
    // alias libraries paths
  paths: {
    'domReady':      './vendor/requirejs-domready',
    'angular':       './node_modules/angular/angular',
    'GreetCtrl':     './js/GreetCtrl',
    'app':           './js/app'
  },
  // angular does not support AMD out of the box, put it in a shim
  shim: { 'angular': { exports: 'angular' }
  },
  // kick start application
  deps: ['./bootstrap']
});

bootstrap.js -- File from the RequireJS deps to manually bootstrap AngularJS.

console.log("BOOTSTRAP.JS1-------------");
define([
    'require',
    'angular',
    'app'
], function (require, ng, app) {
    'use strict';

    console.log("BOOTSTRAP.JS2+++++++++++++");
    require(['domReady!'], function (document) {
        console.log("BOOTSTRAP.JS+++++++++++++");
        ng.bootstrap(document, ['ReqApp']);
    });
});

./js/app.js -- This initializes the AngularJS module for the application.

console.log("APP.JS-------------"+requirejs.version);
define([
  'angular',
  'GreetCtrl'
], function (ng) {
  'use strict';

  console.log("APP.JS+++++++++++++");
  return ng.module('ReqApp', [ 'ReqApp.GreetCtrl' ]);
});

./js/GreetCtrl.js

console.log("GREETCTRL.JS1-------------");
define(['angular'], function(angular) {
    console.log("GREETCTRL.JS1+++++++++++++");
    angular.module( 'ReqApp.GreetCtrl', [])
    .controller( 'GreetCtrl', function GreetCtrl ($scope) {
         $scope.greeting = "Hello World";
    });
});

The console output from running this example is:

[16982:0917/115914:ERROR:browser_main_loop.cc(173)] Running without the SUID sandbox! See https://code.google.com/p/chromium/wiki/LinuxSUIDSandboxDevelopment for more information on developing with the sandbox on.
[17010:0917/115915:INFO:renderer_main.cc(200)] Renderer process started
[17014:0917/115915:INFO:renderer_main.cc(200)] Renderer process started
[16982:0917/115915:ERROR:browser_gpu_channel_host_factory.cc(146)] Failed to create channel.
[16982:0917/115915:INFO:CONSOLE(43)] "REQUIRE_CONFIG.JS-------------2.1.20", source: file:///home/swdev/projects/build/require_config.js (43)
[16982:0917/115915:INFO:CONSOLE(8)] "BOOTSTRAP.JS1-------------", source: file:///home/swdev/projects/build/bootstrap.js (8)

The pages output is:

{{greeting}}!

As you can see from the output it seems that only the require_config.js and bootstrap.js files are parsed but the code within the define is not executed. My questions are:

  1. Why is the bootstrap.js function never called?
  2. Why are the app.js and GreetCtrl.js files not even parsed?
  3. Since Electron uses node I have to use requirejs, do I need to remove my use of require from bootstrap.js and replace it with requirejs as well? NOTE: I have tested changing this but it did nothing for my problem.
  4. I did notice that the stack overflow example that I followed defines ng-app="ReqApp" within the HTML body definition. My limited understanding is that this should be removed since we are manually bootstrapping AngularJS. What is the correct approach for my use case (Election(node)/RequireJS/AngularJS? NOTE: I have tested by removing the definition from the body definition and it did nothing for my problem.

I have spent a few days attempting to solve this problem, so any help would be much appreciated!


Additional Attempts: Played some more to simplify part of the problem. I can't seem to get RequireJS to execute or parse some dependencies. My simplification is:

./app.js

<!doctype html>
<html>
<head>
    <title>Electron Boilerplate</title>
</head>
<body >
    <script data-main="require_config" src="vendor/require.js"></script>
    <h1>Hello World!</h1>
</body>
</html>

./require_config.js

console.log("REQUIRE_CONFIG.JS-------------"+requirejs.version);
requirejs.config({
    paths: {
    'app': './js/app'
  },
  // kick start application
  deps: ['./bootstrap']
});

./bootstrap.js

console.log("BOOTSTRAP.JS1-------------");
define( ['app'], function (app) {
    'use strict';
    console.log("BOOTSTRAP.JS2+++++++++++++");
});

./js/app.js

console.log("APP.JS-------------");
define([], function () {
  'use strict';
  console.log("APP.JS+++++++++++++");
});

The resulting output is still the same as my original output above. boostrap.js and require_config.js are processed. The bootstrap.js define/function is never called and app.js is never parsed.

Answer:1

I have 4 paragraphs <p>. I need to select every paragraphs except leaving the first two paragraphs on this structure: <div class="right"> <a></a> <p>heading</p>...

I have 4 paragraphs <p>. I need to select every paragraphs except leaving the first two paragraphs on this structure: <div class="right"> <a></a> <p>heading</p>...

  1. selection sunday
  2. selection sort
  3. selection sunday 2020
  4. selection bias
  5. selection of incident commanders is done by the
  6. selection series
  7. selection definition
  8. selection pressure
  9. selection synonym
  10. selection bias definition
  11. selection show
  12. selection effect
  13. selection day
  14. selection and speciation pogil
  15. selection coefficient
  16. selection sort c++
  17. selection the war between women
  18. selection sort python
  19. selection committee
  20. selection sort time complexity

I am trying to contenteditable attribute of summernote html editor pluging making false on page loading , but it doesnt affect. Here My JS Code: <script> $(function(){ $('div#...

I am trying to contenteditable attribute of summernote html editor pluging making false on page loading , but it doesnt affect. Here My JS Code: <script> $(function(){ $('div#...

This is how I import all collection declarations with methods, fixtures and publications now: import './news/collection.js'; import './news/methods.js'; if (Meteor.isServer) { import './news/...

This is how I import all collection declarations with methods, fixtures and publications now: import './news/collection.js'; import './news/methods.js'; if (Meteor.isServer) { import './news/...

  1. import dynamic path js
  2. import dynamic path
  3. react import dynamic path
  4. javascript import dynamic path
  5. typescript import dynamic path
  6. es6 import dynamic path
  7. webpack import dynamic path
  8. sass import dynamic path
  9. scss import dynamic path
  10. nodejs import dynamic path
  11. vue import dynamic path
  12. python import dynamic path
  13. dynamic import variable path
  14. dynamic import relative path
  15. dynamic import absolute path
  16. vuejs dynamic import path
  17. babel dynamic import path

I am using ng-mask in my code. <input type="text" class="form-control datepicker_cal" datepicker-popup="MM/dd/yyyy" min-date="startDate" name="{{dobName}}" max-date="endDate" mask="99/99/9999" ng-...

I am using ng-mask in my code. <input type="text" class="form-control datepicker_cal" datepicker-popup="MM/dd/yyyy" min-date="startDate" name="{{dobName}}" max-date="endDate" mask="99/99/9999" ng-...

  1. angular edit mask