How to add plugins and directives in an angular-meteor app


#1

Hi!
i’m actually working on an app similar to the one on angular-meteor.com. i’m working with a theme full of plugins and i don’t know how to make them work on my app.
i also want to add custom directives on my modules based on attribute name but it doesn’t work. this i a sample of my socially like file Comparateur.js

import ocLazyLoad from ‘oclazyload’;
import uiBootstrap from ‘angular-ui-bootstrap’;

import ‘./comparateur.html’;
import {name as LandingPage} from ‘…/landingPage/landingPage’;

class Comparateur {}

const name = ‘comparateur’;

// create a module
export default angular.module(name, [
angularMeteor,
uiRouter,
LandingPage,
ocLazyLoad
]).component(name, {
templateUrl: imports/ui/components/${name}/${name}.html,
controllerAs: name,
controller: Comparateur
})
.directive(‘landing-scrollspy’, function () {
return {
restrict: ‘A’,
link: function (scope, element, attrs) {
element.scrollspy({
target: ‘.navbar-fixed-top’,
offset: 80
});
}
}
})
.config(config)

function config($stateProvider,$locationProvider, $urlRouterProvider, $ocLazyLoadProvider) {
‘ngInject’;

$locationProvider.html5Mode(true);

$urlRouterProvider.otherwise('/landingPage');

$ocLazyLoadProvider.config({
    // Set to true if you want to see what and when is dynamically loaded
    debug: true
});

}

please help!!