本文整理汇总了TypeScript中@angular-devkit/core.fragment函数的典型用法代码示例。如果您正苦于以下问题:TypeScript fragment函数的具体用法?TypeScript fragment怎么用?TypeScript fragment使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了fragment函数的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: it
it('can list', () => {
const host = new SyncDelegateHost(new SimpleMemoryHost());
const buffer = stringToFileBuffer('hello');
host.write(normalize('/sub/file1'), buffer);
host.write(normalize('/sub/file2'), buffer);
host.write(normalize('/sub/sub1/file3'), buffer);
host.write(normalize('/file4'), buffer);
expect(host.list(normalize('/sub')))
.toEqual([fragment('file1'), fragment('file2'), fragment('sub1')]);
expect(host.list(normalize('/')))
.toEqual([fragment('sub'), fragment('file4')]);
expect(host.list(normalize('/inexistent'))).toEqual([]);
});
示例2: fragment
obs.next(names.map(name => fragment(name)));
示例3: generateRoutingModuleFileName
export function generateRoutingModuleFileName(moduleName: string): PathFragment {
return fragment(strings.dasherize(moduleName) + ROUTING_MODULE_EXT);
}
示例4: generateFeatureModuleFileName
export function generateFeatureModuleFileName(moduleName: string): PathFragment {
return fragment(strings.dasherize(moduleName) + FEATURE_MODULE_EXT);
}