Closed shenkev closed 7 years ago
the require
instructions assume you are using a module loader like webpack on the frontend. you are able to use angulartics just fine without it, just include
<script src="path/to/angulartics.js"></script>
in your html and inject 'angulartics'
do this for any other modules you need (angulartics-google-analytics, etc)
Quick question about how the project is assumed to be setup. We aren't using the node_module "angular". Instead we're pulling Angular from the web in index.html. Will this not work?
Right now we start our app using "node server.js" which serves index.html.
Index.html looks something like:
Index.html imports app.js and app.js looks something like:
I'm a little confused because the instructions for setting up with npm say you need to call "require('angulartics')" which I assumed is done in app.js for our case. However, we can't call require there since it's client-side js?