Includes the most important services for a better handling of the application.
npm install @breadstone/ziegel-platform-presentation@breadstone/ziegel-platform-presentation provides:
bash
npm install @breadstone/ziegel-platform-presentation
or
yarn add @breadstone/ziegel-platform-presentation
`
🧩 Features & Usage Examples
$3
`typescript
import { ViewModelBase, bindable } from '@breadstone/ziegel-platform-presentation';
class UserViewModel extends ViewModelBase {
@bindable name: string = '';
@bindable email: string = '';
async save() {
// Save logic
}
}
`
$3
`typescript
import { PresentationCoordinator } from '@breadstone/ziegel-platform-presentation';
class UserCoordinator extends PresentationCoordinator {
async showUserDetails(userId: string) {
const viewModel = new UserViewModel();
await this.presentView('user-details', viewModel);
}
}
`
$3
`typescript
import { CommandHandler, ICommand } from '@breadstone/ziegel-platform-presentation';
class SaveUserCommand implements ICommand {
constructor(public user: User) {}
}
class SaveUserHandler extends CommandHandler {
async handle(command: SaveUserCommand) {
// Handle save operation
}
}
`
📚 Package import points
`typescript
import {
// View Models
ViewModelBase,
bindable,
// Coordinators
PresentationCoordinator,
// Commands
CommandHandler,
ICommand,
// Services
PresentationService
} from '@breadstone/ziegel-platform-presentation';
``