Advertisement
Guest User

Untitled

a guest
May 6th, 2016
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. Alunos = new Mongo.Collection('alunos');
  2.  
  3. if (Meteor.isClient) {
  4. angular.module('minhaApp', ['angular-meteor']);
  5.  
  6. //Controller AlunoListController
  7. angular.module('minhaApp').controller('AlunoListController', ['$scope', '$meteor', function ($scope, $meteor) {
  8.  
  9. $scope.alunos = $meteor.collection(Alunos);
  10.  
  11. $scope.add = function(form){
  12. Alunos.insert({nome:form.nome, sobrenome:form.sobrenome})
  13. }
  14. ......
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement