PLAY READ BLOG

Assess your experience with AngularJS

I estimate it would take you 39 steps in 10 minutes to Assess your experience with AngularJS.
Which function would you use to manually start an Angular app?
  • angular.inject()
  • angular.bootstrap()
  • angular.fire()
  • angular.start()
Which directive is used in conjunction with routing to display the template for the current route?
  • ng-include
  • ng-view
  • ng-route
  • ng-template
Which is the correct way to declare an AngularJS controller?
1.
angular.controller('moduleName')
.config('ControllerName', function ($scope) {
//content
});

2.
angular.module(Controller.class)
.name('ControllerName', function ($scope) {
//content
});

3.
angular.module('moduleName')
.controller('ControllerName', function ($scope) {
//content
});

4.
angular.controller("ControllerName", function ($scope) {
//content
});
  • 1.
  • 2.
  • 3.
  • 4.
What is the syntax for a one time binding?
  • {{: : propertyName}}
  • No special syntax, just use the ngOneTime module
  • ng-one-time="propertyName"
Which of these is valid syntax for assuring that minified code still works in Angular?
  • myController['inject'] = ['$scope'];
  • function myController($scope){};
  • myModule.controller('myController',['$scope', function($scope){}]);
  • None of these
If jQuery is not available to Angular, which library is used?
  • jQuery must be made available, otherwise an error will be thrown.
  • jQLite
  • The Complete jQuery library is built into Angular so its always available
  • Angular Query
Which service allows you to construct controllers in a unit test?
  • $injector
  • $constructor
  • $controller
Which module helps to write unit tests by providing mock modules, factories, etc?
  • ngRoute
  • ngMock
  • ng
  • ngTest
💡FUN FACT 💡AngularJS is the frontend part of the MEAN stack, consisting of MongoDB database, Express.js web application server framework, Angular.js itself, and Node.js server runtime environment.
Which service allows you to configure routes?
  • $route
  • The angular global object
  • $routeProvider
  • $config
Which built-in filter can you use to sort an array?
  • byIndex
  • enumerateMin
  • orderBy
  • sortBy
Where is the appropriate place to put business logic?
  • service
  • directive
  • controller
  • filter
What is i18n?
  • Internationalization
  • Service Interoperability
  • Data Interoperability
  • View-model Internationalization
  • Interoperability
Which events are raised during a route change?
  • $routeChangeEnd, $routeChangeError
  • $routeChangeSuccess, $routeChangeError
  • $routeChangeEnd, $routeChangeFail
Which of the following creates the app module with a dependency on ngSanitize?
  • angular.module('app').dependsOn('ngSanitize')
  • angular.module('app', 'ngSanitize')
  • angular.module('app').dependsOn(['ngSanitize'])
  • angular.module('app', ['ngSanitize'])
Which Angular function determines if a reference is a number?
  • angular.isNumber()
  • angular.isNaN()
  • angular.isNum()
  • angular.equalsNumber()
How can you share data between two different controllers?
  • Use a filter
  • Create a custom provider
  • Use the controller property of the link function
  • Use a service
If you are requesting data from a server that doesn't support JSON, but you wish to work with JSON in your application code, which of the following is a good method to handle this?
  • Use a $http transformation
  • Use the before() method of the returned promise
  • Write a custom service
Which tool supports unit testing in Angular?
  • Webstorm
  • Karma
  • Grunt
  • Protractor
Get Started   

Or consider 70 other intentions.