This file contains hidden or 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
| bower uninstall angular-mocks --save-dev |
This file contains hidden or 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
| // javascript and css libraries loaded using Bower. | |
| app.use(express.static(path.join(__dirname, 'bower_components'))); |
This file contains hidden or 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
| <script src="jquery/dist/jquery.js"></script> |
This file contains hidden or 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('exampleApp') | |
| .directive('unorderedList', function () { | |
| return function (scope, element, attrs) { | |
| var data = scope[attrs['unorderedList']]; | |
| var propertyExpression = attrs['listProperty']; | |
| if (!angular.isArray(data)) | |
| return; | |
| var listElem = angular.element('<ul>'); |
This file contains hidden or 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('exampleApp') | |
| .directive('unorderedList', function () { | |
| return function (scope, element, attrs) { | |
| var data = scope[attrs['unorderedList']]; | |
| var propertyExpression = attrs['listProperty']; | |
| if (!angular.isArray(data)) | |
| return; | |
| var listElem = angular.element('<ul>'); |
This file contains hidden or 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
| app.module('exampleApp', []) | |
| .controller('defaultCtrl', function ($scope) { | |
| $scope.products = [ | |
| {name: 'Apples', category: 'Fruit', price: 1.20}, | |
| {name: 'Bananas', category: 'Fruit', price: 2.40}, | |
| {name: 'Pears', category: 'Fruit', price: 2} | |
| ]; | |
| $scope.incrementPrices = function () { | |
| for (var i = 0; i < $scope.products.length; i++) { |
This file contains hidden or 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
| <html> | |
| <head> | |
| <title>Directives</title> | |
| <script src="bootstrap.css"></script> | |
| <script src="bootstrap-theme.css"></script> | |
| </head> | |
| <body ng-controller="defaultCtrl"> | |
| <div class="panel panel-default"> | |
| <div class="panel-heading"> | |
| <h3>Products</h3> |
This file contains hidden or 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
| $scope.addProviders = function() { | |
| $scope.report.filters.providers = $scope.report.filters.providers.concat($scope.providersToAdd); | |
| angular.forEach($scope.providersToAdd, function(provider) { | |
| $scope.providers.remove(provider); | |
| }); | |
| $scope.providersToAdd = []; | |
| }; | |
| $scope.removeProviders = function(){ | |
| $scope.providers = $scope.providers.concat($scope.providersToDelete); | |
| angular.forEach($scope.providersToDelete, function(provider) { |
This file contains hidden or 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
| var async = require('async'), | |
| nodemailer = require('nodemailer'), | |
| _ = require('lodash'), | |
| model = app.model, | |
| hash = app.security.hash, | |
| validate = app.validation.validate; | |
| /** | |
| * the mobile api should validate a token session from the mobile app | |
| * @param router |
This file contains hidden or 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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>Title</title> | |
| </head> | |
| <body ng-app="app"> | |
| <main ui-view></main> | |
| <script src="angular/angular.min.js"></script> | |
| <script src="angular-ui-router/release/angular-ui-router.min.js"></script> |