purnam.js Javascript-like semantics for Clojurescriptpurnam.test - Jasmin Extensions for Test Driven Workflowpurnam.angular and purnam.test.angular - Angularjs Extensions for Boilerplace Reduction and Code Accuracy;; purnam.angular (def.module my.app []) (def.config my.app [$routeProvider] (-> $routeProvider (.when "/" (obj :templateUrl "views/main.html")) (.otherwise (obj :redirectTo "/")))) (def.controller my.app.MainCtrl [$scope $http] (! $scope.msg "") (! $scope.setMessage (fn [msg] (! $scope.msg msg))) (! $scope.loginQuery (fn [user pass] (let [q (obj :user user :pass pass)] (-> $http (.post "/login" q) (.success (fn [res] (if (= res "true") (! $scope.loginSuccess true) (! $scope.loginSuccess false)))) (.error (fn [] (js/console.log "error!!")))))))
;; purnam.test.angular (describe.controller {:doc "A sample controller for testing purposes" :module my.app :controller MainCtrl} (it "should be able to change the message within the $scope" (is $scope.msg "Hello") (do ($scope.setMessage "World!") (is $scope.msg "World!")) (do ($scope.setMessage "Angular Rocks!") (is $scope.msg "Angular Rocks!"))))
--
You received this message because you are subscribed to the Google Groups "AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to angular+u...@googlegroups.com.
To post to this group, send email to ang...@googlegroups.com.
Visit this group at http://groups.google.com/group/angular?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.