---
title: "Angular Agenda Basic Usage Example | Mobiscroll"
component: "Agenda"
framework: "Angular"
library_version: "6.1.5"
url: "https://demo.mobiscroll.com/angular/agenda/basic-usage"
---

# Basic Usage - Angular Agenda demo

Set up a Angular agenda view — display a monthly event list grouped by date with events loaded from an external API. For Angular 22 and Ionic 8.

- [Live demo](https://demo.mobiscroll.com/angular/agenda/basic-usage)
- [View code on GitHub](https://github.com/acidb/mobiscroll-demos-angular/tree/main/src/demos/eventcalendar/agenda/basic-usage)
- This demo in other frameworks: [JavaScript](https://demo.mobiscroll.com/javascript/agenda/basic-usage.md), [jQuery](https://demo.mobiscroll.com/jquery/agenda/basic-usage.md), [React](https://demo.mobiscroll.com/react/agenda/basic-usage.md), [Vue](https://demo.mobiscroll.com/vue/agenda/basic-usage.md)

## Description

Use the `<mbsc-eventcalendar>` component and pass all the necessary options as attributes, like `[theme]="ios"`.

The events can be [passed in a couple of different ways](https://demo.mobiscroll.com/angular/agenda/load-inline-data). In this example we are loading them through an external API.

**Interested to learn about the calendar view?** [Learn how to set up the range the agenda covers →](https://demo.mobiscroll.com/angular/agenda/daily-weekly-monthly-annual-agenda)

## What this demo shows

- Shows a monthly agenda view with events listed and grouped by date.
- **Header navigation** The month and year label in the top left opens date navigation. The previous and next arrows and the Today button on the right move between months and jump back to the current date.
- **Agenda list** The area below the header lists events for the selected month. Events in the agenda are grouped by date.
- **Sticky day headers** As the agenda scrolls vertically, each day stays visible with a sticky date header while its events appear underneath.
- **Events** Events appear as agenda cards with a colored strip on the left and the event title next to it. Start and end times are stacked on the right side of timed events. All-day events show the all-day label on the right.
- **Event interaction** Hovering an event highlights it.
- **Event selection** Clicking an event selects and highlights it.

## Best for

- **Monthly event overviews** Showing a full month of scheduled items in a compact agenda list grouped by date.
- **Team calendars** Reviewing meetings, internal events, deadlines, and milestones without using a full calendar grid.
- **Appointment and booking lists** Presenting booked services or reservations by day while keeping event times visible.
- **Editorial and content schedules** Scanning publish dates, campaign tasks, or content deadlines across a month.

## Tutorial

```html
<mbsc-eventcalendar
    [view]="view"
    theme="ios"
    themeVariant="light">
</eventcalendar>
```

```ts
view = {
    agenda: { type: 'month' }
};

ngOnInit() {
    this.http.jsonp('//trial.mobiscroll.com/events/?vers=5', 'callback').subscribe((resp: any) => {
        this.events = resp;
    });
}
```

## API used in this demo

- [`theme`](https://mobiscroll.com/docs/angular/eventcalendar/api#opt-theme) - option
- [`themeVariant`](https://mobiscroll.com/docs/angular/eventcalendar/api#opt-themeVariant) - option
- [`data`](https://mobiscroll.com/docs/angular/eventcalendar/api#opt-data) - option
- [`view`](https://mobiscroll.com/docs/angular/eventcalendar/api#opt-view) - option
- [`onEventClick`](https://mobiscroll.com/docs/angular/eventcalendar/api#event-onEventClick) - event

## Code

### Component

```ts
import { CommonModule } from '@angular/common';
import { HttpClient } from '@angular/common/http';
import { AfterViewInit, Component } from '@angular/core';
import {
  MbscCalendarEvent,
  MbscEventcalendarView,
  MbscEventClickEvent,
  MbscModule,
  Notifications,
  setOptions,
} from '@mobiscroll/angular';

setOptions({
  theme: 'ios',
  themeVariant: 'light'
});

@Component({
  selector: 'app-root', 
  templateUrl: './app.component.html',
  providers: [Notifications],
  standalone: true,
  imports: [CommonModule, MbscModule],
})
export class AppComponent implements AfterViewInit {
  constructor(
    private http: HttpClient,
    private notify: Notifications,
  ) {}

  myEvents: MbscCalendarEvent[] = [];

  myView: MbscEventcalendarView = { agenda: { type: 'month' } };

  onEventClick(args: MbscEventClickEvent): void {
    this.notify.toast({
      message: args.event.title,
    });
  }

  ngAfterViewInit(): void {
    this.http.jsonp<MbscCalendarEvent[]>('https://trial.mobiscroll.com/events/?vers=5', 'callback').subscribe((resp) => {
      this.myEvents = resp;
    });
  }
}
```

### Template

```html
<mbsc-eventcalendar [data]="myEvents" [view]="myView" (onEventClick)="onEventClick($event)"></mbsc-eventcalendar>
```

## Implementation notes

- Use `view: { agenda: { type: 'month' } }`.
- Load events from `https://trial.mobiscroll.com/events/?vers=5` via JSONP using `getJson(url, callback, 'jsonp')`. Angular: use `HttpClient.jsonp()` instead. JS/jQuery: call `inst.setEvents(events)` in the callback.
- On `onEventClick`: show a Mobiscroll `Toast` with `args.event.title` as the message.

## Run it in your project

1. If not signed up yet, or don't own a license, you can [start a free trial](https://mobiscroll.com/starttrial).

2. Clone the repository:

   ```
   git clone https://github.com/acidb/mobiscroll-demos-angular.git
   ```

3. If not installed yet, install the Mobiscroll CLI from NPM:

   ```
   npm install -g @mobiscroll/cli
   ```

4. Config Mobiscroll - open a terminal window in the root directory and run:

   ```
   mobiscroll config angular
   ```

5. Install dependencies - open a terminal window in the root directory and run:

   ```
   npm install
   ```

6. Run the project:

   ```
   ng serve
   ```

On a trial, add `--trial` to the config command: `mobiscroll config angular --trial`.

Running a demo locally requires a Mobiscroll trial or a license; setup is per framework at https://mobiscroll.com/docs/angular/getting-started/installation

## Related demos

- Previous: [Week Calendar Date Navigation](https://demo.mobiscroll.com/angular/agenda/daily-agenda-with-week-calendar.md) - Configure the Angular Agenda standalone or paired with a week calendar — list events day by day and let users navigate dates from the week strip above.
- Next: [Daily, Weekly, Monthly & Yearly Views](https://demo.mobiscroll.com/angular/agenda/daily-weekly-monthly-annual-agenda.md) - Build a Angular agenda list view that switches between daily, weekly, monthly, and yearly modes — display events for a single or multiple consecutive periods.
