Once I finally got my forms working fine with mongoose and the content was saved in my mongodb, I needed to add a display mode for my videos. So far you could only edit/add videos so in terms of results, now having ‘watch’ mode is finally delivering some content to the website which makes me happy!
VideoDetailsComponent I have created a new one (
VideoWatchComponent), which is responsible for displaying the video. I will also have to extract the ‘Edit/New’ mode template which is linked with the forms and editing video content. The idea for now is that I will display either of those, depending on some ‘mode’ parameter that I keep in the model and pass/receive using routing (via url). In order to display/hide the appropriate component I will use the
*ngIf directive from Angular 2. I don’t like this approach, it looks ugly.
I am not sure how does one do this in Angular 2 ‘the cool way’, maybe you, dear reader, have some idea to share with me? I didn’t find anything interesting on the web.
Till now only youtube videos are displayed. The displaying stuff is rather simple – it’s solved by embedding the content (iframe). Next ones will be Vimeo and Channel9. I would appreciate, dear reader, any feedback about other websites that are hosting videos that may be related to .NET and are exposing API to display movies via iframe or in any other way (HTML video tag?). I need to make sure this can be done easily and will work fine. Then I will switch to the next tasks, which there’s a full list of.
I started to create some unit/end-to-end tests for my components, but totally don’t know how to run it with the configuration I have. It’s coming from some MEAN starter and after all these days spent on this project, I can clearly say it’s too complex and too many useless things have been added there, what made the complexity much higher and made me waste a lot of time on debugging this config stuff. If I start next application like that, this will be a clean start with no dependencies I am unaware of.
The list of #todos is very long, wich is good 🙂 The time is always very short, which is bad. Stay tuned.