javascript Angular.js
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了javascript Angular.js相关的知识,希望对你有一定的参考价值。
1// Converting a normal array into observables.
ELEMENT_DATA: Post[] = [
{ position: 0, title: "Post One", category: "Web Development", date_posted: new Date() ,body: "Body 1"},
{ position: 1, title: "Post Two", category: "Android Development", date_posted: new Date() ,body: "Body 2"},
{ position: 2, title: "Post Three", category: "IOS Development", date_posted: new Date() ,body: "Body 3" },
{ position: 3, title: "Post Four", category: "Android Development", date_posted: new Date() ,body: "Body 4"},
{ position: 4, title: "Post Five", category: "IOS Development", date_posted: new Date() ,body: "Body 5"},
{ position: 5, title: "Post Six", category: "Web Development", date_posted: new Date() ,body: "Body 6"},
];
getData(): Observable<Post[]> {
return Observable.of<Post[]>(this.ELEMENT_DATA);
}
以上是关于javascript Angular.js的主要内容,如果未能解决你的问题,请参考以下文章
javascript Angular JS(1.x)ES6组件示例
Web 抓取 - 如何通过 Angular.js 访问以 JavaScript 呈现的内容?
使用 javascript 或 angular js 隐藏侧边栏
从纯 Javascript/JQuery 调用 Angular js 函数
angular js 初学
Angular JS 学习之简介