Meteor 1.8 and AngularJS (1.x)


#1

Hi all,

I have this angularJS app that I have been developing since years ago.
Now I am thinking about porting it to a newer meteor version.
Just to try angularJS with meteor 1.8, I created a very basic app to try to bootstrap angular and show a simple line in html.

These are the steps I’m taking:

meteor create socially (it adds an app with meteor version 1.8.0.2)
cd socially
meteor remove blaze-html-templates
meteor add angular-templates
meteor npm install --save angular angular-meteor babel-runtime

I have just three files in client:

main.js:

import angular from 'angular';
import angularMeteor from 'angular-meteor';

angular.module('socially', [
    angularMeteor, 
])

index.html:

<body ng-app="socially">
       <div> ng-include src="'client/main.html'"</div>
</body>

main.html:

<p>Nothing here {{ 'yet' + '!' }}</p>

Now, this is all the app, just one .js file and two html files. When I run meteor and the app in chrome, nothing happens. It seems angular is not loaded, so main.html is not being (ng-) included and the expression on it does not get resolved.

Now, I ported the app, exactly as it is in meteor 1.8, to meteor 1.6, and everything runs and shows perfectly.

Can anybody help me to find what I’m missing or doing wrong?

Many thanks and bye …