Implementing VideoGular 2 in an ionic project

Hey everyone,
I was trying to implement videogular 2 in my project,
but in the videogular 2 website get started section they said I should
add this code to the .angular-cli.json, but I can’t seem to find it’s equivalent in ionic,

{
   ...
   "apps": [
       {
           ...
           "styles": [
               "../node_modules/videogular2/fonts/videogular.css",
               "styles.scss"
           ],
           ...
       }
   ],
   ...
}

does anyone know the best way to implement this component ?

Add to package.json:
,
“config”: {
“ionic_sass”: “./src/config/sass.config.js”,
“ionic_copy”: “./src/config/copy.config.js”
}

Add config folder to SRC - contains ‘sass.config.js’

Add to themes/variables.scss:
@import “videogular”;

Copy fonts folder with videogular fonts in it to scr/assets

Add to app.module.ts:
// Videogular2 imports

import {VgCoreModule} from ‘videogular2/core’;

import {VgControlsModule} from ‘videogular2/controls’;

import {VgOverlayPlayModule} from ‘videogular2/overlay-play’;

import {VgBufferingModule} from ‘videogular2/buffering’;

…and add to imports:
VgCoreModule,
VgControlsModule,
VgOverlayPlayModule,
VgBufferingModule

1 Like

Thanks shepard, it worked!

Hi Xdabier

Could you please share a basic project that you have working, I’m trying to implement videogular 2 in my project, and I seems to be having issues with the lazy loading of the components and would love to see how you got it working.

Thank you in advance

Regards

Oliver

It is working perfectly fine. Please let me know if you have any issue. https://stackoverflow.com/questions/54366131/where-to-put-angular-cli-json-content-on-ionic-3-app