Przeglądaj źródła

dashboard component added to menu item.

tags/2.037
Patrick Sun 5 lat temu
rodzic
commit
a4145f153d
12 zmienionych plików z 87 dodań i 13 usunięć
  1. +5
    -3
      src/app/app-routing.module.ts
  2. +6
    -2
      src/app/app.component.html
  3. +12
    -1
      src/app/app.component.scss
  4. +3
    -1
      src/app/app.module.ts
  5. +1
    -0
      src/app/dashboard/dashboard.component.html
  6. +0
    -0
      src/app/dashboard/dashboard.component.scss
  7. +25
    -0
      src/app/dashboard/dashboard.component.spec.ts
  8. +15
    -0
      src/app/dashboard/dashboard.component.ts
  9. +5
    -1
      src/app/dist/app-routing.module.js
  10. +11
    -1
      src/app/dist/app.component.css
  11. +2
    -2
      src/app/dist/main-menu-items.js
  12. +2
    -2
      src/app/main-menu-items.ts

+ 5
- 3
src/app/app-routing.module.ts Wyświetl plik

@@ -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)],

+ 6
- 2
src/app/app.component.html Wyświetl plik

@@ -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>

+ 12
- 1
src/app/app.component.scss Wyświetl plik

@@ -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
}

+ 3
- 1
src/app/app.module.ts Wyświetl plik

@@ -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,

+ 1
- 0
src/app/dashboard/dashboard.component.html Wyświetl plik

@@ -0,0 +1 @@
<p>dashboard works!</p>

+ 0
- 0
src/app/dashboard/dashboard.component.scss Wyświetl plik


+ 25
- 0
src/app/dashboard/dashboard.component.spec.ts Wyświetl plik

@@ -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();
});
});

+ 15
- 0
src/app/dashboard/dashboard.component.ts Wyświetl plik

@@ -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 {
}

}

+ 5
- 1
src/app/dist/app-routing.module.js Wyświetl plik

@@ -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() {
}

+ 11
- 1
src/app/dist/app.component.css Wyświetl plik

@@ -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;
}

+ 2
- 2
src/app/dist/main-menu-items.js Wyświetl plik

@@ -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'

+ 2
- 2
src/app/main-menu-items.ts Wyświetl plik

@@ -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'

Ładowanie…
Anuluj
Zapisz