angular.js - How does angular solve the difficulties of front-end mvc?
某草草
某草草 2017-05-15 17:04:26
0
1
544

Difficulty 1. The code that operates the dom must wait for the entire page to be loaded

The controller does not operate the DOM. DOM operations are completed using instructions. Is this a guarantee that the DOM will be operated only after loading?

Difficulty 2: js prototypal inheritance also brings many difficulties to front-end programming
What are the pain points of js prototypal inheritance? Is it http://www.jb51.net/article/57287.htm The subclass mentioned here shares a prototype with the parent class, so when the subclass modifies the prototype, the parent class is randomly modified?
How to avoid this pain point in angular? Does $scope play a role in solving pain points, and what role does it play?

某草草
某草草

reply all(1)
迷茫

What I understand is: the two things you mentioned seem to have nothing to do with Angularjs.
The controller can also operate the dom, but it is not recommended. Angularjs doesn't do anything to enforce it.
For prototypal inheritance, it can be used or not. The main thing is to standardize the code style.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template