Skip to content

Instantly share code, notes, and snippets.

View avington's full-sized avatar

Steve Moseley avington

View GitHub Profile
/**
* Created by smoseley on 2/16/2016.
*/
(function (module) {
var template = [
'<div class="jumbotron">',
'<div class="row">',
'<div class="col-md-1 pull-left">',
'<button id="prevButton" class="btn btn-link" ng-click="$ctrl.prevClicked()">Prev</button>',
vm.$onInit = function(){
vm.currentImageUrl = vm.images[0].url;
}
var StudentImageController = function StudentImageControllerMethod(){
var vm = this;
vm.prevClicked = function() {
console.log('previous clicked');
};
vm.nextClicked = function() {
console.log('next clicked');
};
};
var template = [
'<div class="jumbotron">',
'<div class="row">',
'<div class="col-md-1 pull-left">',
'<button id="prevButton" class="btn btn-link" ng-click="$ctrl.prevClicked()">Prev</button>',
'</div>',
'<div class="col-md-10">',
'<div class="carosel">',
'<img class="img-fluid" ng-src="{{$ctrl.images[0].url}}">',
'</div>',
/**
* Created by smoseley on 2/16/2016.
*/
(function (module) {
var template = [
'<div class="jumbotron">',
'<div class="row">',
'<div class="col-md-1 pull-left">',
'<button id="prevButton" class="btn btn-link" ng-click="prevClicked()">Prev</button>',
@avington
avington / image.directive.js
Last active February 16, 2016 15:02
before angular 1.5
/**
* Created by smoseley on 12/31/2015.
*/
(function (module) {
var studentImageDirective = function () {
return {
restrict: 'E',
template: [
'<div class="jumbotron">',
<div class="form-group">
<label for="{{controlName}}">{{cmcLabel}}</label>
<input type="{{controlType}}"
class="form-control"
id="{{controlName}}"
name="{{cmcName}}"
placeholder="{{cmcLabel}}"
ng-model="cmcModel2">
</div>
/**
* Created by smoseley on 11/18/2015.
*/
(function (module) {
'use strict';
var directiveContainer = function ($compile) {
var runLink = function(scope, elem, attr, formController){
<div class="form-signin">
<form class="form-horizontal" name="loginForm" ng-submit="vm.domain.login()" novalidate>
<cmc-textbox cmc-model="vm.domain.user.userName"
cmc-schema="vm.domain.userSchema.userName"
cmc-name="userName"></cmc-textbox>
<cmc-textbox cmc-model="vm.domain.user.password"
cmc-schema="vm.domain.userSchema.password"
cmc-name="userPassword"></cmc-textbox>
/**
* Created by smoseley on 11/18/2015.
*/
(function(){
'use strict';
angular
.module('app', [
'ngMessages',