From e437fdb7b2b5cb471b6f08b918a8813a63efea49 Mon Sep 17 00:00:00 2001 From: Alex Wolfe Date: Thu, 19 Feb 2015 09:51:07 -0800 Subject: [PATCH] Angular Material dependancies --- public/_includes/_scripts-include.jade | 9 +++++++++ public/_layout.jade | 5 +++-- public/resources/js/site.js | 8 ++++++++ 3 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 public/_includes/_scripts-include.jade create mode 100644 public/resources/js/site.js diff --git a/public/_includes/_scripts-include.jade b/public/_includes/_scripts-include.jade new file mode 100644 index 0000000000..61db8f24ab --- /dev/null +++ b/public/_includes/_scripts-include.jade @@ -0,0 +1,9 @@ + +script(src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.6/angular.js") +script(src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.6/angular-animate.js") +script(src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.6/angular-aria.js") + + +script(src="https://rawgit.com/angular/bower-material/master/angular-material.js") + +script(src="/resources/js/site.js") diff --git a/public/_layout.jade b/public/_layout.jade index e97ed174f5..5e7e646b53 100644 --- a/public/_layout.jade +++ b/public/_layout.jade @@ -1,8 +1,9 @@ doctype html(lang="en" ng-app="StarterApp") head - link(rel="stylesheet" href="/resources/css/main.css") + != partial("/_includes/_head-include") body(layout="column" ng-controller="AppCtrl") != partial("/_includes/_main-nav") != yield - != partial("/_includes/_footer") \ No newline at end of file + != partial("/_includes/_footer") + != partial("/_includes/_scripts-include") \ No newline at end of file diff --git a/public/resources/js/site.js b/public/resources/js/site.js new file mode 100644 index 0000000000..bddad0a487 --- /dev/null +++ b/public/resources/js/site.js @@ -0,0 +1,8 @@ +var app = angular.module('StarterApp', ['ngMaterial']); + +app.controller('AppCtrl', ['$scope', '$mdSidenav', function($scope, $mdSidenav){ + $scope.toggleSidenav = function(menuId) { + $mdSidenav(menuId).toggle(); + }; + +}]); \ No newline at end of file