AngularJS Interview Questions And Answers

 

1. What is difference between config() and run() method in AngularJS?

Ans: http://firstcrazydeveloper.com/Blogs/BlogView.html/46/importance-of-config-and-run-blocks-in-angularjs

2. Mastering the Scope of the Directives in AngularJS

Ans. https://www.undefinednull.com/2014/02/11/mastering-the-scope-of-a-directive-in-angularjs/

3.  event.PreventDefault and event.stopPropagation

Ans. https://saswal.wordpress.com/2014/07/09/event-preventdefault-event-stoppropagation-return-false-event-stopimmediatepropagation/

4. Interceptors in AngularJS and Useful Examples

Ans. http://www.webdeveasy.com/interceptors-in-angularjs-and-useful-examples/

5. Understanding Scopes in Angular JS and Javascript

Ans. https://github.com/angular/angular.js/wiki/Understanding-Scopes

6. hold-or-delay-document-ready-execution-for-sometime

Ans. https://saswal.wordpress.com/2014/07/09/is-it-possible-to-hold-or-delay-document-ready-execution-for-sometime/

7. What is dirty checking in AngularJs and how does it work?

Ans. In angular framework , model and view have binding, So any change in model will lead to update the view.the updation of view because of model change is called Digest Cycle and dirty check is a part of this digest cycle.

when any event or Model value manipulation is done, angular check old value and new value and if value is changed the the digest cycle start its work and update the view by checking the scope object and find which object should be changed .Digest cycle informs the watchers about the model change and then watchers synchronize the view with the model data

now while this updation process is going on,it is possible that the value of model again changed . So now dirty check comes into picture , and check while the digest cycle(was going on) any thing is changed in model or not . If any thing changed it will call the digest cycle again and update the view accordingly, and this process will go on until dirty check find no updates done while last Digest cycle.

8. PreLink, PostLink and Controller Methods of Angular Directives

Ans. https://www.undefinednull.com/2014/07/07/practical-guide-to-prelink-postlink-and-controller-methods-of-angular-directives/

9. controller vs link vs compile

Ans. https://angular-tutorial.quora.com/Angular-directive-functions-controller-vs-link-vs-compile

10. Mastering in AngularJS Custom Directives

Ans. https://code.tutsplus.com/tutorials/mastering-angularjs-directives--cms-22511

11. Best Practice AngularJs Examples and Tutorials

Ans. http://www.code-sample.xyz/2016/11/angularjs-tutorials-with-examples-for.html

12. Angular JS 2 Step by Step Tutorials

Ans. http://www.code-sample.com/2016/06/angular-2-interview-questions-and.html

13. Angular 2 tutorial | Angular 2 material | Angular 2 quickstart and docs

Ans. http://www.code-sample.com/2015/07/angularjs-2-documentation-with-example.html

 

 

http://www.besttechtools.com/DotnetArticles/article/difference-between-Object-Dynamic-and-Var
http://www.c-sharpcorner.com/uploadfile/ff2f08/object-vs-var-vs-dynamic-type-in-c-sharp/http://www.dotnetfunda.com/interviews/show/6303/how-can-you-prevent-the-class-from-being-inherited-by-other-classes-wi
http://www.c-sharpcorner.com/UploadFile/4b0136/async-and-await-in-asynchronous-programming-in-C-Sharp/
https://www.undefinednull.com/2014/08/11/a-brief-walk-through-of-the-ng-options-in-angularjs/
https://appendto.com/2016/02/working-promises-angularjs-services/
https://www.airpair.com/angularjs
http://www.binaryintellect.net/articles/5d8be0b6-e294-457e-82b0-ba7cc10cae0e.aspx
https://www.undefinednull.com/2014/02/11/mastering-the-scope-of-a-directive-in-angularjs/
http://tutorials.jenkov.com/angularjs/watch-digest-apply.html
http://firstcrazydeveloper.com/Blogs/BlogView.html/46/importance-of-config-and-run-blocks-in-angularjs
https://blog.thoughtram.io/angular/2015/07/07/service-vs-factory-once-and-for-all.html
http://www.c-sharpcorner.com/uploadfile/dev4634/understanding-http-interceptors-in-angular-js/
http://www.webdeveasy.com/interceptors-in-angularjs-and-useful-examples/
http://www.tothenew.com/blog/angularjs-copy-vs-extend/
http://www.tothenew.com/blog/angularjs-copy-vs-extend/
http://www.talkingdotnet.com/grunt-js-interview-questions/
https://scotch.io/tutorials/angular-routing-using-ui-router
https://www.codeproject.com/Articles/841776/AngularJS-ui-router
http://www.w3schools.com/js/js_array_methods.asp
https://www.ng-book.com/p/Caching/
https://www.phase2technology.com/blog/caching-json-arrays-using-cachefactory-in-angularjs-1-2-x/
http://blog.rgarom.com/cookiestore-vs-localstorage-vs-sessionstorage/
http://www.aspsnippets.com/Articles/AngularJS-LocalStorage-and-SessionStorage-example.aspx
http://www.c-sharpcorner.com/uploadfile/8911c4/different-between-method-overriding-method-hiding-new-keyw/
http://odetocode.com/blogs/scott/archive/2014/05/28/compile-pre-and-post-linking-in-angularjs.aspx
https://github.com/angular/angular.js/wiki/Understanding-Scopes

  1. Download from: http://www.highcharts.com/download
  2. Features of Highchart: http://www.highcharts.com/products/highcharts
  3. Demo for HighChart: http://www.highcharts.com/demo/
  4. Core concepts: http://www.highcharts.com/docs/chart-concepts/understanding-highcharts
  5. <script src="https://code.highcharts.com/highcharts.src.js"></script>
  6. Install through Bower: bower install highcharts
  7. Install through NPM: npm install highcharts –save
  8. Support different type of chart: Line,Area,Spline,reaSpline,Column,Bar,Scatter,Pie,Arearange,Areasplinerange,Columnrange,Gauge,Boxplot,Errorbar,Waterfall,BubbleBubble,Funnel
  9. http://www.highcharts.com/docs/getting-started/your-first-chart
  10. Details about all components: http://api.highcharts.com/highcharts
  11. Advantages:
    1. Work with any server [Perl, Asp, Asp.Net, Node.je]
  12. Disadvantages:
    1. Doesn’t support legacy browser [ie6-7-8]
    2.  

 

  1. Render chart in container (div id)

chart: {

        renderTo: 'container'

    }

  1. Define chart type:

 chart: {

            type: 'bar'

        },

  1. Define chart title:

title: {

            text: 'Fruit Consumption'

        },

  1. Chart X-Axis data:

xAxis: {

            categories: ['Apples', 'Bananas', 'Oranges']

        },

 

 

  1. Chart Axis type

 

xAxis: {

        type: 'datetime'

    },

  1. Chart Y-Axis data:

yAxis: {

            title: {

                text: 'Fruit eaten'

            }

        },

  1. Series of data:

series: [{

            name: 'Jane',

            data: [1, 0, 4]

        }, {

            name: 'John',

            data: [5, 7, 3]

        }]

  1. Define SubTitle

subtitle: {

        text: 'Using the experimental Highcharts Boost module'

    }

  1. Define Starting point and internal

series: [{

        data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4],

        pointStart: Date.UTC(2012, 0, 1),

        pointInterval: 24 * 3600 * 1000,

    }]

22.First way to define container for HighChart

var chart = new Highcharts.Chart({

      chart: {

         renderTo: 'container'

      },

      series: [{

         data: [<?php echo join($data, ',') ?>]

      }]

});

Second way to define container for HighChart

var myChart = Highcharts.chart('container', {

        chart: {

            type: 'bar'

        },

        title: {

            text: 'Fruit Consumption'

        },

        xAxis: {

            categories: ['Apples', 'Bananas', 'Oranges']

        },

        yAxis: {

            title: {

                text: 'Fruit eaten'

            }

        },

        series: [{

            name: 'Jane',

            data: [1, 0, 4]

        }, {

            name: 'John',

            data: [5, 7, 3]

        }]

    });

});

 

  1. Export data in table or download image

http://jsfiddle.net/highcharts/z9zXM/

 

  1. Performance of Highchart

http://www.highcharts.com/docs/getting-started/frequently-asked-questions

HOW CAN I GET THE BEST PERFORMANCE OUT OF HIGHCHARTS?

  1.  
  2.