How to use 3rd party Angular component/directive in BackOffice
I'm wanting to use a 3rd party Angular component/directive in my BackOffice custom section. But how should I do this. I´m new to Angular and how it is integrated with Umbraco. Been googling, reading and testing for a while (hours) without finding a solution.
I have a working controller (js) that is setting up my current model ($scope) for my view (html).
How to use 3rd party Angular component/directive in BackOffice
I'm wanting to use a 3rd party Angular component/directive in my BackOffice custom section. But how should I do this. I´m new to Angular and how it is integrated with Umbraco. Been googling, reading and testing for a while (hours) without finding a solution.
I have a working controller (js) that is setting up my current model ($scope) for my view (html).
Lets say I want to use the "simple" pagination component
ngx-pagination
: https://github.com/michaelbromley/ngx-paginationI get it down via npm but after that? What's the next step in getting it up so I can actually use the
<pagination-controls>
in my view?Hi Carl,
Never tried it. But I think it is a matter of registering the javascripts through a package.manifest file so they get loaded by the backend.
Don't know if the pagination thing is just an example, but there is already a directive for that in Umbraco core : https://our.umbraco.com/apidocs/ui/#/api/umbraco.directives.directive:umbPagination
Dave
The pagination component in my scenario above is just an example.
I've tried to include the script via the package manifest but it doesn't like the '{' on the first row of the js file being included: 'import {.....'
I don't think import is supported in javascript.
This is something when running on NodeJs. I think you need to include the scripts from the build output.
Dave
is working on a reply...