4.0.0 • Published 9 years ago

vindue v4.0.0

Weekly downloads
2
License
Apache-2.0
Repository
github
Last release
9 years ago

vindue

Angular2-based window manager for websites

Documentation

Getting started

Install with npm

npm install vindue --save

Importing in AppModule

import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { FormsModule } from '@angular/forms';

import { AppComponent } from './app.component';

import { WindowManagerModule } from 'vindue';

@NgModule({
	imports: [BrowserModule, FormsModule, WindowManagerModule],
	declarations: [AppComponent],
	providers: [],
	bootstrap: [AppComponent]
})

export class AppModule { }

Usage in app.component

import { Component } from '@angular/core';

@Component({
	selector: 'my-app',
	template: `
		<ee-tree
				[windows]="windows"
				[map]="map"
				[modules]="modules"
				[model]="model"
				(on)="on($event)">
		</ee-tree>
	`
})
export class AppComponent {
	/* Names of the views */
	windows: string[] = ["Window1", "Window2", "Window3"];

	/*
	 * A function, which maps a view's name to
	 * some html-template
	 */
	map = {
		callback: function(v) {
			switch(v) {
				case "Window1": return "<h1>Window 1</h1>";
				case "Window2": return "<h1>Window 2</h1>";
				case "Window3": return "<h1>Window 3</h1>";
				case "TaskDetails": return "<h1>Moin</h1>";
				default: throw "No such view";
			}
		}
	};

	/*
	 * Modules necessary for components/ directives
	 * used in the html-templates
	 */
	modules: any = [];

	/* A shared object passed to the views */
	model = { }

	/* Events received from views */
	on(e) { }
}

Additional styles for

full-screen app

html, body {
	width: 100%;
	height: 100%;
}

unlimited resizing of windows

.ee-panel > ee-panel-data {
	display: block;
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	padding: 5px;
}
4.0.0

9 years ago

3.0.1

9 years ago

3.0.0

9 years ago

2.0.1

9 years ago

1.0.0

9 years ago

0.1.1

9 years ago

0.1.0

9 years ago

0.0.11

10 years ago

0.0.10

10 years ago

0.0.9

10 years ago

0.0.8

10 years ago

0.0.7

10 years ago

0.0.6

10 years ago

0.0.5

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago