This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* OOP in AngularJS | |
* | |
* The following implements some pseudo code for a Video Blog Application using both AngularJS' | |
* Dependency Injection and 'Classical' Javascript Prototypal Inheritance. | |
* | |
* Recently I've decided to use a more 'Classical' Javascript design pattern. My reasoning for this | |
* decision was based mostly on 2 factors: | |
* | |
* 1. Using classes allows you to create code that is reusable and DRY. This is especially helpful |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Car extends Model { | |
/** | |
* @constructor | |
* @description instantiates a snapshot model | |
*/ | |
constructor(make="", model="", mpg=0) { | |
super(); | |
// the name of the table mapped to this object | |
this.name = 'car'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @file components/global/slideshow.js | |
*/ | |
import React, { Component } from 'react'; | |
import { Link, hashHistory } from 'react-router'; | |
import { | |
Button as Button, | |
Carousel as OnsCarousel, | |
CarouselItem as OnsCarouselItem | |
} from 'react-onsenui'; |