AngularJS Protocol file: //

3

Well, I'm doing an AngularJS embedded application that when the system (operational, not the application) starts, it opens the index.html that contains the angular application.

The first page works, but how do I get it to another page?

I tried using routes, but as it runs in the file: // protocol I do not have a context where I can do / otherpage.

How can I display another page with another controller?

    
asked by anonymous 21.10.2015 / 14:25

1 answer

0

To work with angular you need to have an http server. However you can achieve this in a very simple way.

1- Install the nodeJs and package manager of the node named npm

About the node: link

Installing nodeJs and npm: link

2- Create environment variable pointing to the nodeJs installation directory

Link to the statement: link

3- Navigate to the directory of your files at the prompt and run the following command: link

This command will upload an http server on port 8000. It is then only you to open the browser and navigate through the files. link

OBS: There are games to run through the file protocol. More will be a long-term problem. I recommend using this http server that is simple and powerful.

    
21.10.2015 / 15:19