我想建立一個使用Angular和Ionic的新聞饋送應用程序。我堅持在這個階段,這種交易與UI路由和http請求,我不知道該去哪裏從這裏。 在主要頁面申請這樣表示 角度離子新聞應用程序UI路由
這個數據newschannels的列表是從JSON文件,該文件是這樣的
{
"status": "ok",
"sources": [
{
"id": "abc-news-au",
"name": "ABC News (AU)",
"description": "Australia's most trusted source of local, national and world news. Comprehensive, independent, in-depth analysis, the latest business, sport, weather and more.",
"url": "http://www.abc.net.au/news",
"category": "general",
"language": "en",
"country": "au",
"sortBysAvailable": [
"top"
]
},
{
"id": "ars-technica",
"name": "Ars Technica",
"description": "The PC enthusiast's resource. Power users and the tools they love, without computing religion.",
"url": "http://arstechnica.com",
"category": "technology",
"language": "en",
"country": "us",
"sortBysAvailable": [
"top",
"latest"
]
}]
}
我現在的目標是,當有人點擊任何牽強報紙我應該獲取sources [i] .id並使用它來修改一個url並將它傳遞給另一個http()。get和 使用這些數據在另一個頁面上顯示它。我該怎麼做 ?有什麼建議麼?
其完美的工作。非常感謝 –