Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
2
Reply
Inheritence using $scope
Minhaj Hussain
Jan 18 2018 12:41 PM
158
Reply
Hi,
I want to ask that like javascript objects we can perform inheritance on objects.i.e.
var obj1=function()
{
this.name=""
} ;
obj1.prototype.getName=function()
{
return this.name ;
}
var obj2=function()
{
this.address=""
};
obj2.prototype.getAddress=function()
{
return this.address;
}
obj2.prototype=obj1;
//Similarly why cant i do this:
$scope.prototype=obj1;
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
2
)
Next Recommended Forum
running angualr js and angualr 2 on same application
How can save Image into database using Angular js