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?
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.
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.
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?
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: https://our.umbraco.com/forum/umbraco-7/developing-umbraco-7-packages/47905-Including-an-angular-module
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:
angular.module('myApp', ['angularUtils.directives.dirPagination']);
I tried:
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.
Hi MB,
If you just want pagination you can use the built-in directive : https://our.umbraco.com/apidocs/ui/#/api/umbraco.directives.directive:umbPagination
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.
Dave
is working on a reply...