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
// This is a module for cloud persistance in mongolab - https://mongolab.com | |
angular.module('mongolab', ['ngResource']). | |
factory('Project', function($resource) { | |
var Project = $resource('https://api.mongolab.com/api/1/databases' + '/cars/collections/projects/:id', { | |
apiKey: '4f99a253e4b015f77d298ab8' | |
}, { | |
update: { | |
method: 'PUT' | |
} | |
}); |
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
angular.module('formComponents', []) | |
.directive('formInput', function() { | |
return { | |
restrict: 'E', | |
scope: {}, | |
link: function(scope, element, attrs) | |
{ | |
var type = attrs.type || 'text'; | |
var required = attrs.hasOwnProperty('required') ? "required='required'" : ""; | |
var htmlText = '<div class="control-group">' + |
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
// This is a module for cloud persistance in mongolab - https://mongolab.com | |
angular.module('mongolab', ['ngResource']). | |
factory('Project', function($resource) { | |
var Project = $resource('https://api.mongolab.com/api/1/databases' + | |
'/angularjs/collections/projects/:id', | |
{ apiKey: '4f847ad3e4b08a2eed5f3b54' }, { | |
update: { method: 'PUT' } | |
} | |
); | |
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
angular.module('project', ['mongolab']). | |
config(function($routeProvider) { | |
$routeProvider. | |
when('/', {controller:ListCtrl, templateUrl:'list.html'}). | |
when('/edit/:projectId', {controller:EditCtrl, templateUrl:'detail.html'}). | |
when('/new', {controller:CreateCtrl, templateUrl:'detail.html'}). | |
otherwise({redirectTo:'/'}); | |
}); | |
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
// AngularJS Directive for jQuery Sparklines | |
// Dependencies: jquery and http://omnipotent.net/jquery.sparkline/ | |
angular.module('sparkline',[]) | |
angular.module('sparkline') | |
.directive('jqSparkline', [function () { | |
'use strict'; | |
return { | |
restrict: 'E,A', | |
require: 'ngModel', |
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
// AngularJS directives for jquery.flot | |
// Dependencies jQuery and flot (http://www.flotcharts.org) | |
// jquery.flot.plugins: jquery.flot.pie.js, jquery.flot.stack.js, jquery.flot.time.js | |
angular.module('flot', []); |
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
angular.module('flot') | |
.directive('flotPie', [function () { | |
'use strict'; | |
return { | |
restrict: 'E,A', | |
require: 'ngModel', | |
link: function (scope, elem, attrs, ngModel) { | |
var chart = null, | |
opts = { |
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
angular.module('flot') | |
.directive('flotStackedline', [function () { | |
'use strict'; | |
return { | |
restrict: 'EA', | |
require: 'ngModel', | |
link: function (scope, elem, attrs, ngModel) { | |
var chart = null, | |
opts = { |
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
angular.module('flot') | |
.directive('flotLine', [function () { | |
'use strict'; | |
return { | |
restrict: 'EA', | |
require: 'ngModel', | |
link: function (scope, elem, attrs, ngModel) { | |
var chart = null, | |
opts = { |
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
// Requires jQuery from http://jquery.com/ | |
// and jQuerySparklines from http://omnipotent.net/jquery.sparkline | |
// AngularJS directives for jquery sparkline | |
angular.module('sparkline', []); | |
angular.module('sparkline') | |
.directive('jqSparkline', [function () { | |
'use strict'; | |
return { |
OlderNewer