ES6 Uncaught TypeError: xxx is not a function
<p>I have a module entry point init.js as follows,</p>

<pre><code>import $ from 'platform!jquery';
import angular from 'platform!angular';
import ngRoute from 'platform!angular-route';
import kendo from 'platform!kendo-ui';
import DemoModuleMain from './scripts/app.min';

export function render(containerElement, startingRoute, platform) 
{
$.ajax({
    url: platform.proxyUrl('/content/Default.aspx'),
    success: function (template) {
        containerElement.innerHTML = template;
        DemoModuleMain.main(platform);
        angular.bootstrap(containerElement, ['myApp']);
    },
    error: function (a, b, error) {
        containerElement.innerHTML = "Error: " + error;
    }
})
}
</code></pre>

<p>Then the app.min.js file</p>

<pre><code>import UserService from './services/UserService';
import UserController from './controllers/UserController';
import {UpperFilter, LowerFilter} from './filters/TextFilters';
import ClientInformation from './directives/ClientInfo';
import ocLazyLoad from '../libs/ocLazyLoad.min.js';

class DemoModuleMain
{
 constructor(){
    alert('init');
 }

 main(platform){
    this._platform = platform;
    var mainApp = angular.module('myApp', ['ngRoute','oc.lazyLoad']);
    mainApp.controller('UserController', UserController)
                 .service('UserService', UserService)
                 .filter('upper', UpperFilter)
                 .filter('lower', LowerFilter)
                 .directive('clientInfo', ClientInformation);

    mainApp.paths = {
        baseurl: 'extModReq/ngmod/',
        apiurl:'extModReq/ngmod/content/Default.aspx'
    };

    mainApp.constant('BASE_URL', mainApp.paths.baseurl);
    mainApp.constant('API_URL', mainApp.paths.apiurl);

    mainApp.config(function ($routeProvider, BASE_URL) {
        $routeProvider
                .when('/Client/:param', {
                    templateUrl: BASE_URL+'content/Client.html'
                })          
                .otherwise({
                    redirectTo: '/'
                });
    });
  }
}

export default DemoModuleMain;
</code></pre>

<p>I am getting the error "Uncaught TypeError: DemoModuleMain.main is not a function" at DemoModuleMain.main(platform); What could be the problem?</p>