IonicDB is a cloud-hosted real-time database without the worry of scalability, data management, and security. If you have any exposure working with Firebase or Parse, IonicDB is quite similar to those.
A simple example of using IonicDB is as follows:
import {Database} from '@ionic/cloud-angular';
@Component({
selector: 'todos-page'
})
export class TodosPage {
public todos: Array < string > ;
constructor(private db: Database) {
db.connect();
db.collection('todos').watch().subscribe((todos) => {
this.todos = todos;
}, (error) => {
console.error(error);
});
}
createTodo (todoText: string) {
this.db.collection('todos').store({ text: todoText, isCompleted: false });
}
}
Refer to http://docs.ionic.io/services/database/ for more options on IonicDB.