我正在尝试在md-virtual-repeat-container中添加“滚动到页面顶部”按钮。我目前正在使用$ anchorScroll。我已经将哈希设置为表头(我已经尝试在重复容器内部和外部设置哈希)并且md-virtual-repeat设置为重复tr。单击该按钮时,该表仅向上滚动一个项目并停止,它不会一直滚动到顶部。有什么想法吗?
我认为这可能是因为浏览器认为它只需要向上滚动一个td来到达哈希值,因为这是DOM中显示的内容,但实际上它需要滚动更多。
提前谢谢!
interface CompilerOptions {
allowNonTsExtensions?: boolean;
charset?: string;
codepage?: number;
declaration?: boolean;
diagnostics?: boolean;
emitBOM?: boolean;
help?: boolean;
locale?: string;
mapRoot?: string; // Optionally Specifies the location where debugger should locate map files after deployment
module?: string; //'amd'|'commonjs' (default)
noEmitOnError?: boolean;
noErrorTruncation?: boolean;
noImplicitAny?: boolean; // Error on inferred `any` type
noLib?: boolean;
noLibCheck?: boolean;
noResolve?: boolean;
out?: string;
outDir?: string; // Redirect output structure to this directory
preserveConstEnums?: boolean;
removeComments?: boolean; // Do not emit comments in output
sourceMap?: boolean; // Generates SourceMaps (.map files)
sourceRoot?: string; // Optionally specifies the location where debugger should locate TypeScript source files after deployment
suppressImplicitAnyIndexErrors?: boolean;
target?: string; // 'es3'|'es5' (default)|'es6'
version?: boolean;
watch?: boolean;
}