Comments (6)
it should be:
<template name="user">
<div class='navbar'>
<img src="logo.svg" />
<h1>Logged In {{firstName}}</h1>
</div>
</template>
Using user.firstname syntax would make it very hard for meteor do know what it is working on.
from meteor.
I get the same issue.
@callesg In the example above, calling <h1>Logged In {{user.firstName}}</h1>
makes sense. The attribute name comes from the template function Template.navbarLoggedIn.user
, hence {{user.firstName}}
and not just {{firstName}}
from meteor.
@olivoil I get that it makes sense.
However (not saying this is not an issue in some way)
- Having that would make it so that one template would be able to have more that one dependency. It may not be a problem by itself, but imagine all the complications that it would bring such as interfering dependencies.(AKA application bugs)
- It basically only adds complexity such as(two ways to do one thing (the way i explained being one)), without any real benefits. Simplicity is nice.
Well that is my view of it.
from meteor.
Have you tried using {{this.firstName}}
instead?
from meteor.
you can also use {{#with}}
:
<template name="navbarLoggedIn">
<div class='navbar'>
<img src="logo.svg" />
{{#with user}}
<h1>Logged In {{firstName}}</h1>
{{/with}}
</div>
</template>
from meteor.
Fixed on devel branch. You can now use nested paths on template properties, whether they are constants or getter functions.
from meteor.
Related Issues (20)
- Underscore 1.6.0 `_.intersection` bug (Meteor package) HOT 1
- Vite config is parsed incorrectly HOT 2
- Error when installing package `jam:method` HOT 5
- `npm install -g meteor` has overly strict install requirements HOT 2
- Exception in onStop callback: TypeError: handle.stop is not a function HOT 3
- issue of auto compile which is not compiling the project locally HOT 3
- Cannot install dependency from the bundle about "source-map-support" from other nation
- [3.0] insertAsync on client won't persist local document HOT 2
- Underscore _.where function return only one item HOT 2
- Meteor.user() does not work in webApp connect handlers HOT 16
- 3.0-beta.6 > Create VueJs App > Cannot find module 'fibers' HOT 5
- Hot Reload with false-positive on Meteor 3.0 using module-resolver Babel plugin HOT 2
- Server HMR running with frontend changes
- [2.15] libcrypto.so.3 not found on CircleCI HOT 4
- Should Meteor.loginWithPassword have a promised-based alternative? HOT 3
- Meteor.loginWithPassword should have a similar signature as Accounts.createUser HOT 5
- Meteor 3: TypeError: Cannot read properties of undefined (reading βformatβ) HOT 2
- Missing Accounts.addEmailAsync
- Meteor 3.0-beta.7 not working HOT 2
- CoffeeScript/Babel turning classes into functions on Cordova/Desktop HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from meteor.