Angularjs study for some time, a few days ago did a project. After finished want to use only learn angular test water, the results unexpectedly (learning too basic altogether don't know from that, or tangled)
Finally go to MU class net to see "Desert poor Autumn" of "Angularjs actual combat" video only some foundation, hope can let me understand the knowledge.
1, angular 4 core features:
MVC (Clarity of responsibilities, modularity of code)
Modularity (MVC is the means, the ultimate goal is modularity)
The instruction system (ANGULARJS does not go directly to the DOM, it uses the instruction system to process the DOM)
Bidirectional data binding
ANGULARJS-specific instruction system and bidirectional data binding
2, after talking about the 4 big core of things after spending a lot of space to talk about the front-end development needs of the environment, there is a need to see the link
3, controllers (Controller) in the use of the process of attention points
1. Do not attempt to re-use the controller, a director is generally responsible for a small block of views;
2. Do not manipulate the DOM in the controller, which is not the responsibility of the controllers (using the command system);
3. Do not do data formatting in the controller, Ng has a good form control;
4. Do not do data filtering operation in controller, NG has ¥filter service;
5. In general, controllers do not call each other, the controller directly interacts back through the event;
4. Routing
Routing is a very important function of controller;
Using the angular routing feature requires the installation of the routing module ... (The introduction of Angular-route.js is possible)
Definition: Using routing is very easy, and injecting ngroute dependency into our application Mian module is possible.
var Bookstoreapp = angular.module (' Bookstoreapp ' ' Ngroute ', ' nganimate ', ' bookstorectrls ', ' bookstorefilters ' function ($routeProvider) {$routeProvider. When ( '/hello ' ' tpls/hello.html ' contr Oller: ' Helloctrl ' }. When ( '/list:id ' , {templateurl: ' tpls/booklist.html ' ' Booklistctrl '
'/hello '
Routeprovider Only two methods were when () and otherwise ()
When ()
The When () method has two parameters, we want to match the browser URL and the routing action object. in general, the main route often uses "/" to express, you can also define the URL parameters, in the controller using $routeparams to get the URL parameters.
otherwise ()
Otherwise () defines the route to jump when the application cannot find a specified route
Angularjs Combat Learning (-)