标签:“iron-router”程序员技术文章

在实际更改模板之前,Iron Router会钩在路线上

我试图在用户单击付费对象后立即向其显示付款弹出窗口.但是在他付款后,他应该直接输入他点击的内容.iamtryingtoshowtheuserapaymentpopupassoonasheclicksonapayedobject.Butafterhepaysheshoulddirectlyentert

流星:为什么Iron Router的onBeforeAction会被多次调用?

当我在浏览器中访问路线时,我希望IronRouter在加载路线之前先调用onBeforeAction.但是,似乎在首次加载路线时被调用了3次.WhenIvisitarouteinmybrowserIexpectIronRoutertocallonBeforeActiononcebeforeloadi

在流星中配置Iron Router-React

使用Meteor1.2.0.1和React.我的简单应用很好用,但现在我需要铁路由​​器.UsingMeteor1.2.0.1andReact.MysimpleappworksgreatbutnowIneededironrouter.应用布局:client\app.jsxlib\router.jsx

Iron Router onBeforeAction没有被调用

我设置了/user路由,如果当前用户未登录,该路由应该呈现login模板.整个路由器都有一个waitOn等待currentUser订阅结束.问题是当我转到/user时,它只是呈现了dataNotFound模板.Ihavea/userroutesetup,whichissupposedtorender

Iron Router数据触发3次

我在Router.Config上使用路由模板设置了此路由IhavethisroutesetupwithalodingtemplateonRouter.ConfigRouter.onBeforeAction('loading');this.route('clients',{path:'/clients

简单的 Meteor + React + Iron Router CRUD 应用

在过去的2天里,我一直在努力创建一个Meteor+React+IronRouter项目,该项目提供与这个基本的PHP+HTML页面完全相同的功能.Forthepast2days,I'vebeenstrugglingtocreateaMeteor+React+IronRouterprojectthat

如何使用Iron Router提供静态内容(图像,字体等)

我刚刚开始使用流星上的铁路由器.我需要在首页上显示图片.我能够使用客户端路由为家"配置路由.对于静态文件,我尝试使用google进行搜索,发现添加服务器端路由可能会有所帮助.因此,我在服务器的router.js上添加了以下代码.Ijuststartedworkingwithironrouteronm

流星JS Iron Router,路由子目录

我正在使用Iron:Router在MeteorJS中管理和客户端门户.IamworkingonaadminandclientportalinMeteorJSusingIron:Router.我知道我可以使用以下方法创建路线:Iknowicancreatearouteusing:this.route(

如何编写Iron-router嵌套模板?

我有2个模板:1)mainLayout.html->所有页面必须使用的常规布局.(例如页面标题,导航栏,页脚)1)mainLayout.html->generallayoutwhichmustbeusedbyallpages.(e.g.pagetitle,navbar,footer)Ro

如何在Iron-router中获取查询参数?

我正在尝试在网址中获取查询参数.Iamtryingtogetthequeryparametersintheurl.似乎没有一种简便的方法...Theredoesn'tseemtobeaneasywaytodothis...这让我感到我一定错过了文档中的某些内容.whichleavesmewithth

Iron-Router模板中的上下文

我无法准确地了解流星用Iron-Router调用的模板中可作为上下文使用的内容以及这些东西如何继承.I'mhavingtroubleunderstandingexactlywhatisavailableasmycontextinatemplateinvokedbyMeteorwithIron-Rou

尝试从路由器迁移到Iron-Router

我正在尝试从路由器迁移到Iron-Router,但是我的整个页面都无法正确显示.唯一呈现的模板是从>产量"中产生的模板.我的HTML文件中的任何其他代码均未呈现.Iamtryingtomigratefromroutertoiron-routerbuthavingaproblemwithmyen

再次使用Iron-Router重定向未登录的用户...

如果用户未登录(Windows7上的Meteorv0.8.0),我通常需要将用户重定向到登录页面.Iamfightingwiththecommonneedforredirectingausertoaloginpageifheisnotlogged-in(Meteorv0.8.0onWindows7)

了解新的mongo id并将其与iron-router一起使用

我有一条简单的帖子路线,用于查找帖子_id.问题是pathFor助手创建了这样的路径:ihaveasimplepostroutethatlooksforthepost_id.TheproblemisthatthepathForhelpercreatesapathlikethis:ObjectID("

如何使用Iron-Router使用一个路由控制器渲染多个模板?

我的项目的当前版本的网址这是我的项目的代码URLtocurrentversionofmyprojectHereisthecodeformyproject我正在使用流星和铁路由器制作博客.我想对多个不同的类别页面"使用单个控制器,会在收益率区域中过滤博客文章列表.Iammakingablogusing

使用Iron Router和Meteor加载数据

这是我的难题.我目前正在使用静态变量将类别加载到类别"页面上.一切都会加载,并且链接是可单击的,但是当用户单击类别时."categoryPage"不会加载属于该类别的相应图像.这是我的代码.Hereismydilemma.I'mcurrentlyloadingmycategoriesusingast

MeteorJS + Iron-Router:如何使用pathFor调用集合中的下一个项目?

在发布此问题之前,我做了很多研究,但找不到答案.我敢肯定这是一个简单的任务,但是由于某种原因,它使我头疼.Ididalotofresearchbeforepostingthisquestionandcouldn'tfindtheanswer.I'msureit'sasimpletask,butit'

meteor.js iron-router:防止静态模板重新渲染和毛刺?

我有一个全局模板:<templatename="layout">{{>header}}{{>primaryNav}}{{yield'banner'}}{{yield}}{{>footer}}{{>deleteConfirmModal}}<spanclass=

Iron-Router更改当前路线之前如何钩住?

我处理的表单中,我的用户将文件上传到S3.如果用户在未验证表单的情况下离开该表单,则即使上传了文件,也应该取消文件上传,并从S3中删除文件.IworkonaformwheremyuseruploadfilestoS3.Iftheuserleavetheformwithoutvalidatingit,

如何使用Meteor和Iron-Router对服务器端的路由做出响应?

我正在使用XHR从客户端向服务器端发送文件:I'msendingafilefromclient-sidetoserversideusingXHR:$(document).on('drop',function(dropEvent){dropEvent.preventDefault();_.each(d

Windows 7 x64上使用iron-router(最新版)的安装问题(Meteor 0.8.3)

我正在尝试在Windows7中为我的Meteor项目安装(通过克隆存储库)'iron-router'。I'mattemptingtoinstall(viaclonedrepository)'iron-router'formyMeteorprojectinWindows7.(回购:https://gi

流星崩溃并显示错误:找不到包iron-router的0.9.1版本

RunningMeteor0.8.3,自周一以来就没有在我的项目中进行过.今天,我无法启动Meteor,也无法使用Meteorite软件包管理器:RunningMeteor0.8.3,haven'tworkedonmyprojectsinceMonday.TodayIcan'tstartMeteor

在Iron-Router中为相同的URL推送新状态

我可以使用Meteor中的Iron-Router将新状态推送到浏览器的历史记录中,而无需使用新的URL吗?CanIuseIron-RouterinMeteortopushanewstateontothebrowser'shistory,withoutgoingtoanewURL?我想显示一个模式,但

使用Meteor和Iron Router创建活动的导航状态

我想在IronRouter当前正在渲染的导航列表项中添加活动"类.Iwanttoaddaclassof'active'tothenavlistitemthatiscurrentlybeingrenderedbyIronRouter.这是我的标记:<ul><li>{{#link

是否可以定义响应某些HTTP动作的Iron-Router服务器端路由?

我在iron-router中定义了一条基本的服务器端路由,例如:Ihaveabasicserversideroutedefinediniron-routerlike:this.route('foo',{where:'server',path:'/foo',action:function(){//ha

使用Iron Router从Ruby发布到Meteor?

我一直在尝试从Ruby脚本获取消息到使用POST使用MeteorJS构建的webapp,但我一直面临一些问题。关于使用IronRouter的POST和GET方法管理的在线文档不多。I'vebeentryingtogetamessagefromaRubyscripttoawebappbuiltwith

如何使用Meteor和Iron Router检查模板中路由名称的路由

我可以在模板中使用什么来找出与我当前所在路线相关联的路线名?WhatcanIuseinatemplatetofigureouttheroutenamethatisassociatedwiththeroutethatIamcurrentlyon?例如,如果我在铁路由器中配置了这样的路线this.rou

Template.tmpl.helpers()中Iron-Router RouteController中的调用方法不起作用

每次尝试调用loadMoreClients方法时,我都尝试将新数据推送到我的clients数组中.该出版物期望此back_to参数,并且知道如何处理它.我的问题是我似乎无法从模板助手中调用这些方法.I'mtryingtopushnewdataontomyclientsarrayeachtimethe

如何使用Iron Router返回404

当我遇到使用IR的Meteor应用程序中不存在的路由时,我收到一个200响应,该响应带有HTML(在浏览器上呈现时)在控制台上显示js错误的HTML,表示Noroutefoundforpath:"/aRoute"WhenIhitaroutethatdoesn'texistonmyMeteorappt

jQuery插件不适用于Iron Router

我是Meteor的新手,所以我正在尝试一些代码.我正在测试jQuery插件以带来时尚的图像悬停效果,并且当我不使用Iron路由器而是使用简单的模板-{{>home}}而不是{{>yield}}时,它可以工作.因此,我有一个简单的masterLayout模板:I'mnewtoMeteors