Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

lvbreda/Meteor_angularjs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

19 Commits

Repository files navigation

Not maintained anymore at this time please use : https://github.com/Urigo/angular-meteor

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 5

AltStyle によって変換されたページ (->オリジナル) /