From c655b884e268c8c9b6853d440143953f51b7e7de Mon Sep 17 00:00:00 2001 From: Misko Hevery Date: Mon, 29 Mar 2010 10:40:57 -0700 Subject: tests broken, but bootstrap works --- src/angular.prefix | 10 +++++----- src/angular.suffix | 2 +- src/directivesAngularCom.js | 29 ---------------------------- src/moveToAngularCom/directivesAngularCom.js | 29 ++++++++++++++++++++++++++++ 4 files changed, 35 insertions(+), 35 deletions(-) delete mode 100644 src/directivesAngularCom.js create mode 100644 src/moveToAngularCom/directivesAngularCom.js (limited to 'src') diff --git a/src/angular.prefix b/src/angular.prefix index 26a8429f..0552b2ed 100644 --- a/src/angular.prefix +++ b/src/angular.prefix @@ -1,18 +1,18 @@ /** * The MIT License - * + * * Copyright (c) 2010 Adam Abrons and Misko Hevery http://getangular.com - * + * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: - * + * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -21,4 +21,4 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ -(function(window, document){ +(function(window, document, onLoadDelegate){ diff --git a/src/angular.suffix b/src/angular.suffix index 4b3cc37b..c5754df2 100644 --- a/src/angular.suffix +++ b/src/angular.suffix @@ -1 +1 @@ -})(window, document); \ No newline at end of file +})(window, document, window.onload); diff --git a/src/directivesAngularCom.js b/src/directivesAngularCom.js deleted file mode 100644 index 84032bdd..00000000 --- a/src/directivesAngularCom.js +++ /dev/null @@ -1,29 +0,0 @@ - -angular.directive("auth", function(expression, element){ - return function(){ - if(expression == "eager") { - this.$users.fetchCurrent(); - } - }; -}); - - -//expression = "book=Book:{year=2000}" -angular.directive("entity", function(expression, element){ - //parse expression, ignore element - var entityName; // "Book"; - var instanceName; // "book"; - var defaults; // {year: 2000}; - - parse(expression); - - return function(){ - this[entityName] = this.$datastore.entity(entityName, defaults); - this[instanceName] = this[entityName](); - this.$watch("$anchor."+instanceName, function(newAnchor){ - this[instanceName] = this[entityName].get(this.$anchor[instanceName]); - }); - }; -}); - - diff --git a/src/moveToAngularCom/directivesAngularCom.js b/src/moveToAngularCom/directivesAngularCom.js new file mode 100644 index 00000000..84032bdd --- /dev/null +++ b/src/moveToAngularCom/directivesAngularCom.js @@ -0,0 +1,29 @@ + +angular.directive("auth", function(expression, element){ + return function(){ + if(expression == "eager") { + this.$users.fetchCurrent(); + } + }; +}); + + +//expression = "book=Book:{year=2000}" +angular.directive("entity", function(expression, element){ + //parse expression, ignore element + var entityName; // "Book"; + var instanceName; // "book"; + var defaults; // {year: 2000}; + + parse(expression); + + return function(){ + this[entityName] = this.$datastore.entity(entityName, defaults); + this[instanceName] = this[entityName](); + this.$watch("$anchor."+instanceName, function(newAnchor){ + this[instanceName] = this[entityName].get(this.$anchor[instanceName]); + }); + }; +}); + + -- cgit v1.2.3