javascript - Meteor helpers not available in Angular template -


i learning meteor , i'm trying add internationalization support tap:18n package. unfortunately, template helper function _ not availble inside angular modules. example

<div>{{_ "foo"}}</div> 

works, not when using inside module template :

> index.html

<div ng-app="app" ng-include="'foo.ng.html'"> 

> foo.ng.html

<div ng-app="bar">   <div>{{_ "bar"}}</div> </div> 

note: app declared inside foo.js angular.module('app', ['angular-meteor']);, in project root level.

is possible make helpers available inside angular modules?

(note: see referenced issue.)

** edit **

same thing happens when trying render package templates inside template :

> index.html

<section ng-app="users"          ng-include="'users/usersession.ng.html'"> </section> 

> users/usersession.ng.html

<ul class="nav navbar-nav navbar-right">   {{> loginbuttons}} <!-- here --> </ul> 

then syntax error: token '>' not primary expression @ column 1 of expression [> loginbuttons] starting @ [> loginbuttons].

note: module users defined , works fine without {{> loginbuttons}} expression.

you can use meteor templates inside angular. try like:

<meteor-include src="mytemplate"></meteor-include> 

your template like:

<template name="mytemplate">     <div>{{_ "foo"}}</div> </template> 

remember when naming .html files, angular templates name.ng.html , meteor templates name.html


Comments

Popular posts from this blog

javascript - Karma not able to start PhantomJS on Windows - Error: spawn UNKNOWN -

c# - Display ASPX Popup control in RowDeleteing Event (ASPX Gridview) -

Nuget pack csproj using nuspec -