SlideShare a Scribd company logo
[prototype]
angularjs $scopes
and
{
[prototype]:
}
function Car() {}
Car.prototype {}
{
}
new Car();
new Car();
{
[prototype]:
}
wheels: 4
wheels: 4
wheels: 4
drive: function () { ... }
drive: ...
drive: ...
{
[prototype]:
color: black
}
myCar = new Car(‘black’)
{
[prototype]:
wheels: 4
color: gray
}
Car.prototype
Object.prototype
{
[prototype]: null
toString: function () ...
hasOwnProperty: function ...
}
color ? black
wheels ? 4
maxSpeed ? undefined
read write
{
...
...
}
{
...
...
}
{
color: red
...
}
{
...
...
}
{
...
...
}
{
color: red
...
}
obj.color obj.color = “peachpuff”
automobile.interior.chairs = 4;
read
write
{
scope: false scope === $scope
}
{
scope: true -> child = $scope.$new(); child.__proto__ === $scope
}
{
scope: {} -> child = $scope.$new(true); child.__proto__ !== $scope
}
<input ng-model=”data”/>
<div ng-controller=”appCtrl”>
</div>

More Related Content

PDF
XKE Typeclass
TXT
TXT
KEY
Javascript 基础
KEY
Proga 0608
PPTX
Visualization team presentation
PDF
HelsinkiOS Jan 2015: Useful iOS Code Snippets
XKE Typeclass
Javascript 基础
Proga 0608
Visualization team presentation
HelsinkiOS Jan 2015: Useful iOS Code Snippets

What's hot (12)

PDF
Simplify your CSS with Stylus and Nib
DOCX
One dimensional operation of Array in C- language
PDF
Factorial
PDF
Javascript Styles and some tips
PDF
Program in ‘C’ language to implement linear search using pointers
PDF
C++ question 6 || solution of Programming Problem
DOC
Ffffffffffff
DOC
C program to add two numbers
PDF
Taxi Booking System UML - Sequence Diagram
PDF
Extending built in objects
PDF
Bcsl 033 data and file structures lab s5-2
PPTX
Rumus python ii
Simplify your CSS with Stylus and Nib
One dimensional operation of Array in C- language
Factorial
Javascript Styles and some tips
Program in ‘C’ language to implement linear search using pointers
C++ question 6 || solution of Programming Problem
Ffffffffffff
C program to add two numbers
Taxi Booking System UML - Sequence Diagram
Extending built in objects
Bcsl 033 data and file structures lab s5-2
Rumus python ii
Ad

Viewers also liked (18)

PDF
Waqaey Karbala se Dars e Ikhlaq - By: Syed ul Ulama Syed Ali Naqi Naqvi Sahab...
DOCX
Insuranceofhome
PPTX
Pirámide de Maslow
PPTX
Comissions 2
PDF
Thawing the frozen phone
DOC
La sabana que parece ciudad
PPTX
Vídeo Exposición. Lesiones.
PPTX
Elaboración de diapositivas
PPTX
Presentation1
PDF
Brochure modified4 plug & play 2
PPS
Golpes de-vista-3-diapositivas
PPT
Iran Powerpoint Presentation 2
PPT
Tema 3 usuaris i grups a windows
DOCX
preguntas
PDF
Bronze ground rod couplers
PDF
7 สามัญ สังคม
PPT
Josune aroa ikt 2 (software librea)
Waqaey Karbala se Dars e Ikhlaq - By: Syed ul Ulama Syed Ali Naqi Naqvi Sahab...
Insuranceofhome
Pirámide de Maslow
Comissions 2
Thawing the frozen phone
La sabana que parece ciudad
Vídeo Exposición. Lesiones.
Elaboración de diapositivas
Presentation1
Brochure modified4 plug & play 2
Golpes de-vista-3-diapositivas
Iran Powerpoint Presentation 2
Tema 3 usuaris i grups a windows
preguntas
Bronze ground rod couplers
7 สามัญ สังคม
Josune aroa ikt 2 (software librea)
Ad

Similar to Prototype and angularjs $scopes (20)

PPT
AngularJS Mobile Warsaw 20-10-2014
PPSX
PPT
introduction to Angularjs basics
PPTX
AngularJS
PDF
AngularJS Workshop
PDF
TypeScriptで書くAngularJS @ GDG神戸2014.8.23
PPTX
AngularJS in practice
DOCX
Controller in AngularJS
ODP
AngularJs Crash Course
PPTX
AngularJs presentation
PPTX
AngularJS.part1
PDF
AngularJS in practice
PPTX
Getting Started with Angular JS
PPTX
AngularJs Superheroic JavaScript MVW Framework Services by Miracle Studios
PPTX
Tech Altum :- Angular introduction, Installation and directives
PDF
Dive into AngularJS and directives
PDF
Angular js - 4developers 12 kwietnia 2013
PPT
Angular data binding by Soft Solutions4U
PPTX
Intro to AngularJs
PDF
Angular js quickstart
AngularJS Mobile Warsaw 20-10-2014
introduction to Angularjs basics
AngularJS
AngularJS Workshop
TypeScriptで書くAngularJS @ GDG神戸2014.8.23
AngularJS in practice
Controller in AngularJS
AngularJs Crash Course
AngularJs presentation
AngularJS.part1
AngularJS in practice
Getting Started with Angular JS
AngularJs Superheroic JavaScript MVW Framework Services by Miracle Studios
Tech Altum :- Angular introduction, Installation and directives
Dive into AngularJS and directives
Angular js - 4developers 12 kwietnia 2013
Angular data binding by Soft Solutions4U
Intro to AngularJs
Angular js quickstart

Prototype and angularjs $scopes