Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Rusty Swayne 1655 posts 4993 karma points c-trib
    Dec 23, 2014 @ 19:50
    Rusty Swayne
    0

    umbraco.packages module

    Is it now possible to inject your own Angular module in the app?

    This mentions that it was planned in 7.1: http://our.umbraco.org/forum/umbraco-7/developing-umbraco-7-packages/47905-Including-an-angular-module

    I also see that in Umbraco's app.js a "packages" module has been added.

     var app = angular.module('umbraco', [
        'umbraco.filters',
        'umbraco.directives',
        'umbraco.resources',
        'umbraco.services',
        'umbraco.packages',
            'ngCookies',
            'ngSanitize',
            'ngMobile',
            'blueimp.fileupload',
            'tmh.dynamicLocale'
    ]);
    var packages = angular.module("umbraco.packages", []);
    

    Anyone know how this works?

  • Rusty Swayne 1655 posts 4993 karma points c-trib
    Dec 28, 2014 @ 07:10
    Rusty Swayne
    0

    I think I got it ...

     (function() {
    
     angular.module('merchello', [
         'umbraco.filters',
         'umbraco.directives',
         'merchello.filters',
         'merchello.directives',
         'merchello.resources',
         'merchello.services',
          'merchello.mocks'
      ]);
      angular.module('merchello.models', []);
      angular.module('merchello.filters', []);
      angular.module('merchello.directives', []);
      angular.module('merchello.resources', []);
      angular.module('merchello.services', ['merchello.models', 'merchello.resources']);
      angular.module('merchello.mocks', ['merchello.models']);
    
      angular.module('umbraco.packages').requires.push('merchello');
     }());
    

    This tests out in Karma/Jasmine loading 7.2.1 Belle .js files and using

       beforeEach(module('umbraco'));
    
  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies