Hello,
Sorry for the latency in answering your question.
I created a new app in version 5.2.2 and I followed the steps. There is no error in the console.
Can you restart the angular app after removing the .angular
folder (angular cache folder) in the angular folder?
Can you remove generated code and try to regenerate the same entity?
If the error still exists can you send me an example project which includes this error?
Hello,
You can change the culture cookie with the code below
//app.component.ts
import { COOKIE_LANGUAGE_KEY, SessionStateService } from '@abp/ng.core';
import { Component, Inject, OnInit } from '@angular/core';
import { DOCUMENT } from '@angular/common';
@Component({
selector: 'app-root',
template: `
<abp-loader-bar></abp-loader-bar>
<abp-dynamic-layout></abp-dynamic-layout>
`,
})
export class AppComponent implements OnInit {
constructor(
private sessionState: SessionStateService,
@Inject(DOCUMENT) private document: Document,
@Inject(COOKIE_LANGUAGE_KEY) private cookieLanguageKey: string
) {}
ngOnInit(): void {
this.updateCookieOnLanguageChange();
}
updateCookieOnLanguageChange() {
this.sessionState.getLanguage$().subscribe(language => {
// remove the old one first
this.document.cookie = `${this.cookieLanguageKey}=; expires=Thu, 01 Jan 1970 00:00:01 GMT;`;
const cookieValue = encodeURIComponent(`c=${language}|uic=${language}`);
this.document.cookie = `${this.cookieLanguageKey}=${cookieValue};path=/`;
});
}
}
Hello,
Can you send your route.provider.ts?
Hello,
node_modules/flag-icon-css/
is this style file path exist in your angular.json?
Flag icon dependency removed in version 5.3. If you don't want to use flag-icons you can remove this configuration.
If you want to use flag icons please follow the steps below;
Set enableFlagIcon
property to true in CommercialUiConfigModule's forRoot method parameter.
//app.module.ts
CommercialUiConfigModule.forRoot({
enableFlagIcon: true
})
Install the flag-icon-css library with the command below
yarn add flag-icon-css
or
npm install flag-icon-css
Add flag icon CSS to angular.json
file
{
// other configurations
"projects": {
"projectName": {
// other configurations
"architect": {
"build": {
// other configurations
"options": {
// other configurations
"styles": [
// other configurations
{
"input": "node_modules/flag-icon-css/css/flag-icons.min.css",
"inject": true,
"bundleName": "flag-icon.min"
}
// other configurations
]
}
// other configurations
}
}
}
}
Hello,
Can you try to generate after removing angular/.suite folder?
Hello,
You can do it with CSS
.lp-sidebar-wrapper {
margin: -51px auto 0;
}
Hello,
Can you share the result of yarn why flag-icon-css
command?
Hello,
We had this error before version 5.1.2.
Is ABP Suite version 5.2.2? Also, is the @abp/ng.schematics package version 5.2.2?
Hello,
We fixed this error and the fix is available with version 5.3.1. Thanks for reporting.
If you want to add PWA to your project you can use ng add @angular/pwa@13
for now. Your credit refunded
Hello,
The fix for this issue will be available for the next 5.3 patch version. Currently, we don't have plans to publish a new version for version 5.2.
But there is a workaround below for this bug;
// app.component.ts
import { PermissionDirective } from '@abp/ng.core';
import { Component } from '@angular/core';
import { distinctUntilChanged } from 'rxjs/operators';
@Component({
selector: 'app-root',
template: `
<abp-loader-bar></abp-loader-bar>
<abp-dynamic-layout></abp-dynamic-layout>
`,
})
export class AppComponent {}
function checkCustom() {
if (this.subscription) {
this.subscription.unsubscribe();
}
this.subscription = this.permissionService
.getGrantedPolicy$(this.condition || '')
.pipe(distinctUntilChanged())
.subscribe(isGranted => {
this.vcRef.clear();
if (isGranted) this.vcRef.createEmbeddedView(this.templateRef);
this.cdRef.markForCheck();
});
}
PermissionDirective.prototype['check'] = checkCustom;