惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

SecWiki News
SecWiki News
罗磊的独立博客
U
Unit 42
I
InfoQ
B
Blog RSS Feed
Google DeepMind News
Google DeepMind News
J
Java Code Geeks
Blog — PlanetScale
Blog — PlanetScale
The GitHub Blog
The GitHub Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
B
Blog
S
SegmentFault 最新的问题
V
Visual Studio Blog
Engineering at Meta
Engineering at Meta
Microsoft Security Blog
Microsoft Security Blog
月光博客
月光博客
Vercel News
Vercel News
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
A
About on SuperTechFans
博客园 - 三生石上(FineUI控件)
博客园_首页
腾讯CDC
F
Fortinet All Blogs
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Hugging Face - Blog
Hugging Face - Blog
MongoDB | Blog
MongoDB | Blog
阮一峰的网络日志
阮一峰的网络日志
D
Docker
N
Netflix TechBlog - Medium
云风的 BLOG
云风的 BLOG
Apple Machine Learning Research
Apple Machine Learning Research
Microsoft Azure Blog
Microsoft Azure Blog
Martin Fowler
Martin Fowler
人人都是产品经理
人人都是产品经理
酷 壳 – CoolShell
酷 壳 – CoolShell
爱范儿
爱范儿
大猫的无限游戏
大猫的无限游戏
V
V2EX
Last Week in AI
Last Week in AI
博客园 - 司徒正美
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
IT之家
IT之家
L
LangChain Blog
WordPress大学
WordPress大学
Y
Y Combinator Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
M
MIT News - Artificial intelligence
The Cloudflare Blog
T
The Blog of Author Tim Ferriss
宝玉的分享
宝玉的分享

Ionic

有没有熟悉 Ionic 的 - V2EX cordova/ionic App 实现微前端,求个最佳实践 - V2EX 有谁知道使用 ionic 框架的 APP 吗? - V2EX ionic 2 如何继承一个已经依赖注入 service 的基类? - V2EX ionic2.0@beta 版本文档 -转摘 中文教程哦 - V2EX 刚刚去 Ionic Framework 官方的 Showcase 试了一堆 Android app,感觉现在 Hybrid App 在 Android 上都好流畅,跟 3 年前参加比赛时相比感觉提升太多太多了 - V2EX [求助] Ionic 安装不能: Error: EACCES: permission denied, uv_cwd - V2EX ionic 使用百度地图 App 显示空白 - V2EX 哪位大神能发一个 ionic 利用百度地图 API 或者高德地图 API 定位获取当前位置的例子 - V2EX 能用 ionic 做手机站吗? - V2EX ionic 如何从后台动态获取数据? - V2EX 为什么 ionic 在浏览器和安卓上编译出的版本的布局不一样? - V2EX Ionic 可以做到无视 CORS 吗 - V2EX 这个节点下的一血,当然要由我拿下 - V2EX
Ionic+angularjs 传参数问题请教 - V2EX
likai · 2015-06-25 · via Ionic

公司要上APP。让我这个菜鸟来用Ionic+angularjs

现在要从首页文章列表页传参数到第二个页面。第二个页面根据首页传过来的文章ID参数查询数据库并显示文章内容,
配置:
$urlRouterProvider.otherwise("/news/0");
.state('news', {
url: "/news/:id",
templateUrl: "templates/news.html",
controller: 'NewsController'
})
.state('shownews', {
url: "/news/show/:id",
templateUrl: "templates/news-show.html",
controller: 'NewsController'
})
factory.NewsSrv下:
show = function (id) {
return ApiSrv.req("news.public.News.itemit", {id: id});//从远程取数据
}

angular.module.controller下

$scope.newsshow = NewsSrv.show($stateParams.id);

用a href从news页面传ID进shownews。
现在的问题是。NewsController怎么才能在传参数进入这个页面才开始?

现在我的是一加载第一个页面。请求了两次。第一次请求列表。第二次执行了$scope.newsshow,