0

I am starting to play with the new angular router. I did an npm install as was noted https://www.npmjs.com/package/angular-new-router. However, I am having difficulty setting up the script tag.

I am playing around with a tutorial to work with the router and the author sets up his router as so...

<script src="lib/router.es5.js">

However I am unable to access the script. I looked through the files on the node module.

I can find the router.es5.js file in the docs folder that runs inside the dist folder.

However I am unable to get that running. I have tried changing my folder name to be a better match. However, I am still not correctly accessing the file.

Additionally, I tried to go through the entire file directory with no success.

<script src="/angular-new-router/dist/docs/router.es5.js"></script>

I know this tutorial was from last April, so I am wondering if something has changed or if there is another way to make an install or how others are setting up their path?

***** update ***** i am following the link https://github.com/angular/router/pull/252/files.

I copied the script tag that the author is using on this

<script src="/node_modules/angular-new-router/dist/router.es5.js"></script>

This makes sense as the file is going through the node modules folder. I will change this to the answer unless someone knows a better/more correct way.

Winnemucca
  • 3,309
  • 11
  • 37
  • 66

1 Answers1

1

Check out this discussion I had with Brandon Roberts (towards the bottom), who seems to be in the know.

I've been using the router code referenced in his Github repo.

NOTE: This answer will no doubt be out of date very soon!

poshest
  • 4,157
  • 2
  • 26
  • 37
  • Awesome share. I really appreciate it. We are going to start playing with this at work. I did the install on his repo. Came across a couple of errors in my console, but the code is a great place to start. – Winnemucca Jan 07 '16 at 16:32