diff --git a/README.md b/README.md index ed01e7d..42cea72 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,7 @@ An angularjs, requirejs, coffeescript, zurb-foundation, gulp seed project for m * [coffee script](http://coffeescript.org/) all the way * [gulp](http://gulpjs.com/) for build system * [zurb foundation ](http://foundation.zurb.com/) and libsass for css framework +* [angular-foundation](http://pineconellc.github.io/angular-foundation/) ### why diff --git a/static/bower.json b/static/bower.json index e9b0518..2f706a4 100644 --- a/static/bower.json +++ b/static/bower.json @@ -20,6 +20,7 @@ "requirejs-text": "~2.0.10", "foundation": "zurb/bower-foundation", "html5-boilerplate": "~4.3.0", - "angularAMD": "~0.2.1" + "angularAMD": "~0.2.1", + "angular-foundation": "~0.5.1" } } diff --git a/static/coffee/app.coffee b/static/coffee/app.coffee index 51c988d..e84bc04 100644 --- a/static/coffee/app.coffee +++ b/static/coffee/app.coffee @@ -1,8 +1,9 @@ define [ "angularAMD" "angular-route" + "foundation" ], (angularAMD) -> - app = angular.module("webapp", ["ngRoute"]) + app = angular.module("webapp", ["ngRoute", "mm.foundation"]) # "['mm.foundation']" app.config ($routeProvider) -> $routeProvider.when("/view1", angularAMD.route( templateUrl: "partials/partial1.html" diff --git a/static/coffee/controllers/myctrl2.coffee b/static/coffee/controllers/myctrl2.coffee index c13be1a..bf7dee2 100644 --- a/static/coffee/controllers/myctrl2.coffee +++ b/static/coffee/controllers/myctrl2.coffee @@ -1,6 +1,30 @@ define ["app"], (app) -> app.controller "MyCtrl2", ($scope) -> $scope.message = "Message from MyCtrl2" - return + $scope.oneAtATime = true + $scope.groups = [ + { + title: "Dynamic Group Header - 1" + content: "Dynamic Group Body - 1" + } + { + title: "Dynamic Group Header - 2" + content: "Dynamic Group Body - 2" + } + ] - return + $scope.message = "Message from MyCtrl2" + + $scope.items = [ + "Item 1" + "Item 2" + "Item 3" + ] + + $scope.addItem = -> + newItemNo = $scope.items.length + 1 + $scope.items.push("Item " + newItemNo) + return + + + return diff --git a/static/coffee/main.coffee b/static/coffee/main.coffee index ebda0c0..9769510 100644 --- a/static/coffee/main.coffee +++ b/static/coffee/main.coffee @@ -6,12 +6,14 @@ require.config "angular" : "/bower_components/angular/angular.min" "angular-route": "/bower_components/angular-route/angular-route.min" "angularAMD" : "/bower_components/angularAMD/angularAMD.min" + "foundation" : "/bower_components/angular-foundation/mm-foundation-tpls" # Add angular modules that does not support AMD out of the box, put it in a shim shim: - angularAMD: ["angular"] + "angularAMD": ["angular"] "angular-route": ["angular"] + "foundation" : ["angular"] # kick start application diff --git a/static/index.html b/static/index.html index 66a6dcd..eae05d8 100644 --- a/static/index.html +++ b/static/index.html @@ -1,45 +1,16 @@ - - - - -
- - - + +The body of the accordion group grows to fit the contents
+ +