Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fix] Lazy DI tokens #7

Open
wants to merge 21 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
5928691
chore(package): update lock file
gund Mar 23, 2019
b404d6b
fix(menu): allow sub menu map to provide lazily
gund Mar 23, 2019
c3b2805
chore(prettier): add RC file
gund Mar 23, 2019
f072f8a
style(app): reformat source code
gund Mar 23, 2019
f358d4d
fix(menu): resolve sub menu map if not provided
gund Mar 23, 2019
9fb523d
fix(menu): detech changes in items component
Mar 28, 2019
094b6fc
docs(changelog): add changes of 1.5.6 [skip ci]
semantic-release-bot Mar 28, 2019
f908039
fix(menu): do not skip children if not generated in prev step
Mar 28, 2019
17611b2
docs(changelog): add changes of 1.5.7 [skip ci]
semantic-release-bot Mar 28, 2019
e98303e
chore(package): update lock file
gund Mar 23, 2019
8eb2c77
fix(menu): allow sub menu map to provide lazily
gund Mar 23, 2019
2b50eea
chore(prettier): add RC file
gund Mar 23, 2019
16d8a98
style(app): reformat source code
gund Mar 23, 2019
42bc135
fix(menu): resolve sub menu map if not provided
gund Mar 23, 2019
cccb291
feat(menu): allow to lazy-load sub header components mapping
gund Mar 27, 2019
9a89a7e
chore(vscode): update window colors scheme
gund Mar 27, 2019
2e2b114
chore(prettier): enable trailing comma for formatting source code
gund Mar 27, 2019
d2c8c8f
Merge branch 'fix-lazy-di' of github.com:orchestratora/ngx-dynamic-me…
gund Apr 6, 2019
a8883d2
chore(package): update format
gund Apr 6, 2019
40a1e2b
chore(package): fix 8 vulnerabilities from 3rd libs
gund Apr 6, 2019
40bb264
docs(demo): adjust when to show submenu comp for feature1
gund Apr 6, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"singleQuote": true,
"trailingComma": "all"
}
10 changes: 8 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
{
"workbench.colorCustomizations": {
"activityBar.background": "#610515",
"titleBar.activeBackground": "#87081D",
"titleBar.activeForeground": "#FFFBFC"
"activityBar.foreground": "#e7e7e7",
"activityBar.inactiveForeground": "#e7e7e799",
"activityBarBadge.background": "#1a7906",
"activityBarBadge.foreground": "#e7e7e7",
"titleBar.activeBackground": "#910820",
"titleBar.inactiveBackground": "#91082099",
"titleBar.activeForeground": "#e7e7e7",
"titleBar.inactiveForeground": "#e7e7e799"
}
}
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# NgxDynamicMenu - Changelog

## [1.5.7](https://github.com/orchestratora/ngx-dynamic-menu/compare/v1.5.6...v1.5.7) (2019-03-28)


### Bug Fixes

* **menu:** do not skip children if not generated in prev step ([f908039](https://github.com/orchestratora/ngx-dynamic-menu/commit/f908039))

## [1.5.6](https://github.com/orchestratora/ngx-dynamic-menu/compare/v1.5.5...v1.5.6) (2019-03-28)


### Bug Fixes

* **menu:** detech changes in items component ([9fb523d](https://github.com/orchestratora/ngx-dynamic-menu/commit/9fb523d))

## [1.5.5](https://github.com/orchestratora/ngx-dynamic-menu/compare/v1.5.4...v1.5.5) (2019-03-19)


Expand Down
47 changes: 33 additions & 14 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions projects/demo-e2e/protractor.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,22 @@ exports.config = {
allScriptsTimeout: 11000,
specs: ['./src/**/*.e2e-spec.ts'],
capabilities: {
browserName: 'chrome',
browserName: 'chrome'
},
directConnect: true,
baseUrl: 'http://localhost:4200/',
framework: 'jasmine',
jasmineNodeOpts: {
showColors: true,
defaultTimeoutInterval: 30000,
print: function() {},
print: function() {}
},
onPrepare() {
require('ts-node').register({
project: require('path').join(__dirname, './tsconfig.e2e.json'),
project: require('path').join(__dirname, './tsconfig.e2e.json')
});
jasmine
.getEnv()
.addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
},
}
};
4 changes: 2 additions & 2 deletions projects/demo-e2e/src/app.e2e-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ describe('workspace-project App', () => {
.get(logging.Type.BROWSER);
expect(logs).not.toContain(
jasmine.objectContaining({
level: logging.Level.SEVERE,
}),
level: logging.Level.SEVERE
})
);
});
});
8 changes: 4 additions & 4 deletions projects/demo/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,22 @@ module.exports = function(config) {
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage-istanbul-reporter'),
require('@angular-devkit/build-angular/plugins/karma'),
require('@angular-devkit/build-angular/plugins/karma')
],
client: {
clearContext: false, // leave Jasmine Spec Runner output visible in browser
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
coverageIstanbulReporter: {
dir: require('path').join(__dirname, '../../coverage/demo'),
reports: ['html', 'lcovonly', 'text-summary'],
fixWebpackSourcePaths: true,
fixWebpackSourcePaths: true
},
reporters: ['progress', 'kjhtml'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
singleRun: false,
singleRun: false
});
};
14 changes: 13 additions & 1 deletion projects/demo/src/app/app-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,25 @@ const routes: RoutesWithMenu = [
},
],
},
{
path: 'feature1',
// component: PrintPathComponent,
loadChildren: './feature1/feature1.module#Feature1Module',
data: {
menu: {
label: 'Feature1',
showChildrenIfActivated: true,
subMenuComponent: 'Feature1Component',
},
},
},
];

@NgModule({
imports: [RouterModule.forRoot(routes)],
exports: [RouterModule],
providers: [
DynamicMenuModule.provideSubMenu('SubMenuForSection3', Path3Component),
...DynamicMenuModule.provideSubMenu('SubMenuForSection3', Path3Component),
],
})
export class AppRoutingModule {}
6 changes: 3 additions & 3 deletions projects/demo/src/app/app.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ describe('Component: App', () => {
imports: [RouterTestingModule],
declarations: [AppComponent],
providers: [{ provide: DynamicMenuService, useValue: {} }],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
schemas: [CUSTOM_ELEMENTS_SCHEMA]
});
});

it('should render <ndm-default-dynamic-menu>', () => {
const fixture = TestBed.createComponent(AppComponent);

const menuElem = fixture.debugElement.query(
By.css('ndm-default-dynamic-menu'),
By.css('ndm-default-dynamic-menu')
);

expect(menuElem).toBeTruthy();
Expand All @@ -30,7 +30,7 @@ describe('Component: App', () => {
const fixture = TestBed.createComponent(AppComponent);

const outletElem = fixture.debugElement.query(
By.css('ndm-default-dynamic-menu + router-outlet'),
By.css('ndm-default-dynamic-menu + router-outlet')
);

expect(outletElem).toBeTruthy();
Expand Down
4 changes: 4 additions & 0 deletions projects/demo/src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ export class AppComponent implements OnInit {
path: 'custom-path-start',
data: { menu: { label: 'Custom Section - Start' } },
});
this.dynamicMenuService.addMenuAfter([''], {
path: 'custom-path-after',
data: { menu: { label: 'Custom Section - After' } },
});
this.dynamicMenuService.addMenuToEnd([''], {
path: 'custom-path-end',
data: { menu: { label: 'Custom Section - End' } },
Expand Down
6 changes: 3 additions & 3 deletions projects/demo/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import {
DefaultDynamicMenuComponentModule,
DynamicMenuModule,
DynamicMenuModule
} from 'projects/dynamic-menu/src/public_api';

import { AppRoutingModule } from './app-routing.module';
Expand All @@ -15,10 +15,10 @@ import { PrintPathComponent } from './print-path/print-path.component';
BrowserModule,
DynamicMenuModule.forRouter(),
DefaultDynamicMenuComponentModule,
AppRoutingModule,
AppRoutingModule
],
declarations: [AppComponent, PrintPathComponent, Path3Component],
bootstrap: [AppComponent],
providers: [],
providers: []
})
export class AppModule {}
Empty file.
3 changes: 3 additions & 0 deletions projects/demo/src/app/feature1/feature1.component.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<p>
feature1 works!
</p>
12 changes: 12 additions & 0 deletions projects/demo/src/app/feature1/feature1.component.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { Component, OnInit } from '@angular/core';

@Component({
selector: 'app-feature1',
templateUrl: './feature1.component.html',
styleUrls: ['./feature1.component.css']
})
export class Feature1Component implements OnInit {
constructor() {}

ngOnInit() {}
}
Loading