$timeout(function() {
// $location.hash('bottom');
// $anchorScroll(); // var a=angular.element("#loginPage")[0].scrollTop;
// var b=angular.element("#loginPage")[0].scrollHeight;
// angular.element("#loginPage")[0].scrollTop=b; var height = $("#loginPage").outerHeight()-110;
var width = $("#loginPage").outerWidth()-260;
$('body, html').animate({
"scrollTop" : height,
"scrollLeft" : width
}, 500);
})
<!-- Top content -->
<div ng-controller="YacmpLoginController">
<div id="loginPage" class="top-content" style="position: static;background-image: url(libs/img/backgrounds/ClearingHouseBg.png);">
<div class="container" style="width: 100%;">
<div class="row">
<div class="col-sm-12 form-box">
<div class="form-bottom">
<form role="form" action="login" method='POST' autocomplete="off" name="loginForm" novalidate>
<div style="padding-left: 192px;">
<span class="error" ng-show="errorMessage != null">{{errorMessage|translate}}</span>
</div>
<div class="form-group row">
<label class="col-sm-4 control-label">{{'User Id/Email'|translate}}:</label>
<!--<label class="sr-only" for="form-email">{{'User Id/Email'|translate}}</label>-->
<div class="col-sm-5">
<input type="text" name="username" ng-model="username" class="login-form-control" placeholder="{{ 'User Id/Email' | translate}}" id="form-email" required autocomplete="off"/>
<span class="error" ng-show="for.username.$error.required">
{{'Please input user id or email'|translate}}
</span>
</div>
</div>
<div class="form-group row">
<label class="col-sm-4 control-label">{{'Password'|translate}}:</label>
<div class="col-sm-5">
<input type="password" name="plainPwd" ng-model="password" class="login-form-control" placeholder="{{ 'Password' | translate}}" required autocomplete="off">
<input hidden name="password" value="{{passwordHash}}" />
<input hidden name="encrypted" value="{{isEncrypted}}" />
<input hidden name="loginType" value="{{loginType}}" />
</div>
<!--<div class="col-xs-6">-->
<!--<input type="checkbox" class="login-form-control"/>-->
<!--{{'Remember me'|translate}}-->
<!--</div>-->
<!--<div class="col-xs-1 pull-right">-->
<!--<a class="float-right" ng-href="#/register">{{'register'|translate}}</a>-->
<!--</div>-->
<div class="col-sm-2">
<a ng-click="forgetPassword()">{{'Forget Password'|translate}}</a>
</div>
</div> <div class="row">
<div>
<button type="submit" name="submit" value="Login" class="btn btn-primary btn-block btn-flat">{{'Sign in'|translate}}</button>
</div>
</div> <div class="form-group row">
<!--<select class="login-form-control" ng-model="selectedTenant" ng-options="t.name for t in all_tenants" required ng-disabled="all_tenants.length===1">-->
<!--</select>-->
<input hidden name="tenant" value="{{selectedTenant}}" />
</div>
</form>
</div>
</div>
</div>
</div> <a id="bottom"></a>
</div>
</div>

Angular 回到顶部 滚动到特定的页面位置的更多相关文章

  1. Angular回到顶部按钮指令

    之前的分页代码指令化在线下测试没有问题,到服务器上就不运行了,所以那个先放一放. 今天来把"回到顶部"按钮指令化.首先是页面html: <!--回弹按钮--> < ...

  2. 小程序scroll-view实现回到顶部

    一.wxml页面:catchtap阻止冒泡事件. <view class="gotop" hidden='{{!cangotop}}'catchtap="goTop ...

  3. 页面滚动事件和利用JS实现回到顶部效果

    页面滚动 事件:window.onscroll, 获得页面滚动位置:document.body.scrollTop: HTML代码: 这里注意此处逻辑,大于500就显示,否则就隐藏,还有注意如果变量名 ...

  4. 关于angular跳转路由之后不能自动回到顶部的解决方法

    Question: angular2 scroll top on router change 当我们在第一个路由滑动到底部当我们点击导航跳转到另一个路由时页面没有回到顶部而是保持上一个路由的滚动位置, ...

  5. 【JQ+锚标记实现点击页面回到顶部】

    前言:今天想写个页面常用到的[点击回到页面顶部或是首页的功能],生活和职场一样,总会有低谷的时候,这个时候咱也别怂.别怂.别怂,说三遍!那都不是事,工作没了,再找呗,就像我上周五,团队解散那天,我是笑 ...

  6. js——页面回到顶部

    很久都没有去慕课网学习学习了,刚恰好就看见了一个用的比较多的小例子——页面回到顶部,记得之前自己也是在初学web时,被这个坑了一回,因此今天特地拿来分享分享…… <!DOCTYPE html&g ...

  7. jacascript 滚动 scroll 与回到顶部

    前言:这是笔者学习之后自己的理解与整理.如果有错误或者疑问的地方,请大家指正,我会持续更新! 滚动 scroll scrollHeight 表示元素的总高度,包括由于溢出而无法展示在网页的不可见部分: ...

  8. jQuery实现页面回到顶部功能

    <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title&g ...

  9. js刷新页面不回到顶部

    今天遇到刷新页面不回到顶部的需求 window.location.reload();方法已经解决了问题,但是ie8不支持,后来采用的是锚点这个方法 window.location = '/plan/g ...

随机推荐

  1. 解决Error:Android Dex: com.android.dex.DexIndexOverflowException: Cannot merge new index 65918 into a

    错误:Error:Android Dex: com.android.dex.DexIndexOverflowException: Cannot merge new index 65918 into a ...

  2. Go语言中字符串的查找方法小结

    这篇文章主要介绍了Go语言中字符串的查找方法小结,示例的main函数都是导入strings包然后使用其中的方法,需要的朋友可以参考下   1.func Contains(s, substr strin ...

  3. 在windows中将Tomcat作为服务启动

    http://www.cnblogs.com/chuyuhuashi/archive/2012/04/28/2475315.html ————————————————————————————————— ...

  4. 修改多渠道打包的App名

    archiveNameFormat = '${flavorName}-${projectName}-${versionName}-${versionCode}'

  5. Ubuntu16.04+cuda8.0+cuDNNV5.1 + Tensorflow+ GT 840M安装小结

    最近重装系统,安装了tensorflow的配置环境 总结一下. 参考资料 http://blog.csdn.net/ZWX2445205419/article/details/69429518 htt ...

  6. 【NOIP模拟题】Permutation(dp+高精度)

    首先我们可以这样想: 设状态f[i, j]表示1-i序列有j个'<'的方案数 那么考虑转移 因为i比i-1大,所以可以考虑从i-1来转移.首先i是要插入1-i-1这个序列的,所以我们可以思考插入 ...

  7. Codeforces Round #265 (Div. 2)

    http://codeforces.com/contest/465 rating+7,,简直... 感人肺腑...............蒟蒻就是蒟蒻......... 被虐瞎 a:inc ARG 题 ...

  8. PHPmailer发送邮件时的常见问题及解决办法

    来源:http://www.chinastor.com/a/jishu/mailserver/0G392262014.html 使用PHPmailer发送邮件时的常见问题总结: 一,没有定义发送邮箱$ ...

  9. m2014-c->c模拟java的hashmap容器类

    转自:http://bbs.csdn.net/topics/390034346 在java中像ArrayList,HashMap都是现成的,在java.util包中,用的时候直接import java ...

  10. c++11——多线程

    c++11中增加了线程以及线程相关的类,很方便的支持了并发编程. 1. 线程 线程创建     使用std::thread创建线程,提供线程函数或者函数对象即可,并且可以指定线程函数的参数. #inc ...