angularInterview Flashcards
What is ng-directive?
So this is the thing that angular extends html with
What is ng-app?
Well a directive. need it so to define angular js app
What is the ng-model
it binds the value of input field with the application variable
For eg
so like it binds the input value with the name var
What is ng-bind?
so this one binds application data with the HTML view.
how do you write angular js expressions?
in the {{}}
eg : {{9+9}}}
{{func()}}
and also this can be used to bind.
what is the ng-controller?
Controls the Angular js application
What is ng-module for?
defining the angular js application
Write a code to define a module and a controller.
var app=angular.module("myApp", []); app.controller("myController", function($scope){//write functions});
What are the two ways you can write expressions?
<p></p>
{{5+5}}
ng-init purpose?
var i=0; to initialize the values to the variables
create an object in angular using the ng-init :
<div>
| {{league.adc}}</div>
What angularJS expression contain?
like js, Literals operators variable LOV = literals operators and variables
Difference between angular expression and javascript expression
angular js can be written inside the HTML
Angular doesnt support conditionals, loops and exceptions while js does
What is the angularJS module?
- defines an application
- is a container for the different parts of an application, container for the application controller
and controllers always belong to the module
$scope
$rootScope
$rootScope is the global one
angular is one way or two way? WHY?
two-way binding.
cause angularjs is the synchronization between the model and the view.
what is a scope?
the binding part between the HTML(view) and the JS(controller)
So available for both the view and the controller.
$scope is the object
what is filter?
added to expression by using | , followed by the filter