How to manage Angular2 “expression has changed after it was checked” exception when a component property depends on current datetime

My component has styles that depend on current datetime. In my component I’ve got the following function. private fontColor( dto : Dto ) : string { // date d’exécution du dto let dtoDate : Date = new Date( dto.LastExecution ); (…) let color = “hsl( ” + hue + “, 80%, ” + (maxLigness – … Read more

What’s the difference between an Angular component and module

I’ve been watching videos and reading articles but this specific article make me so confused, at the start of the article it says The applications in Angular follow modular structure. The Angular apps will contain many modules, each dedicated to the single purpose. Typically module is a cohesive group of code which is integrated with … Read more

React component initialize state from props

In React, are there any real differences between these two implementations? Some friends tell me that the FirstComponent is the pattern, but I don’t see why. The SecondComponent seems simpler because the render is called only once. First: import React, { PropTypes } from ‘react’ class FirstComponent extends React.Component { state = { description: ” … Read more

What does OSGi solve?

I’ve read on Wikipedia and other sites about OSGi, but I don’t really see the big picture. It says that it’s a component-based platform, and that you can reload modules at runtime. Also the “practical example” given everywhere is the Eclipse Plugin Framework. My questions are: What is the clear and simple definition of OSGi? … Read more