Extending Javascript objects with a help of AngularJS extend method
Multiple ways of extending javascript objects /** * One-way reference from subclass to superclass (instance) * Most of the time this is what you want. It should be done * before adding other methods to Subclass. */ ChildClass.prototype = new SuperClass(); /** * Two-way reference * Superclass will also get any Subclass methods added later….