Ionic-angular module load problem


#1

I’m using this boilerplate (its use gulp and browserify) for my app , when I’m trying to add Ionic and Ionic-angular its wont load and modules and directive not working its look like its dont load them at all .

main.js :

import angular from 'angular'

// angular modules
import constants from './constants';
import onConfig  from './on_config';
import onRun     from './on_run';
import 'angular-ui-router';
import 'angular-animate';
import 'angular-timeago';
import 'angular-resource';
import 'angular-sanitize';
import 'ionic';
import 'ngstorage';
import './templates';
import './filters';
import './controllers';
import './services';
import './directives';

// create and bootstrap application
const requires = [
  'ui.router',
  'ngStorage',
  'ngAnimate',
  'ngResource',
  'ngSanitize',
  'yaru22.angular-timeago',
  'ionic',
  'templates',
  'app.filters',
  'app.controllers',
  'app.services',
  'app.directives'
];

// mount on window for testing
window.app = angular.module('app', requires);

angular.module('app').constant('AppSettings', constants);

angular.module('app').config(onConfig);

angular.module('app').run(onRun);

angular.bootstrap(document, ['app'], {
  strictDi: true
});

I’m just copied all ionic libs to node_modules under ‘ionic’ folder and was created an index.js file with this content :

node_modules/ionic/index.js:

require('./js/ionic');
require('./js/ionic-angular');

this will run without error but as I said directives basicly ionic-angular won’t load at all .

any suggestion ?


#2

Check id Js files are loaded properly. Load the pages in browser and with inspect element feature check if all js files are loaded or not