Skip to content

gartz/angular-meteor-example

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

angular - meteor - example

Setup

clone the repositry

git clone git@github.com:tom-muhm/angular-meteor-example.git
  1. start the application - so meteroite can download the plugins:

    mrt

  2. fix the error: Object # has no method 'require' by replacing the first three lines in '.meteor/meteorite/packages/angularjs/server.js' with:

    var connect = Npm.require("connect"); var fs = Npm.require("fs"); var path = Npm.require("path"); var Fiber = Npm.require("fibers");

    (Note: this error only occurs for the angulurjs plugin v2.0.0 with meteor 0.6+)

    Run

    1. Start your app with:

      mrt

    2. open the browser console and add new items with:

      angular.element('[ng-controller=MeteorCtrl]').scope().Todos.insert({name: 'Task x'})

    3. see the magic happen

    DIY

    1. install meteorite: https://atmosphere.meteor.com/wtf/app

    2. create a new app:

      mrt create angular-meteor-example && cd angular-meteor-example

    3. install the anguluarjs plugin:

      mrt add angularjs

    4. delete the default html and js files

    5. copy the files from my repository 'angular-meteor-example.js' and 'public/angular.html' into your project

    6. fix the error: "Object # has no method 'require'" by following step 2. from the setup above

      Just some notes for myself

      acces meteor service from the browser console:

      angular.element('[ng-controller=MeteorCtrl]').injector().get('$meteor')
      angular.element('[ng-controller=MeteorCtrl]').injector().get('$meteor')('todos').find({})
      

About

a simple example meteor application which uses the angularjs v2.0.0 plugin from https://atmosphere.meteor.com/package/angularjs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published