Skip to content

Commit 4b8fe06

Browse files
committed
Fix a routerLink
1 parent 960551c commit 4b8fe06

File tree

8 files changed

+21
-8
lines changed

8 files changed

+21
-8
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ngx-dynamic-components",
3-
"version": "15.1.1",
3+
"version": "15.1.2",
44
"description": "NGX Dynamic Components is a configuration based dynamic components library for Angular. That allows you to rapidly create dynamic forms or any other mobile-friendly web layouts.",
55
"author": "FalconSoft Ltd",
66
"repository": {

projects/bootstrap/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@ngx-dynamic-components/bootstrap",
3-
"version": "15.1.1",
3+
"version": "15.1.2",
44
"private": false,
55
"description": "@ngx-dynamic-components/bootstrap is Angular 7+ library what contains a bootstrap interfaces to build a configuration driven web pages and workflows.",
66
"author": "FalconSoft Ltd <[email protected]>",

projects/bootstrap/src/lib/components/input-typeahead/input-typeahead.component.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Component } from '@angular/core';
1+
import { Component, HostBinding } from '@angular/core';
22
import {
33
BindingProperties, propDescription, PropertyCategories, OptionValue,
44
UIModel, ComponentDescriptor, Categories, AttributesMap, XMLResult, BaseUIComponent,
@@ -20,6 +20,7 @@ import example from './input-typeahead.examples';
2020
[placeholder]="properties.placeholder ?? ''"
2121
[typeaheadOptionField]="properties.typeaheadOptionField ?? 'label'"
2222
[typeaheadMultipleSearch]="properties.multiple"
23+
[class]="properties.class"
2324
(input)="onInput($event)"
2425
(change)="onSelect($event)"/>
2526
`,
@@ -32,6 +33,7 @@ import example from './input-typeahead.examples';
3233
})
3334
// eslint-disable-next-line @angular-eslint/no-conflicting-lifecycle
3435
export class InputTypeaheadComponent extends BaseUIComponent<InputTypeaheadProperties> {
36+
@HostBinding('attr.class') wrapperClass = null;
3537
searchText$ = new Subject<string | null>();
3638
loading = false;
3739
suggestions$ = new Subject<OptionValue[]>();

projects/bootstrap/src/lib/components/input-typeahead/input-typeahead.examples.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export const example2: ComponentExample<UIModel<InputTypeaheadProperties>> = {
66
<div class="flex-column">
77
<div class="form-group">
88
<label class="col-form-label" width="60px">Type text</label>
9-
<input-typeahead width="300px" itemsSource="$.list" binding="$.selected"></input-typeahead>
9+
<input-typeahead class="form-control" width="300px" itemsSource="$.list" binding="$.selected"></input-typeahead>
1010
</div>
1111
</div>
1212
`,

projects/core/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@ngx-dynamic-components/core",
3-
"version": "15.1.1",
3+
"version": "15.1.2",
44
"private": false,
55
"description": "@ngx-dynamic-components/core is Angular 7+ library what contains a core interfaces to build a configuration driven web pages and workflows.",
66
"author": "FalconSoft Ltd <[email protected]>",

projects/core/src/lib/html-elements/a/a.component.ts

+12-1
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,17 @@ export const example: ComponentExample<UIModel<LinkProperties>> = {
137137
dataModel: {}
138138
};
139139

140+
export const example2: ComponentExample<UIModel<LinkProperties>> = {
141+
title: 'Basic router link',
142+
uiModel: `
143+
<section class="row align-items-center m-1">
144+
<a title="Examples link" class="btn btn-link mr-2"
145+
routerLink="/examples/contact-us">Examples: Contact us</a>
146+
</section>
147+
`,
148+
dataModel: {}
149+
};
150+
140151
type AComponentConstrutor = new () => AComponent;
141152

142153
type LinkPropertiesConstrutor = new () => LinkProperties;
@@ -149,7 +160,7 @@ export const aDescriptor: ComponentDescriptor<AComponentConstrutor, LinkProperti
149160
description: 'A component',
150161
itemProperties: LinkProperties,
151162
component: AComponent,
152-
example,
163+
example: [example, example2],
153164
parseUIModel: (xmlRes: XMLResult) => {
154165
const uiModel = parseHTMLUIModel(xmlRes);
155166
if (xmlRes.attrs.routerLink) {

projects/core/src/lib/utils/renderer.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export function createComponent(
2626
let component: BaseDynamicComponent;
2727
if (descriptor.category === Categories.HTML) {
2828
const baseHtml = componentClass as any;
29-
component = new baseHtml(containerRef, parentComponent.injector);
29+
component = new baseHtml(parentComponent.injector);
3030
component.dataModel = dataModel;
3131
component.uiModel = uiModel;
3232
component.create(containerRef.element.nativeElement);

projects/tools/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@ngx-dynamic-components/tools",
3-
"version": "15.1.1",
3+
"version": "15.1.2",
44
"private": false,
55
"description": "@ngx-dynamic-components/tools is Angular 7+ library what contains a core interfaces to build a configuration driven web pages.",
66
"author": "FalconSoft Ltd <[email protected]>",

0 commit comments

Comments
 (0)