| @@ -1,10 +1,12 @@ | |||
| import { NgModule } from '@angular/core'; | |||
| import { BrowserModule } from '@angular/platform-browser'; | |||
| import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; | |||
| import { Routes, RouterModule } from '@angular/router'; | |||
| import { DashboardComponent } from './dashboard/dashboard.component'; | |||
| const routes: Routes = []; | |||
| const routes: Routes = [ | |||
| {path : '', component: DashboardComponent}, | |||
| {path : 'dashboard', component: DashboardComponent} | |||
| ]; | |||
| @NgModule({ | |||
| imports: [RouterModule.forRoot(routes)], | |||
| @@ -1,5 +1,9 @@ | |||
| <kendo-contextmenu [target]="target" [items]="items"> </kendo-contextmenu> | |||
| <div class=topMenuBar > | |||
| <kendo-menu [items]="items"> </kendo-menu> | |||
| </div> | |||
| <router-outlet></router-outlet> | |||
| <div #target class="target"> | |||
| <p class="placeholder">Right-click to open Context menu</p> | |||
| </div> | |||
| <kendo-contextmenu [target]="target" [items]="items"> </kendo-contextmenu> | |||
| <kendo-menu [items]="items"> </kendo-menu> | |||
| @@ -3,7 +3,7 @@ | |||
| border-radius: 5px; | |||
| height: 100px; | |||
| width: 400px; | |||
| background-color: #f6f6f6; | |||
| background-color: yellowgreen; | |||
| display: flex; | |||
| justify-content: center; | |||
| align-items: center; | |||
| @@ -13,4 +13,15 @@ | |||
| font-size: 20px; | |||
| color: #656565; | |||
| margin: 0; | |||
| } | |||
| .topMenuBar { | |||
| left: 0px; | |||
| top: 0px; | |||
| // position: absolute; | |||
| margin : 0px; | |||
| width : 100%; | |||
| display: block; | |||
| background-color: rgb(229, 230, 218); | |||
| box-shadow : 0px 0px 2px 0px #d6d2d2 | |||
| } | |||
| @@ -8,11 +8,13 @@ import { MenuModule, ContextMenuModule } from '@progress/kendo-angular-menu'; | |||
| //App | |||
| import { AppComponent } from './app.component'; | |||
| import { AppRoutingModule } from './app-routing.module'; | |||
| import { DashboardComponent } from './dashboard/dashboard.component'; | |||
| @NgModule({ | |||
| declarations: [ | |||
| AppComponent | |||
| AppComponent, | |||
| DashboardComponent | |||
| ], | |||
| imports: [ | |||
| BrowserModule, | |||
| @@ -0,0 +1 @@ | |||
| <p>dashboard works!</p> | |||
| @@ -0,0 +1,25 @@ | |||
| import { ComponentFixture, TestBed } from '@angular/core/testing'; | |||
| import { DashboardComponent } from './dashboard.component'; | |||
| describe('DashboardComponent', () => { | |||
| let component: DashboardComponent; | |||
| let fixture: ComponentFixture<DashboardComponent>; | |||
| beforeEach(async () => { | |||
| await TestBed.configureTestingModule({ | |||
| declarations: [ DashboardComponent ] | |||
| }) | |||
| .compileComponents(); | |||
| }); | |||
| beforeEach(() => { | |||
| fixture = TestBed.createComponent(DashboardComponent); | |||
| component = fixture.componentInstance; | |||
| fixture.detectChanges(); | |||
| }); | |||
| it('should create', () => { | |||
| expect(component).toBeTruthy(); | |||
| }); | |||
| }); | |||
| @@ -0,0 +1,15 @@ | |||
| import { Component, OnInit } from '@angular/core'; | |||
| @Component({ | |||
| selector: 'app-dashboard', | |||
| templateUrl: './dashboard.component.html', | |||
| styleUrls: ['./dashboard.component.scss'] | |||
| }) | |||
| export class DashboardComponent implements OnInit { | |||
| constructor() { } | |||
| ngOnInit(): void { | |||
| } | |||
| } | |||
| @@ -9,7 +9,11 @@ exports.__esModule = true; | |||
| exports.AppRoutingModule = void 0; | |||
| var core_1 = require("@angular/core"); | |||
| var router_1 = require("@angular/router"); | |||
| var routes = []; | |||
| var dashboard_component_1 = require("./dashboard/dashboard.component"); | |||
| var routes = [ | |||
| { path: '', component: dashboard_component_1.DashboardComponent }, | |||
| { path: 'dashboard', component: dashboard_component_1.DashboardComponent } | |||
| ]; | |||
| var AppRoutingModule = /** @class */ (function () { | |||
| function AppRoutingModule() { | |||
| } | |||
| @@ -2,7 +2,7 @@ | |||
| border-radius: 5px; | |||
| height: 100px; | |||
| width: 400px; | |||
| background-color: #f6f6f6; | |||
| background-color: yellowgreen; | |||
| display: flex; | |||
| justify-content: center; | |||
| align-items: center; | |||
| @@ -13,4 +13,14 @@ | |||
| font-size: 20px; | |||
| color: #656565; | |||
| margin: 0; | |||
| } | |||
| .topMenuBar { | |||
| left: 0px; | |||
| top: 0px; | |||
| margin: 0px; | |||
| width: 100%; | |||
| display: block; | |||
| background-color: #e5e6da; | |||
| box-shadow: 0px 0px 2px 0px #d6d2d2; | |||
| } | |||
| @@ -4,11 +4,11 @@ exports.mainMenuItems = void 0; | |||
| exports.mainMenuItems = [ | |||
| { | |||
| text: 'Item1a中文', | |||
| items: [{ text: 'Item1.1' }, { text: 'Item1.2', items: [{ text: 'Item1.2.1' }, { text: 'Item1.2.2' }] }] | |||
| items: [{ text: 'Item1.1', url: '/dashboard' }, { text: 'Item1.2', items: [{ text: 'Item1.2.1' }, { text: 'Item1.2.2' }] }] | |||
| }, | |||
| { | |||
| text: 'Item2', | |||
| items: [{ text: 'Item2.1' }, { text: 'Item2.2' }, { text: 'Item2.3' }] | |||
| items: [{ text: 'Item2.1', url: 'https://google.com.au' }, { text: 'Item2.2' }, { text: 'Item2.3' }] | |||
| }, | |||
| { | |||
| text: 'Item3' | |||
| @@ -1,11 +1,11 @@ | |||
| export const mainMenuItems: any[] = [ | |||
| { | |||
| text: 'Item1a中文', | |||
| items: [{ text: 'Item1.1' }, { text: 'Item1.2', items: [{ text: 'Item1.2.1' }, { text: 'Item1.2.2' }] }] | |||
| items: [{ text: 'Item1.1', url: '/dashboard'}, { text: 'Item1.2', items: [{ text: 'Item1.2.1' }, { text: 'Item1.2.2' }] }] | |||
| }, | |||
| { | |||
| text: 'Item2', | |||
| items: [{ text: 'Item2.1' }, { text: 'Item2.2' }, { text: 'Item2.3' }] | |||
| items: [{ text: 'Item2.1', url: 'https://google.com.au' }, { text: 'Item2.2' }, { text: 'Item2.3' }] | |||
| }, | |||
| { | |||
| text: 'Item3' | |||