SlideShare a Scribd company logo
1 of 7
[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

What's hot

Ffffffffffff
FfffffffffffFfffffffffff
Ffffffffffff
mohdshanu
 
Taxi Booking System UML - Sequence Diagram
Taxi Booking System UML - Sequence DiagramTaxi Booking System UML - Sequence Diagram
Taxi Booking System UML - Sequence Diagram
Tyler Mooney
 

What's hot (12)

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

Viewers also liked

Pirámide de Maslow
Pirámide de MaslowPirámide de Maslow
Pirámide de Maslow
valealvear
 
La sabana que parece ciudad
La sabana que parece ciudadLa sabana que parece ciudad
La sabana que parece ciudad
lupistrupiso
 
Vídeo Exposición. Lesiones.
Vídeo Exposición. Lesiones. Vídeo Exposición. Lesiones.
Vídeo Exposición. Lesiones.
Antonio Miquilena
 
Brochure modified4 plug & play 2
Brochure   modified4 plug & play 2Brochure   modified4 plug & play 2
Brochure modified4 plug & play 2
Nishithakn
 
Golpes de-vista-3-diapositivas
Golpes de-vista-3-diapositivasGolpes de-vista-3-diapositivas
Golpes de-vista-3-diapositivas
Daniel Vazquez
 
Iran Powerpoint Presentation 2
Iran Powerpoint Presentation 2Iran Powerpoint Presentation 2
Iran Powerpoint Presentation 2
guest74a363
 
Tema 3 usuaris i grups a windows
Tema 3   usuaris i grups a windowsTema 3   usuaris i grups a windows
Tema 3 usuaris i grups a windows
carolinallf
 
7 สามัญ สังคม
7 สามัญ สังคม7 สามัญ สังคม
7 สามัญ สังคม
aomchalearmchat
 
Josune aroa ikt 2 (software librea)
Josune aroa ikt 2 (software librea)Josune aroa ikt 2 (software librea)
Josune aroa ikt 2 (software librea)
Aroalazkano
 

Viewers also liked (18)

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

Similar to Prototype and angularjs $scopes

cars design code power system detai.pptx
cars design code power system detai.pptxcars design code power system detai.pptx
cars design code power system detai.pptx
abomoayad19309
 
I need to do the followingAdd a new item to the inventory m.pdf
I need to do the followingAdd a new item to the inventory m.pdfI need to do the followingAdd a new item to the inventory m.pdf
I need to do the followingAdd a new item to the inventory m.pdf
adianantsolutions
 
This is my visual studio C code how do I make it so that w.pdf
This is my visual studio C code how do I make it so that w.pdfThis is my visual studio C code how do I make it so that w.pdf
This is my visual studio C code how do I make it so that w.pdf
adinathfashion1
 
I need this code, to show ALL inventory items, then with the remove .pdf
I need this code, to show ALL inventory items, then with the remove .pdfI need this code, to show ALL inventory items, then with the remove .pdf
I need this code, to show ALL inventory items, then with the remove .pdf
aggarwalshoppe14
 
The C# programming laguage delegates notes Delegates.pptx
The C# programming laguage delegates notes Delegates.pptxThe C# programming laguage delegates notes Delegates.pptx
The C# programming laguage delegates notes Delegates.pptx
VitsRangannavar
 
In C#, visual studio, I want no more text boxes added, I have button.pdf
In C#, visual studio, I want no more text boxes added, I have button.pdfIn C#, visual studio, I want no more text boxes added, I have button.pdf
In C#, visual studio, I want no more text boxes added, I have button.pdf
aggarwalenterprisesf
 

Similar to Prototype and angularjs $scopes (10)

cars design code power system detai.pptx
cars design code power system detai.pptxcars design code power system detai.pptx
cars design code power system detai.pptx
 
I need to do the followingAdd a new item to the inventory m.pdf
I need to do the followingAdd a new item to the inventory m.pdfI need to do the followingAdd a new item to the inventory m.pdf
I need to do the followingAdd a new item to the inventory m.pdf
 
JavaScript Prototype and Module Pattern
JavaScript Prototype and Module PatternJavaScript Prototype and Module Pattern
JavaScript Prototype and Module Pattern
 
Exploring ES6
Exploring ES6Exploring ES6
Exploring ES6
 
This is my visual studio C code how do I make it so that w.pdf
This is my visual studio C code how do I make it so that w.pdfThis is my visual studio C code how do I make it so that w.pdf
This is my visual studio C code how do I make it so that w.pdf
 
Informatics Practices/ Information Practices Project (IP Project Class 12)
Informatics Practices/ Information Practices Project (IP Project Class 12)Informatics Practices/ Information Practices Project (IP Project Class 12)
Informatics Practices/ Information Practices Project (IP Project Class 12)
 
I need this code, to show ALL inventory items, then with the remove .pdf
I need this code, to show ALL inventory items, then with the remove .pdfI need this code, to show ALL inventory items, then with the remove .pdf
I need this code, to show ALL inventory items, then with the remove .pdf
 
The C# programming laguage delegates notes Delegates.pptx
The C# programming laguage delegates notes Delegates.pptxThe C# programming laguage delegates notes Delegates.pptx
The C# programming laguage delegates notes Delegates.pptx
 
In C#, visual studio, I want no more text boxes added, I have button.pdf
In C#, visual studio, I want no more text boxes added, I have button.pdfIn C#, visual studio, I want no more text boxes added, I have button.pdf
In C#, visual studio, I want no more text boxes added, I have button.pdf
 
Oop in java script
Oop in java scriptOop in java script
Oop in java script
 

Prototype and angularjs $scopes