Problems Running Angular Localhost

Asked

Viewed 324 times

0

I can’t link Angular to my project .

This is my Structure :

inserir a descrição da imagem aqui

I downloaded Angular via Bower and to link it I used the following Script in my Views src=".. /.. /.. /bower_components/angular/angular.min.js"script>

But when I’m gonna do a simple test of the kind :

{{test}}

The browser returns

GET http://localhost:3000/bower_components/angular/angular.min.js net:ERR_ABORTED

Somebody please help me

  • Friend, I believe some configuration files are missing

  • Can you tell me which ones? Or somewhere I can find this solution ? Please

  • What I can suggest is to create an example app, which every tutorial will show you, ng new <nome-projeto> and observes the structure, probably your project q vc downloaded this missing something to generate this error.

1 answer

0


You probably can’t find the file because of the configuration that was made for the localhost (for example, put the server to point to src folder and directly link a file in the code to a higher folder). Add the script via Cdn as in the example below, if it works then that’s it. But if you want to use the angular in a project better generate an app because everything comes configured.

<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.23/angular.min.js"></script>

<div ng-app>
  <p>1 + 1 é igual a {{ 1 + 1 }}</p>
</div>

Browser other questions tagged

You are not signed in. Login or sign up in order to post.