I would like to have a clean main.js and for this I want to move the directives into an external file. That is, to do something like and in an external file My version of course does not work, how to do it correctly Answer define them in a separate file like : then import them in main.js and loop