Implementing VideoGular 2 in an ionic project


#1

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 ?


#2

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


#3

Thanks shepard, it worked!


#4

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