2

I am wondering why do I get different code generated from the rest of the mean app. What I mean exactly is this - when I run yo meanjs:angular-config I get a file that looks like this:

(function() {
  'use strict';

  // My Module module config
  angular
    .module('my-module')
    .run(menuConfig);

  menuConfig.$inject = ['Menus'];

  function menuConfig(Menus) {
    // Config logic
    // ...
  }
})();

I know that this is ok, but I am interested why don't I get a code block that looks like in the other mean modules, like this:

'use strict';

// Configuring the Articles module
angular.module('users.admin').run(['Menus',
  function (Menus) {
    Menus.addSubMenuItem('topbar', 'admin', {
      title: 'Manage Users',
      state: 'admin.users'
    });
  }
]);

Why is there a difference? I use version 0.4.2 of meanjs. How can I generate code like in the second code block I posted? I did see some video tutorials where they use the same console command and the same version of meanjs as I do and they get the "expected" code generated.

Aksiom
  • 1,565
  • 4
  • 25
  • 39

1 Answers1

0

Are you watching the MEAN Stack Honolulu Challenge by chance? I'm having compatibility issues with MEAN 0.4.2 and that series myself.

adamfhelm
  • 35
  • 8
  • Actually I watched this tutorial MEANJS Tutorial: http://www.youtube.com/playlist?list=PL3ROxRkuc_Iifz18F1V5Jki7uWrKQkK7g ... Saw also the one you mentioned but I think she uses "pure" yo generator if that makes sense. – Aksiom Jun 03 '16 at 15:11