AngularJs: Reload page
<a ng-click="reloadRoute()" class="navbar-brand" title="home" data-translate>PORTAL_NAME</a>
$scope.reloadRoute = function() {
$route.reload();
}
$scope.reloadRoute = function() {
$window.location.reload();
}
Later edit (ui-router):
As mentioned by JamesEddyEdwards and Dunc in their answers, if you are using angular-ui/ui-router you can use the following method to reload the current state / route. Just inject $stateinstead of $route and then you have:
$scope.reloadRoute = function() {
$state.reload();
};
AngularJs: Reload page的更多相关文章
- AngularJS学习笔记
一.初识AngularJS:1.Angularjs通过创建实时模板来代替视图,而不是将数据合并进模板后更新DOM,任何一个独立视图组件中的值都是动态替换的. 二.数据绑定和第一个AngularJS W ...
- AngularJs学习笔记--Using $location
原版地址:http://code.angularjs.org/1.0.2/docs/guide/dev_guide.services.$location 一.What does it do? $loc ...
- [译]用AngularJS构建大型ASP.NET单页应用(一)
原文地址:http://www.codeproject.com/Articles/808213/Developing-a-Large-Scale-Application-with-a-Single 渣 ...
- AngularJS ui-router (嵌套路由)
http://www.oschina.net/translate/angularjs-ui-router-nested-routes AngularJS ui-router (嵌套路由) 英文原文:A ...
- 使用 AngularJS 开发一个大规模的单页应用(SPA)
本文的目标是基于单页面应用程序开发出拥有数百页的内容,包括认证,授权,会话状态等功能,可以支持上千个用户的企业级应用. 下载源代码 介绍 (SPA)这样一个名字里面蕴含着什么呢? 如果你是经典的S ...
- Angularjs - 路由 angular-ui-router
注意,使用的路由不是官方的,而是第三方的.因为这个更加强大支持嵌套而且大家都是这样用的 http://www.tuicool.com/articles/zeiy6ff http://www.open- ...
- [Protractor] Testing With Protractor Page Objects
Protractor Page Objects are a recommended for testing your AngularJS applications. Page Objects abst ...
- Angularjs中的嵌套路由ui-router
先看看ng-router和ui-router的区别 (1)ng-route的局限性:一个页面无法嵌套多个视图,也就是说一个页面只能有包含一个页面一个控制器的切换. (2)ui-route的改进:在具 ...
- layui table数据表格reload where参数保留问题
layui table数据表格reload where参数保留问题 在使用layui过程中多多少少会遇到些问题 table reload 有个坑:reload时where参数会保留上次的参数,如果用 ...
随机推荐
- webupload-upload执行上传时,进入的路径与linux服务器上的不一致
将if判断处改为garage即可. 原因是因为if处判断处理没有执行,因为要需要把从garage开始的到后面的字符串都去掉才行 不然:local=http://www.xxx.com/garage s ...
- 第三十九节,python内置全局变量
vars()查看内置全局变量 以字典方式返回内置全局变量 #!/usr/bin/env python # -*- coding:utf8 -*- print(vars()) #输出 # {'__bui ...
- hdu_2111_Saving HDU(贪心)
题目连接:http://acm.hdu.edu.cn/showproblem.php?pid=2111 题意:给你n个物品的单位体积价值和体积,求装满容量v的背包的最大价值. 题解:乍一看还以为是背包 ...
- LeetCode OJ 108. Convert Sorted Array to Binary Search Tree
Given an array where elements are sorted in ascending order, convert it to a height balanced BST. 把一 ...
- LeetCode OJ 113. Path Sum II
Given a binary tree and a sum, find all root-to-leaf paths where each path's sum equals the given su ...
- contact form
use the existing service: http://www.foxyform.com/
- ILMerge 简单使用
ILMerge是合并.net的assembly的工具,最新版的支持.net 4.0的ILmerge下载: http://www.microsoft.com/downloads/details.aspx ...
- abstract class 和 interface区别
相同点: 1.都不能被直接实例化,都可以通过继承实现其抽象方法: 不同点: 1.接口支持多继承,抽象类只能由一个父类: 2.接口只能定义行为,抽象类既可以定义行为,又可以提供实现: 3.接口只包含方法 ...
- c_select 调用参数说明
c_select 调用 1. select系统调用select系统调用是用来让我们的程序监视多个文件描述符的状态变化的.程序会停在select这里等待,直到被监视的文件描述符有某一个或多个发生了状态改 ...
- centos mono
wget http://download.mono-project.com/sources/mono/mono-4.0.1.tar.bz2wget http://download.mono-proje ...