Copied to clipboard

Flag this post as spam?

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

  • MB 108 posts 397 karma points
    Nov 16, 2018 @ 05:30

    Plug-In - Angular Directives

    In wanting to use Angular directives, I've tried using using angular.module('umbraco', [directives]).controller(bla-bla-bla) but all I seem to manage to do is cause the backoffice to lockup and stop working.

    Are directives (such as Bootstrap pagination) supported, and if so, how?

  • Dan Diplo 1553 posts 6170 karma points MVP 4x c-trib
    Nov 16, 2018 @ 09:50
    Dan Diplo

    If I understand you, you want to include a 3rd party Angular module and use it's directives?

    You can add a module using this syntax at the top of your controller:


    For more context, read:

  • MB 108 posts 397 karma points
    Nov 16, 2018 @ 21:34

    Thanks - I had seen and read that thread, but haven't had much luck with it.

    I was trying to add dirPagination as it's normally simple a table pagination directive to use.

    The standard use of this would be:

    1. load script
    2. add to your app:

    angular.module('myApp', ['angularUtils.directives.dirPagination']);

    I tried:

    1. add dirPagination.js to the manifest
    2. change the startup of the controller to be:

    var app = angular.module('umbraco'); app.requires.push('angularUtils.directives.dirPagination'); app.controller('myControllerName', myControllerReference);

    However, all I managed to do was cause the back-office to throw some script errors relating to an unexpected token < and an unknown module... causing the backoffice to stop working until I remove the offending lines.

  • Dave Woestenborghs 3430 posts 11699 karma points MVP 7x admin c-trib
    Nov 16, 2018 @ 10:10
    Dave Woestenborghs

    Hi MB,

    If you just want pagination you can use the built-in directive :

    Personally I have built a lot of backend customizations and I never had the need for a 3rd party plugin. I can do most things with the directives already available. And a bonus is when you use these directives everything will have the same look and feel of the rest of the backoffice.


Please Sign in or register to post replies

Write your reply to: