angular中使用锚点
来源:互联网 发布:高校财经数据库 编辑:程序博客网 时间:2024/05/20 13:38
http://blog.csdn.net/M_killer/article/details/50394254
angular.module('myApp', ['ngRoute'])
.run(['$anchorScroll', function($anchorScroll) {
$anchorScroll.yOffset = 50;
// 默认向下便宜50px
// 在此处配置偏移量
}])
.controller('View1Ctrl', ['$scope', '$location', '$anchorScroll', function ($scope, $location, $anchorScroll) {
$scope.demo = function () {
$location.hash('test');
$anchorScroll();
//移动到锚点
};
}]);
angular.module('myApp', ['ngRoute'])
.run(['$anchorScroll', function($anchorScroll) {
$anchorScroll.yOffset = 50;
// 默认向下便宜50px
// 在此处配置偏移量
}])
.controller('View1Ctrl', ['$scope', '$location', '$anchorScroll', function ($scope, $location, $anchorScroll) {
$scope.demo = function () {
$location.hash('test');
$anchorScroll();
//移动到锚点
};
}]);
阅读全文
0 0
- angular中使用锚点
- Angular 中 setInterval 使用
- angular 中使用md5
- angular中使用ECharts
- [笔记]Angular中partials使用
- 在Angular中使用promise
- angular中filter的使用
- angular中select的使用
- 在angular中 如何跳到指定的锚点($anchorScroll)
- Angular开发(二十八)-angular开发中分页的使用
- angular select中ng-options使用
- angular中cookies的简单使用
- angular中$watch的简单使用
- angular js 中使用 wdatepicker控件
- 在angular应用中使用HTML组件
- 在Angular项目中使用PrimeNG组件
- 如何在Angular中使用jquery
- angular中使用ngCookies来操作cookie
- 17.11.07日报
- 洛谷P1962 斐波那契数列
- Java中String的常用API
- NUMA架构下的CPU拓扑
- wxWidgets教程(11)——App与进程管理
- angular中使用锚点
- Java 字符串Split方法的一个坑
- 深入理解机器学习:从理论到算法-习题全解之第二十章:神经元网络
- leetcode: 19. Remove Nth Node From End of List
- Javaweb-xml编程-考生成绩管理系统(2)
- STM32 gcc编译环境搭建
- vsftpd服务
- RSA不同于模数攻击的破解法
- Python 练习实例1