Well, now we can fetch RSS feeds. But the plan was to have a manageable menu of feeds. I think, we can represent the menu in an array of items, where each item can be described with the following interface:
./app/ts/Interfaces/index.ts
export interface IMenuItem { url: string; title: string; id: string; }
As for the service itself, let's also start with the interface:
./app/ts/Services/IMenu.ts
import { IMenuItem } from "../Interfaces"; export interface IMenu { items: IMenuItem[]; clear(): void; remove( url: string ): IMenuItem[]; add( url: string, title: string ): IMenuItem[]; load(): IMenuItem[]; }
To some degree, it's like Test-Driven development. We describe the contents of the class without implementation to get the whole picture. Then, we populate the members one by one:
./app/ts...