The Notifier component

We can set the default values for the form controls inside the Notifier component, but ideally we need a mechanism that loads the configuration settings for the notifier template from a database. That means when we update the settings inside the notifier page to something like notify me via email about the news with ranks higher than 7, then we need to save this settings somewhere to make sure the next time we open the application we won't roll back to the default settings.

That sounds like posting a JSON object to the Firebase database. The JSON object can be defined as follows:

'notifier-config': { 
  'notify'   :'true', 
  'notifier' :'email', 
  'threshold':'medium rated' 
} 

So let's start by defining the default values. Although ...

Get Angular Services now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.