mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
docs: ensure the all _ are replaced by slash for API entry urls. (#57600)
fixes #57599 PR Close #57600
This commit is contained in:
parent
001f319865
commit
5e42769ee9
2 changed files with 10 additions and 1 deletions
|
|
@ -30,6 +30,15 @@ describe('ManiferHelper', () => {
|
|||
};
|
||||
const result2 = getApiUrl(packageEntry2, apiName);
|
||||
expect(result2).toBe('api/animations/browser/DatePipe');
|
||||
|
||||
const packageEntry3: ApiManifestPackage = {
|
||||
moduleName: '@angular/common/http/testing',
|
||||
moduleLabel: 'common/http/testing',
|
||||
normalizedModuleName: 'angular_common_http_testing',
|
||||
entries: [],
|
||||
};
|
||||
const result3 = getApiUrl(packageEntry3, apiName);
|
||||
expect(result3).toBe('api/common/http/testing/DatePipe');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ export function getApiUrl(packageEntry: ApiManifestPackage, apiName: string): st
|
|||
// packages like `angular_core` should be `core`
|
||||
// packages like `angular_animation_browser` should be `animation/browser`
|
||||
.replace('angular_', '')
|
||||
.replace('_', '/');
|
||||
.replaceAll('_', '/');
|
||||
return `${PagePrefix.API}/${packageName}/${apiName}`;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue