`
sillycat
  • 浏览: 2551366 次
  • 性别: Icon_minigender_1
  • 来自: 成都
社区版块
存档分类
最新评论

Hybrid(3)More Meteor Example - Social

 
阅读更多
Hybrid(3)More Meteor Example - Social

Following the document from here
http://angular-meteor.com/tutorials/angular1/bootstrapping

1. Bootstrapping
Create the project
> meteor create socially

Just build index.html with only <body> tag
<body>
     <p>Nothing</p>
</body>

Meteor scans all the HTML files in the application and concatenates them together.
So display will be as follow:
Nothing now

Welcome to Meteor!

Click Me

You've pressed the button 0 times.

Add Angular
> meteor add urigo:angular

Create an angular file with name index.ng.html, because we have .ng.html, so Blaze will not compile it.
<p>nothing here {{ 'yet' + '!' }}</p>
<p>1 + 2 = {{ 1 + 2 }}</p>

Then we create our app.js
if(Meteor.isClient){
    angular.module('socially',['angular-meteor']);

}

http://docs.meteor.com/#/full/meteor_isclient
Meteor.isClient
Meteor.isServer
Meteor.isCordova

Our index.html will including the angular application as follow:
<body ng-app="socially">
    <div ng-include="'index.ng.html'"></div>
</body>

2. Static Template & Dynamic Template
This will work with angularJS
<div ng-controller="PartiesListCtrl">
  <ul>
    <li ng-repeat="party in parties">
      {{party.name}}
      <p>{{party.description}}</p>
    </li>
  </ul>
</div>

if(Meteor.isClient){
    angular.module('socially',['angular-meteor']);

    angular.module('socially').controller('PartiesListCtrl', ['$scope',
        function($scope){
          $scope.parties = [
            {'name': 'Dubstep-Free Zone',
              'description': 'Can we please just for an evening not listen to dubstep.'},
            {'name': 'All dubstep all the time',
              'description': 'Get it on!'},
            {'name': 'Savage lounging',
              'description': 'Leisure suit required. And only fiercest manners.'}
          ];

      }]);
}

3. Data Binding
http://angular-meteor.com/tutorials/angular1/3-way-data-binding
Mongo.Collection
client - minimongo, client-side in-memory mongoldb backed by local storage with server sync over http
https://github.com/mWater/minimongo

server - Mongo

4. Adding/Removing Objects and Angular event Handling
http://angular-meteor.com/api/AngularMeteorCollection

5. Routing & Multiple Views
> meteor add angularui:angular-ui-router

6. Bind One Object
http://angular-meteor.com/api/meteorObject

7. Folder Structure
https://github.com/Urigo/meteor-angular-socially

8. User Accounts, Authentication and Permissions
http://docs.meteor.com/#/full/allow
http://docs.meteor.com/#/full/meteor_loginwithexternalservice

auth
https://developers.google.com/identity/sign-in/web/backend-auth
http://stackoverflow.com/questions/8311836/how-to-identify-a-google-oauth2-user/13016081#13016081
http://stackoverflow.com/questions/12296017/how-to-validate-a-oauth2-0-access-token-for-a-resource-server

9. Privacy and publish-subscribe function
auto publish pushes a full copy of database to each client.
http://www.meteorpedia.com/read/Understanding_Meteor_Publish_and_Subscribe

10. Deploying Your App
Not suitable for me. I need to deploy it somewhere else.

11. Running your application on Android or iOS
http://angular-meteor.com/tutorials/angular1/running-your-app-on-android-or-ios-with-phoneGap

12. Search, Sort, Pagination and Reactive Vars
http://angular-meteor.com/tutorials/angular1/search-sort-pagination-and-reactive-vars

13. Creating AngularJS filter

14. Meteor method with promises

15. Conditional template directives with AngularJS

16. Google Map
http://angular-meteor.com/tutorials/angular1/google-maps

17. CSS and Bootstrap
http://angular-meteor.com/tutorials/angular1/css-less-and-bootstrap

18. ..

19. 3rdParty Libraries
http://angular-meteor.com/tutorials/angular1/3rd-party-libraries
https://atmospherejs.com/

20. Handling Files with CollectionFS
https://github.com/CollectionFS/Meteor-CollectionFS

All API
http://angular-meteor.com/api/meteorCollection



References:
http://sillycat.iteye.com/blog/2221893
http://sillycat.iteye.com/blog/2231030

authentication
http://www.riskcompletefailure.com/2013/11/client-server-authentication-with-id.html
https://developers.google.com/identity/sign-in/web/

mongo URL
http://stackoverflow.com/questions/23786647/meteor-up-deployment-cant-use-meteor-mongo-url
https://github.com/arunoda/meteor-up

angular and REST
http://fdietz.github.io/recipes-with-angular-js/consuming-external-services/consuming-restful-apis.html
https://developers.google.com/identity/protocols/OpenIDConnect


example
https://github.com/nate-strauser/wework

https://github.com/awatson1978/meteor-cookbook
https://github.com/ericdouglas/Meteor-Learning

angular meteor
http://angular-meteor.com/
http://angular-meteor.com/tutorials/angular1/bootstrapping
https://www.meteor.com/tutorials/angular/creating-an-app

crawl
https://github.com/timbrandin/meteor-crawler
https://medialab.github.io/artoo/
https://github.com/jbdemonte/linkedin-crawler
http://stackoverflow.com/questions/11708387/get-contents-of-link-tag-with-javascript-not-css/18447625#18447625
分享到:
评论

相关推荐

    前端开源库-meteor-html-tools

    3. **事件处理**:通过meteor-html-tools,开发者可以在HTML元素上直接添加事件监听器,简化了事件处理代码,提高了代码可读性和维护性。 4. **模板助手**:模板助手是Blaze中的一个重要概念,它们是自定义函数,...

    前端开源库-meteor-random-window-crypto

    "meteor-random-window-crypto"是一个专为前端设计的开源库,它在 Meteor 框架下提供了随机数生成和基于浏览器内置的 window.crypto API 的加密功能。本文将深入探讨这个库的核心功能、工作原理以及如何在实际项目中...

    meteor-bootstrap-os.windows.x86_64.tar.gz

    https://packages.meteor.com/bootstrap-link?arch=os.windows.x86_64

    前端开源库-meteor-ejson-safe

    【标题】:Meteor EJSON-Safe 在前端开发中,数据的安全性和完整性是至关重要的,尤其是在实时应用中。Meteor EJSON-Safe是一个针对 Meteor 框架的扩展库,它专注于增强EJSON(Extensible JSON)的安全性。EJSON是...

    前端开源库-meteor-reactive-object-map

    【标题】"meteor-reactive-object-map" 是一个专为前端开发者设计的开源库,它主要在 Meteor 框架中提供了一种响应式对象映射的功能。这个库是为了帮助开发者在使用 Meteor 和 React(或者其他的火焰图模板)时,...

    Meteor-zookeeper-core 是一个对zookeeper操作的集成方案

    Meteor-zookeeper-core 是一个对zookeeper操作的集成方案,其核心设计目的,对内高内聚、无入侵, 采用fastjson序列化与反序列化,内置了数据本地缓存,实现节点监听;对外开箱即用、易扩展、轻量级,提供丰富API方法,...

    meteor-user-presence-example-chat

    这是使用流星包跟踪用户状态的示例。在线示例本地运行git clone https://github.com/Konecty/meteor-user-presence-example-chatcd meteor-user-presence-example-chatmeteor

    meteor-example-app:使用analytics.js和analytics-node的Meteor应用程序的基本示例

    流星示例应用使用analytics.js和analytics-node设置Meteor应用程序meteor create meteor-example-app cd meteor-example-app meteor add pahans:segment.io 添加analytics.load("YOUR_WRITE_KEY"); 到meteor-example...

    前端开源库-meteor-apollo-accounts

    【前端开源库-meteor-apollo-accounts】是一个用于构建现代Web应用的综合解决方案,它将前端框架、数据库、服务器和实时通信集于一体。这个库主要针对JavaScript开发者,特别是那些使用 Meteor 框架和 GraphQL...

    meteor-gagarin-example-the-simplest-one:尝试测试如何使用加加林测试流星应用程序

    安装 npm install gagarin -g跑步1 启动应用 meteor2 测试应用 gagarin -t 3000 ➜ gagarin-example-the-simplest-one git:(master) ✗ gagarin -t 3000 --- building app =&gt; /Users/me/projects/gagarin/gagarin-...

    前端开源库-meteor-reactive-var

    在这个背景下,`meteor-reactive-var`作为一个优秀的开源库,应运而生。它源于Meteor框架,提供了一种简单而强大的方式来处理前端的响应式变量,使得开发者能够轻松地实现数据的实时更新和界面的即时响应。 `meteor...

    meteor系列博客demo-004

    3. **MongoDB数据库**:Meteor默认使用MongoDB作为数据存储,这是一个NoSQL数据库,支持JSON格式的数据,非常适合动态和实时应用。 4. **Isomorphic JavaScript**:Meteor鼓励使用同构JavaScript,这意味着服务器端...

    前端开源库-meteor-ordered-dict

    在前端开发领域,`meteor-ordered-dict` 是一个非常重要的工具,尤其对于使用 Meteor 框架的开发者来说。Meteor 是一个全栈 JavaScript 开发框架,它允许开发者用同一种语言进行前后端的开发,大大提升了开发效率。`...

    meteor-link-accounts, ( 查找维护者) Meteor 链接帐户包 在这个PR上,基于.zip

    meteor-link-accounts, ( 查找维护者) Meteor 链接帐户包 在这个PR上,基于 Meteor 链接帐户用于链接社交网络帐户的Meteor 软件包,无需任何麻烦。下一步查找 Apollo ( graphQL )查看合并到 Meteor/帐户中。更新更...

    meteor-up-legacy, 生产质量 Meteor 部署.zip

    meteor-up-legacy, 生产质量 Meteor 部署 Meteor这里版本不再维护。Mupx 是稳定版本。新开发移至以下位置: https://github.com/kadirahq/meteor-up 。产品质量 Meteor 部署Meteor 是一个支持你将任何 Meteor

    meteor-redux-middlewares, 中间件将 Meteor 反应源与redux存储同步.zip

    meteor-redux-middlewares, 中间件将 Meteor 反应源与redux存储同步 meteor-redux-middlewares 中间件将 Meteor 反应源与redux存储同步。现场演示插件GitHub上的演示源在 npm 上的包在大气环境中的包。安装使用 npm...

    meteor-cordova-social-sharing:http的流星端口

    用法meteor add lpender:cordova-social-sharing请参阅的用法。

    meteor-electron-client, 使用 Meteor 构建桌面应用程序的样板 !.zip

    meteor-electron-client, 使用 Meteor 构建桌面应用程序的样板 ! meteor-electron-client使用 Meteor 构建桌面应用程序的样板 !:为什么要构建带有的电子应用?这个项目是由这个视频启发的 ! Meteor 是在构建...

    meteor-starter-master.zip_Meteor!_meteor开发案例

    "meteor-starter-master.zip"是一个包含 Meteor 开发基础示例的压缩包,适合初学者理解和学习 Meteor 的核心概念和工作流程。 在"meteor-starter-master"这个项目中,你可能会遇到以下关键知识点: 1. **Blaze模板...

    前端开源库-meteor-mongo-id

    【标题】"前端开源库-meteor-mongo-id"是指一个专为前端开发设计的开源库,它主要与MongoDB数据库的ObjectID(_id)字段交互。MongoDB中的_id是每个文档的唯一标识符,通常由MongoDB自动生成,但有时在前端处理数据...

Global site tag (gtag.js) - Google Analytics