You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -51,30 +60,27 @@ If you have a module called myModule, for example:
51
60
52
61
[More in step 0 in the tutorial](http://angularjs.meteor.com/tutorial/step_00)
53
62
54
-
### New Data-Binding to avoid conflict
55
-
To prevent conflicts with Meteor's Blaze live templating engine, angular-meteor has changed the default AngularJS data bindings from <code>{{...}}</code> to <code>[[...]]</code>. For example:
63
+
### Data-Binding
64
+
From angulr-meteor version 0.6 you can use AngularJS's default delimiters and there is no need to change them.
65
+
66
+
All you need to do is change your AngularJS HTML template files to end with .tpl extension like - myFile.tpl
67
+
68
+
Then you can use it regularly, for example:
56
69
57
70
<div>
58
71
<label>Name:</label>
59
72
<input type="text" ng-model="yourName" placeholder="Enter a name here">
60
73
<hr>
61
-
<h1>Hello [[yourName]]!</h1>
74
+
<h1>Hello {{yourName}}!</h1>
62
75
</div>
63
76
64
77
[More in step 2 of the tutorial](http://angularjs.meteor.com/tutorial/step_02)
[More in step 6 of the tutorial](http://angularjs.meteor.com/tutorial/step_06)
83
+
[More in step 3 of the tutorial](http://angularjs.meteor.com/tutorial/step_03)
78
84
79
85
### Subscribe
80
86
@@ -83,18 +89,19 @@ To prevent conflicts with Meteor's Blaze live templating engine, angular-meteor
83
89
### Adding controllers, directives, filters and services
84
90
To prevent errors when minifying and obfuscating the controllers, directives, filters or services, you need to use [Dependency Injection](http://docs.angularjs.org/guide/di). For example:
@@ -106,43 +113,24 @@ To prevent errors when minifying and obfuscating the controllers, directives, fi
106
113
107
114
$scope.archive = function() {
108
115
angular.forEach($scope.todos, function(todo) {
109
-
if (todo.done) $scope.todos.delete(todo);
116
+
if (todo.done) $scope.todos.remove(todo);
110
117
});
111
118
};
112
119
}
113
120
]);
114
121
115
-
### Creating and inserting template views
116
-
A template is defined using the template tags (this could be in a standalone file or included in another file).
117
-
118
-
<template name="foo">
119
-
<h1>Hello, World!</h1>
120
-
</template>
121
-
122
-
You can render this template using handlebars as you would for any other Meteor app:
123
-
124
-
{{> foo}}
125
-
126
-
Templates will also be added to the $templateCache of the angular-meteor module. To invoke the template in AngularJS you could use ng-view and specify the template in the $templateCache when defining your routes using the $routeProvider or you could use the ng-template directive to render your template like this:
127
-
128
-
<ANY ng-template="foo"></ANY>
122
+
### Routing
123
+
There is no need anymore to use the [urigo:angular-ui-router](https://github.com/Urigo/meteor-angular-ui-router) pacage.
124
+
You can just include [ui-router](https://github.com/angular-ui/ui-router) with the [meteor bower package](https://atmospherejs.com/mquandalle/bower) and in templateUrl insert the path to the tpl files.
129
125
130
-
<!--Add the ng-controller attribute if you want to load a controller at the same time.-->
Templates with names starting with an underscore, for example "_foo", will not be put into the $templateCache, so you will not be able to access those templates using ng-template, ng-include or ng-view.
126
+
[More in step 5 of the tutorial](http://angularjs.meteor.com/tutorial/step_05)
It would be wise to consider using the [urigo:angular-ui-router](https://github.com/Urigo/meteor-angular-ui-router) Meteor package for angular-meteor, which exposes the popular [ui-router](https://github.com/angular-ui/ui-router) module to angular-meteor. For those of you that have grown accustomed to the Meteor methods of routing, angular-meteor is compatible with [Iron Router](https://github.com/EventedMind/iron-router).
144
-
145
-
[More in step 5 of the tutorial](http://angularjs.meteor.com/tutorial/step_05)
146
134
147
135
### User
148
136
@@ -162,7 +150,6 @@ It would be wise to consider using the [urigo:angular-ui-router](https://github.
162
150
163
151
Using this method, additional functionality has been provided to urigo:angular-meteor in the form of separate Meteor packages that expose and inject angular modules into angular-meteor. These packages have been developed by either the angular-meteor Team and/or by third parties. The following is a non-exhaustive list of these packages:
164
152
165
-
-[urigo:angular-ui-router](https://github.com/Urigo/meteor-angular-ui-router) empowers angular-meteor with the [ui-router](https://github.com/angular-ui/ui-router) module.
166
153
-[urigo:ionic](https://github.com/Urigo/meteor-ionic)[Ionic Framework](http://ionicframework.com/) on top of Meteor.
167
154
-[netanelgilad:angular-file-upload](https://github.com/netanelgilad/meteor-angular-file-upload) empowers angular-meteor with [angular-file-upload](https://github.com/nervgh/angular-file-upload) module.
168
155
-[davidyaha:smart-table](https://github.com/davidyaha/meteor-smart-table) empowers angular-meteor with [smart-table](https://github.com/lorenzofox3/Smart-Table) module.
0 commit comments