[Angular-Scaled web] 5. ui-router $stateParams for sharing information
When using ui-route, we want to pass the information with the url.
Example:
angular.module('categories.bookmarks', [
'categories.bookmarks.create',
'categories.bookmarks.edit',
'eggly.models.categories',
'eggly.models.bookmarks'
])
.config(function ($stateProvider) {
$stateProvider
.state('eggly.categories.bookmarks', {
url: 'categories/:category',
views: {
'bookmarks@': {
controller: 'BookmarksController',
templateUrl: 'app/categories/bookmarks/bookmarks.tmpl.html'
}
}
})
})
.controller('BookmarksController', function ($scope, $stateParams) {
$scope.currentCategory = $stateParams.category;
$scope.stateParams = $stateParams;
})
;
Using :category to pass the params in url. And we can get the params in Controller by using $stateParams.

[Angular-Scaled web] 5. ui-router $stateParams for sharing information的更多相关文章
- 混合开发 Hybird Ionic Angular Cordova web 跨平台 MD
Markdown版本笔记 我的GitHub首页 我的博客 我的微信 我的邮箱 MyAndroidBlogs baiqiantao baiqiantao bqt20094 baiqiantao@sina ...
- 2015年最全的移动WEB前端UI框架
目前,众多互联网公司APP都嵌入了大量的HTML5,移动端的开发越来越重视,HTML5的运用场景也越来越多了.在移动WEB开发的过程中,使用合适的移动WEB UI框架可以大大提升我们的开发效率.下面P ...
- Huxley 是一个用于Web应用 UI 测试的工具
Huxley 是一个用于Web应用 UI 测试的工具,由 Pete Hunt 和 Maykel Loomans 用 Python 开发. UI 测试比较令人头疼. UI测试不好写,而且很容易失效: ...
- 收集几个Web前端UI框架
原文:http://www.isaced.com/post-200.html 关于Web前端UI库/框架,我觉得是非常方便的东西,对于我们这种业余的Web开发人员,有时候要写点前端代码的时候把UI框架 ...
- 从Web借鉴UI设计
从Web借鉴UI设计 用户体验已经成为衡量应用软件质量的重要标准.在过去我们可能会惊叹于某个Web应用的华丽界面,现在,随着HTML5的强势登场,各类表现层技术及开发框架的发布,Web与窗体应用的界限 ...
- web前端UI框架
分类:WEB前端 时间:2016年1月13日 目前,众多互联网公司APP都嵌入了大量的HTML5,移动端的开发越来越重视,HTML5的运用场景也越来越多了.在移动WEB开发的过程中,使用合适的移动WE ...
- 工作流,WEB框架,UI组件网络收集整理
工作流,WEB框架,UI组件网络收集整理 在博客园上逛了好多年,随手收录了一些工作流,WEB开发框架,UI组件,现在整理一下与大家分享. 由于个人能力与精力有限,望各位园友在评论中补充,我将全部整理到 ...
- Web 前端 UI 组件库文档自动化方案 All In One
Web 前端 UI 组件库文档自动化方案 All In One 需求 自动化 动态 好用 markdown element-ui 中示例和说明按照一定规则写在md文件中,调用md-loader将md文 ...
- Portswigger web security academy:Cross-origin resource sharing (CORS)
Portswigger web security academy:Cross-origin resource sharing (CORS) 目录 Portswigger web security ac ...
随机推荐
- Python并发编程-进程池的返回值
同步或异步获取返回值 #p = Pool() #p.map(funcname,iterable) 默认异步的执行任务,且自带close,join功能 #p.apply(), 同步调用进程池的方法 #p ...
- Mybatis 源码分析之一二级缓存
一级缓存 其实关于 Mybatis 的一级缓存是比较抽象的,并没有什么特别的配置,都是在代码中体现出来的. 当调用 Configuration 的 newExecutor 方法来创建 executor ...
- 【数学】Codeforces Round #470 (Div2) B
题目链接:http://codeforces.com/contest/948/problem/B 题目大意:有一个大于等于3的数X0,任意选择一个小于X0的质数P0,乘以一个数k使k*P0>=X ...
- openwrt 控制gpio口的方法
利用i2c来控制gpio口 1.编译驱动或者安装驱动 # opkg update # opkg install kmod-i2c-gpio-custom kmod-i2c-core# 加载驱动 # i ...
- Am335x u-boot 启动过程中的系统频率配置
Am335x的时钟结构分为:ADPLLS和ADPLLLJ 1.ADPLLS用来配置Core_CLK,Dispaly_clk,ARM系统CLK(mpu_clk),DDR PLLs_clk 2.ADPLL ...
- MySQL 之 多表查询
一.多表联合查询 #创建部门CREATE TABLE IF NOT EXISTS dept ( did int not null auto_increment PRIMARY KEY, dname V ...
- FastReport.Net使用:[36]"续表"
1. RepeatedBand的打印和子报表的使用. RepeatedBand实现方法:设置Band为每页重复.注意,从第二次打印开始,就是重复打印了.第一次打印不认为是RepeatedBand. 报 ...
- 【CF contest/792/problem/E】
E. Colored Balls time limit per test 1 second memory limit per test 256 megabytes input standard inp ...
- stl upper_bound()
http://blog.csdn.net/niushuai666/article/details/6734650 upper_bound( a , b , k )返回有序升序序列[a,b)中能放下 ...
- CodeForces - 1009D Relatively Prime Graph
题面在这里! 直接暴力找点对就行了,可以证明gcd=1是比较密集的,所以复杂度略大于 O(N log N) #include<bits/stdc++.h> #define ll long ...