-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create the services for more comfortable way of handle SEO data #5
- create TransferStateService to transfer the payload from the server to client - create SeoPropertiesService to handle the SEO data in one place - modify HttpResponseStatusService, DocumentTitleService, DocumentMetaService, DocumentLinkService to work with TransferStateService - temporary fix the issue with ngOnDestroy() hook in the components. It calls every time on the server side when the browser page refreshes.
- Loading branch information
Showing
16 changed files
with
457 additions
and
171 deletions.
There are no files selected for viewing
6 changes: 3 additions & 3 deletions
6
...ect/application/src/app/modules/core/services/document-link/document-link.service.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
...ect/application/src/app/modules/core/services/document-meta/document-meta.service.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
...t/application/src/app/modules/core/services/document-title/document-title.service.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 3 additions & 1 deletion
4
...n/src/app/modules/core/services/http-response-status/http-response-status.service.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
...t/application/src/app/modules/core/services/seo-properties/seo-properties.service.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { TestBed, inject } from '@angular/core/testing'; | ||
import { TransferState } from '@angular/platform-browser'; | ||
|
||
import { SeoPropertiesService } from './seo-properties.service'; | ||
import { DocumentTitleService } from '../document-title/document-title.service'; | ||
import { TransferStateService } from '../transfer-state/transfer-state.service'; | ||
import { DocumentMetaService } from '../document-meta/document-meta.service'; | ||
import { DocumentLinkService } from '../document-link/document-link.service'; | ||
|
||
describe('SeoPropertiesService', () => { | ||
beforeEach(() => { | ||
TestBed.configureTestingModule({ | ||
providers: [ | ||
SeoPropertiesService, | ||
DocumentTitleService, | ||
TransferState, | ||
TransferStateService, | ||
DocumentMetaService, | ||
DocumentLinkService, | ||
], | ||
}); | ||
}); | ||
|
||
it( | ||
'should be created', | ||
inject([SeoPropertiesService], (service: SeoPropertiesService) => { | ||
expect(service).toBeTruthy(); | ||
}) | ||
); | ||
}); |
Oops, something went wrong.