Angular.js专场全栈工程师通往架构师之路全栈Web开发者

AngularJS 面试题(基础部分) only English

2018-02-24  本文已影响59人  全栈开发之道
序言

作为全栈技术框架的一个重要组成部分,AnguarJS 充当是前端框架,其重要性可想而知! 为了强化 AnguarJS的基础,特汇总一些基础概念。

注: 这里的AnguarJS 是指 Angular 1.X (最新版本为 1.7)


AngularJS Interview Questions

A list of top frequently asked AngularJS interview questions and answers are given below.

1) What is AngularJS?

AngularJS is a JavaScript framework i.e. used to create single web page application. It follows MVC (Model View Controller) pattern. It is open source, cross browser compliant and easy to maintain.


2) What are the advantages of AngularJS?


3) What are the disadvantages of AngularJS?


4) Is AngularJS dependent on JQuery?

No.


5) What IDE's are currently used for the development of AngularJS?


6) What are the features of AngularJS?

  1. MVC
  2. Validations
  3. Modules
  4. Directives
  5. Templates
  6. Scope
  7. Expressions
  8. Data Binding
  9. Filters
  10. Services
  11. Routing
  12. Dependency Injection
  13. Testing

7) What are directives in AngularJS?

Directives are the markers on DOM element that is used to specify behavior on that DOM element. All AngularJS directives start with the word "ng". There are many in-built directives in AngularJS such as "ng-app", "ng-model", "ng-controller", "ng-repeat" etc.

Let's see a simple example of AngularJS directive.

 <input type="text" id="empName"  ng-model="EmpName"/>  

8) What are controllers in AngularJS?

Controllers are JavaScript functions that are used to provide data and logic to HTML UI. It acts as an interface between Server and HTML UI.


9) What are the usage of controllers in AngularJS?

AngularJS Controllers are used to:


10) What is data binding in AngularJS?

Data Binding is the automatic synchronization of data between model and view. There are two ways of data binding:


11) What are services in AngularJS?

Services are objects that can be used to store and share data across the application. AngularJS offers many built-in services such as $http i.e. used to make XMLHttpRequest.


12) What is scope in AngularJS?

Scope is an object that represents application model.

Each AngularJS application can have only one root scope but can have multiple child scopes.


13) What is template in AngularJS?

A template consists of HTML, CSS and AngularJS directives that are used to render dynamic view.


14) What are expressions in AngularJS?

Expressions are the code snippets that resolves to a value. AngularJS expressions are placed inside {{expression}}. For example:

 {{1+1}}  

AngularJS supports one-time binding expressions.


15) What is the use of filter in AngularJS?

A filter is used to format the value of expression to display the formatted output. AngularJS enables us to write our own filter.


参考书: 《 全栈开发之道:MongoDB+Express+AngularJS+Node.js


更多全栈技术,请关注微信公众号: “全栈工程师的早读课”,每天早8:00 准时推送技术文章。

上一篇 下一篇

猜你喜欢

热点阅读