Web #10


ang.png

Ref type vs. Value type

Types in javascript are either treated by Value Type or by Reference Type. A Value Type holds the data within its own memory allocation and a Reference Type contains a pointer to another memory location that holds the real data. Reference Type variables are stored in the heap while Value Type variables are stored in the stack.

difference between value type and reference type

Explaining Value vs. Reference in Javascript

What is Routing in AngularJS?

If you want to navigate to different pages in your application, but you also want the application to be a SPA (Single Page Application), with no page reloading, you can use the UI-Router module. The UI-Router module routes your application to different pages without reloading the entire application.

uiview.png

ui router home page link

$http

The $http service is a core AngularJS service that facilitates communication with the remote HTTP servers via the browser’s XMLHttpRequest object or via JSONP.
The $http API is based on the deferred/promise APIs exposed by the $q service.
The $http service is a function which takes a single argument — a configuration object — that is used to generate an HTTP request and returns a promise that is resolved (request success) or rejected (request failure) with a response object.

… full article

More topics covered:

  • using angular with web api
  • mvc controller + templateUrl
  • $state – home-page link
  • adding bootstrap to angular

Links:

Leave a comment