angular-html2js 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2f53156f0d67efa018f2508ab2a39962f7500dca
4
- data.tar.gz: b155cb47ce96599a3920ab3e8802797de5908413
3
+ metadata.gz: 53a1d5b77e2db918fe9e11902356eca23f6f8102
4
+ data.tar.gz: d047d76543c60efc8eb8cabb9c477e8b29207040
5
5
  SHA512:
6
- metadata.gz: 4319760aa632f88cc2a0d7470936f949b3006da29c407d1f7ec883b80d1393829f42a44aa6d0a915ff79fec65324b9ec26f6e8f69761231de2385bffa3e89912
7
- data.tar.gz: 978135eb86e022a92a7769d199338e5c6b5c8aa65bf655f91382c6bfb0abc62619bc7a8d9c7c3e43612ca4df39f639c51f784e6739d31a9f58e73a9a160a4fb4
6
+ metadata.gz: 11d0638ac8fc1979db3c2c2c2a34ebd36ca9cf5705317bfe07c923bdb07c2fd72d52b56413d53c969c3255b85aac82b741b9401481868dfe0611abf6c54e338e
7
+ data.tar.gz: 781e065057901107fe12b9e8c760c918196e8106ad2d3f6b6bcc768ef9f0e5442dad683ea9b7417c82999ec3aeea16f7033d08ebbf314948df92dca8347243b4
data/README.md CHANGED
@@ -152,6 +152,14 @@ angular.module('myApp').directive('myDirective', function($injectable){
152
152
  }
153
153
  });
154
154
  ```
155
+
156
+ ## Important Note:
157
+
158
+ If you change anything in the configuration, be sure you clear your asset cache to ensure the templates get
159
+ updated. You can do this in a Rails app by running `rake tmp:clear` or `rm -rf tmp/cache/assets` from the app root.
160
+
161
+ This is necessary because Sprockets is only designed to watch the asset _source files_ for changes. It is unaware
162
+ that the template files have a dependency on the application configuration and therefore doesn't regenerate the templates.
155
163
 
156
164
  ## Contributing
157
165
 
@@ -160,3 +168,7 @@ angular.module('myApp').directive('myDirective', function($injectable){
160
168
  3. Commit your changes (`git commit -am 'Add some feature'`)
161
169
  4. Push to the branch (`git push origin my-new-feature`)
162
170
  5. Create new Pull Request
171
+
172
+
173
+ [![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/k3integrations/angular-html2js/trend.png)](https://bitdeli.com/free "Bitdeli Badge")
174
+
@@ -461,3 +461,9 @@ Started GET "/assets/templates/test_html.js" for 127.0.0.1 at 2013-09-13 12:41:3
461
461
  Started GET "/assets/templates/test.ngt" for 127.0.0.1 at 2013-09-13 12:51:09 -0500
462
462
  Started GET "/assets/templates/test_haml.js" for 127.0.0.1 at 2013-09-13 12:51:10 -0500
463
463
  Started GET "/assets/templates/test_html.js" for 127.0.0.1 at 2013-09-13 12:51:10 -0500
464
+ Started GET "/assets/templates/test.ngt" for 127.0.0.1 at 2013-10-31 12:17:26 -0400
465
+ Started GET "/assets/templates/test_haml.js" for 127.0.0.1 at 2013-10-31 12:17:26 -0400
466
+ Started GET "/assets/templates/test_html.js" for 127.0.0.1 at 2013-10-31 12:17:26 -0400
467
+ Started GET "/assets/templates/test.ngt" for 127.0.0.1 at 2013-10-31 12:22:52 -0400
468
+ Started GET "/assets/templates/test_haml.js" for 127.0.0.1 at 2013-10-31 12:22:52 -0400
469
+ Started GET "/assets/templates/test_html.js" for 127.0.0.1 at 2013-10-31 12:22:52 -0400
@@ -11,24 +11,24 @@ module Angular
11
11
  end
12
12
 
13
13
  TEMPLATE = <<-TEMPLATE
14
- angular.module(\'%s\', []).run(function($templateCache) {
15
- $templateCache.put(\'%s\',
16
- \'%s\');
17
- });
14
+ angular.module('%s', []).run(['$templateCache', function($templateCache) {
15
+ $templateCache.put('%s',
16
+ '%s');
17
+ }]);
18
18
  TEMPLATE
19
19
 
20
20
 
21
21
  SINGLE_MODULE_TPL = <<-SINGLE_MODULE_TPL
22
22
  (function(module) {
23
23
  try {
24
- module = angular.module(\'%s\');
24
+ module = angular.module('%s');
25
25
  } catch (e) {
26
- module = angular.module(\'%s\', []);
26
+ module = angular.module('%s', []);
27
27
  }
28
- module.run(function($templateCache) {
29
- $templateCache.put(\'%s\',
30
- \'%s\');
31
- });
28
+ module.run(['$templateCache', function($templateCache) {
29
+ $templateCache.put('%s',
30
+ '%s');
31
+ }]);
32
32
  })();
33
33
  SINGLE_MODULE_TPL
34
34
 
@@ -1,5 +1,5 @@
1
1
  module Angular
2
2
  module Html2js
3
- VERSION = "0.0.3"
3
+ VERSION = "0.0.4"
4
4
  end
5
5
  end
@@ -2,7 +2,11 @@ class AngularModule
2
2
  constructor: (@name, @deps) ->
3
3
  templates = @templates = {}
4
4
 
5
- run: (block) ->
5
+ run: (injectable) ->
6
+ if injectable instanceof Array
7
+ [injected..., block] = injectable
8
+ else
9
+ block = injectable
6
10
  block
7
11
  put: (id, content) =>
8
12
  @templates[id] = content
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: angular-html2js
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nicholas Clark
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-09-13 00:00:00.000000000 Z
11
+ date: 2013-10-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: tilt