No description, website, or topics provided.
JavaScript
Pull request Compare This branch is 1 commit ahead, 1 commit behind lvbreda:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
README.md
angular.js
client.js
package.js
server.js

README.md

Angularjs in Meteor

How to use it

The angularjs app is always called meteorapp.

angular.module('meteorapp', [meteor]).
    config(['$routeProvider', function($routeProvider) {
    $routeProvider.
         when('/index', {templateUrl: 'partials/index.html',   controller: MeteorCtrl}).
         otherwise({redirectTo: '/'});
}]);

Directory structure

 /public
     /partials
     angular.html(Main screen should contain body content)

Usage

app.controller('MeteorCtrl', ['$scope','$meteor',function($scope,$meteor){
  $scope.todos = $meteor("todos").find({});
    $meteor("todos").insert({
        name: "Do something",
        done: false
    });
}]);

<div ng-repeat="todo in todos">
    <input type="text" ng-model="todo.name"/>
    <button ng-click="todo.save()">Save</button>
    <button ng-click="todo.remove()">Remove</button>
</div>

Deploying

Make sure that you always write angularjs code that can be minified, else use the --debug function. To deploy with Heroku use this buildpack. Thanks to @mimah https://github.com/mimah/heroku-buildpack-meteorite