In fact, a relatively hindsight knowledge, with the NG basis to see this will have a deeper understanding, but not suitable for getting started.
The AngularJS application consists of the following:
View, which is HTML.
Model (models), the data available in the current view.
Controller, the JavaScript function, can add or modify properties.
Scope is a model and a link between view and controller.
It's all annotated with//. Because you can't use shortcut keys.
Give an example
Using JS, basically just need to focus on the body inside the things just fine
<!DOCTYPE HTML><HTML><Head><MetaCharSet= "Utf-8"><Scriptsrc= "Https://cdn.bootcss.com/angular.js/1.4.6/angular.min.js"></Script></Head><Body>//Declare this app is MyApp, controller is Personctrl<DivNg-app= "MYAPP"Ng-controller= "Personctrl">//ng-model is actually declaring a variable, two-way binding, as long as the value of the variable is changed, the place to use this variable will immediately change the name:<inputtype= "text"Ng-model= "FirstName"><BR>Surname:<inputtype= "text"Ng-model= "LastName"><BR><BR>//Use the method name defined inside the controller: {{fullName ()}}</Div>//In the controller, define some actions through scope<Script>varapp=Angular.module ('myApp', []); App.controller ('Personctrl', function($scope) {//This is just the initialized value, so you don't need any ng-init.$scope. FirstName= "John"; $scope. LastName= "Doe"; //declares a function$scope. FullName= function() { return$scope. FirstName+ " " +$scope. LastName; }});</Script></Body></HTML
ANGULARJS Learning 1-Basic knowledge