angular-new-router

Setting the script tag to access the new angular router


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.


Solution

  • 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!