An example of how to route different views in an Angular App.
Warning: you can't simply open the index.html file in your browser. The file must be served by a local HTTP server. This is because Angular uses AJAX to request the view template files.
Use the http-server
node module to start a simple HTTP server in your current
directory. This server will just serve files in your current directory.
npm install -g http-server
Notice: you'll have to visit the address that the server prints when it starts.
You should visit http://127.0.0.1:3000 instead of trying to go to localhost
like you may be used to with nodemon.
- Fork or clone this repositoy
- cd into the directory
- run
http-server
- visit http://127.0.0.1:3000
All content is licensed under a CCBYNCSA 4.0 license. All software code is licensed under GNU GPLv3. For commercial use or alternative licensing, please contact legal@ga.co.