我爱编程

Begin with Angular

2016-12-12  本文已影响0人  George_Zeng

用intellij+angular写一个index.html

1.png 2.png 3.png

now check ur project in Intellij, the package.json is already there.


4.png

now back to Intellij, if u not plugin the .ignore in ur Intellij u'd better install it (the Intellij will remind u to install .ignore just follow the hint). U can also press ** command + , ** to open the preference then ** -> plugins -> Browse repositories... -> search ".ignore" -> install ** to install the plugin.


6.png

now back to intellij the ** angular.js ** is contented in the ** node_modules **


8.png
<html ng-app>
<head>    
  <script src="node_modules/angular/angular.min.js"></script></head>
<body>
  <div>
    <label>NameNameName:</label>    
    <input type="text" ng-model="yourName" placeholder="Enter a name here">    
    <hr>    
    <h1>Hello {{yourName}}!</h1>
  </div>
</body>
</html>

then open ur Browser and type ** localhost:8080 ** in the url to check ur first angular html.


10.png

Congratulations ! now u can write any code ur learned from angular.js !

上一篇 下一篇

猜你喜欢

热点阅读