I am a total newie integrating Angular with Meteor…
I have the following file
Meteor.startup(function () {
if (Tutors.find().count() === 0) {
var tutors = [
{'name': 'Dubstep-Free Zone',
'description': 'Fast just got faster with Nexus S.'},
{'name': 'All dubstep all the time',
'description': 'Get it on!'},
{'name': 'Savage lounging',
'description': 'Leisure suit required. And only fiercest manners.'}
];
for (var i = 0; i < tutors.length; i++)
Tutors.insert({name: tutors[i].name, description: tutors[i].description});
}
Thanks so much Uri. It worked nicely! I have been studying your angular-meteor videos that I could recognize your voice on the street.
This is a question to the community:
When I run this code in Angular-Meteor within the index.html, the ng-model works well showing the “firstName” but if I call the ng.html file with (div ui-view)(/div) to the index.html the name does not show.
<div ng-init="firstName='John'">
<p>Input something in the input box:</p>
<p>Name: <input type="text" ng-model="firstName"></p>
<p>You wrote: <div ng-bind="firstName"></div></p>
</div>
Any wisdom to share?
SOLVED::: the new controller I created was the blockage. I tested with ParitesListCtrl and worked,