2.1.8 • Published 8 days ago
brandup-ui-app v2.1.8
brandup-ui-app
App start
Configure your application with middlewares and run.
import { ApplicationBuilder } from "brandup-ui-app";
import { TestMiddleware } from "./middlewares/test";
import "./styles.less";
interface WebsiteModel extends ApplicationModel {
}
const appModel: WebsiteModel = {}
const builder = new ApplicationBuilder();
builder.useMiddleware(new TestMiddleware());
const app = builder.build<WebsiteModel>({ basePath: "/" }, appModel);
app.init();
app.load();
App middlewares
Inject to application lifecycle events.
export class TestMiddleware extends Middleware<WebsiteModel> {
start(_context, next) {
console.log("start");
next();
}
loaded(_context, next) {
console.log("loaded");
next();
}
navigate(context: NavigateContext) {
if (context.replace)
location.replace(context.url);
else
location.assign(context.url);
return;
}
stop(_context, next) {
console.log("stop");
next();
}
}
2.1.8
8 days ago
2.1.7
1 month ago
2.1.2
8 months ago
2.1.4
8 months ago
2.1.3
8 months ago
2.1.6
8 months ago
2.1.5
8 months ago
2.0.3
1 year ago
2.0.2
2 years ago
2.0.1
2 years ago
1.2.28
3 years ago
1.2.27
4 years ago
1.2.26
4 years ago
1.2.25
4 years ago
1.2.24
4 years ago
1.2.23
4 years ago
1.2.22
4 years ago
1.2.20
4 years ago
1.2.21
4 years ago
1.2.18
4 years ago
1.2.19
4 years ago
1.2.17
4 years ago
1.2.16
4 years ago
1.2.14
4 years ago
1.2.15
4 years ago
1.2.13
4 years ago
1.2.12
4 years ago
1.2.11
4 years ago
1.2.10
4 years ago
1.2.8
4 years ago
1.2.9
4 years ago
1.2.7
4 years ago
1.2.6
4 years ago
1.2.5
4 years ago
1.2.4
4 years ago
1.2.3
4 years ago
1.2.2
4 years ago
1.2.1
4 years ago
1.0.2
4 years ago
1.0.1
4 years ago