I need to know how do I use the VgFullscreenAPI. The official documentation doesn’t help. This is what I have: I have tried using the output event emitter (onChangeFullscreen) on vg-plater, vg-fullscreen, and video tags. Documentation Answer The event is provided by the VgFullscreenAPI service inside VgPlayer, you can access it like this inside your component class: Don’t really know
Tag: angular
What is the difference between subscription.unsubscribe() and subscription.remove()?
I am using Angular 5 and have subscribed an observable using the subscribe() method. I want to know if only calling the unsubscribe() method on the subscription will be sufficient to cleanup everything, or should I also call remove() method? code snippet: ` ` Answer .remove remove the subscription from an internal list, but it does not unsubscribe. .unsubscribe clean
Shared module imported in AppModule
I was reading the Angular documentation about modules, looking for a line that discourages importing a SharedModule inside the AppModule. I didn’t find anything about that, just a GitHub issue which states that it’s better not to import it. However without any deep explain… https://github.com/tomastrajan/angular-ngrx-material-starter/issues/47 Angular discourages providing services in the Shared modules, which indeed I agree. But nothing else.
angular 7 does not ask if to use routing when i create a new project
I was formerly using Angular version 6, now I have upgraded to 7. But when I try to create a new project in CLI using ng new [app-name] it just starts without asking if I want to include routing in my project or the styling. P.S: I have the latest version of Angular i.e 7.0.2. Answer ng new {Project-name} command
filtering array in range of array time and time now javascript
i get some trouble when i try to filtering time now in array time, i have code like this ; the problem is output not same with my expectation. i want : if timeNow is 08, timeShift output(selected) is 08, if timeNow is 07, timeShift output(selected) is 06, if timeNow is 09, timeShift output(selected) is 08, if timeNow is 23,
ionic serve gives error in Chrome: Illegal constructor in CreateClass in core.js
I have recently taken over an Ionic project and working on getting it to work. The project runs on device, but I’m trying to get it to work in browser as well. I have updated to the newest versions for plugins and dependencies, but now I’m stuck on a strange javascript error in Chrome console. After this error appeared, the
How should I reference assets in angular custom element (Web Components)
I have created a web component and I referenced image from my asset folder in there as below on local everything is fine, I published my custom element to firebase host and javascript, css and asset folder already exist on my host. then I tried to use my web component in another html peage as below and served this via
Checking ‘undefined’ or ‘null’ of any Object
I am working on Angular project and time to time I used to have check undefined or null over Object or it’s properties. Normally I use lodash _.isUndefined() see example below: I couldn’t see any problem with it. But I had discussion with my colleague during review of above code. He was telling me that if i gets undefined before
How can I use moment.js to add days, excluding weekends?
I’m setting a default follow-up date two days from current date, which currently works: However, I would like to exclude weekends. So I installed moment WeekDay, but I can’t seem to get it to work with adding days to the current date. The documentation calls for: But I can’t get that to work with adding in two days forward. Any
Angular 4 setTimeout() with variable delay and wait
I have a list of events with timestamp. What I want is to display the events based on the timestamp: To add a delay: I know this doesn’t work well with setTimeout, but there is an workaround, if the timeout is constant, in my case is not. Is it possible to make the next setTimeout() wait for the previous one?