cakephp中链接和postLink之间的区别(Difference between link and postLink in cakephp)
我是cakephp的新手。 请多多包涵。 我想知道它们之间有什么区别
$this->Html->link();
和
$this->Form->postLink();
正如我所看到的,他们都只会输出锚标签。 什么使得通过链接使用postLink()()?
I am new to cakephp. Please bear with me. I want to know what is the difference between
$this->Html->link();
And
$this->Form->postLink();
As i have seen both of them will output anchor tag only. What makes the use of postLink() over link() ????
原文:https://stackoverflow.com/questions/35764086
更新时间:2023-08-21 10:08
最满意答案
没有。尽管还有其他方法可以达到同样的效果,但您总是需要两条语句。
No. Although there are other ways to achieve this same effect, you will always need two statements.
相关问答
更多-
扩展 - 根据一些意见提供更多的细节 错误 错误TS2306:文件'test.ts'不是模块。 来自这里描述的事实http://exploringjs.com/es6/ch_modules.html 17.模块 本章介绍了ECMAScript 6中内置模块的工作原理。 17.1概述 在ECMAScript 6中,模块存储在文件中。 每个文件只有一个模块,每个模块有一个文件。 您有两种从模块导出东西的方法。 这两种方法可以混合使用,但通常更好地分别使用它们。 17.1.1多个命名输出 可以有多个命名导出: / ...
-
使用其中一个是否有性能优势? 请记住,没有JavaScript引擎,但本机支持ES6模块。 你说自己在使用Babel。 默认情况下,Babel将export声明转换为CommonJS( require / module.exports )。 因此,即使您使用ES6模块语法,如果在Node中运行代码,则将使用CommonJS。 CommonJS和ES6模块之间有技术上的区别,例如CommonJS允许您动态加载模块。 ES6不允许这样做, 但是在开发中有一个API 。 由于ES6模块是标准的一部分,我将使用它们 ...
-
将以下两个语句合并为一个 不,你需要两份陈述。 combine the following two statements into one No. You need two statements.
-
您可以使用 export { default as users } from './users'; // ^^^^^^^ or whatever the module exports You can use export { default as users } from './users'; // ^^^^^^^ or whatever the module exports
-
您可以将以下两行添加到MathAll.ts文件中: export import MathBasics = require("MathBasics"); export import MathAdvanced = require("MathAdvanced"); 这将允许您基本上使用MathAll psudeo模块导入两个... import math = require('./MathAll'); math.MathAdvanced.... 但是它会对你的自动完成造成一些破坏,并且有一些提示,这可能会 ...
-
不能使用带有typescript的新ES6导入语法的旧导入模块(Cannot use old import module with new ES6 import syntax with typescript)[2024-02-06]
试试: import * as bluebird, {Promise} from "bluebird"; Turns out the problem is not with the code shown in my example but with the return type needing to be typed correctly, after sorting that the problem goes away, so really this is not an issue. -
SystemJS中没有使用es6功能正确检测Validation.ts中的代码,因此它会跳过编译并尝试按原样加载该文件,从而导致错误。 解决方法是显式声明格式 - 您需要将meta添加到src包配置: src: { defaultExtension: 'ts', meta: { '*.ts': {format: 'esm'} } ...
-
您正在从两个位置导入单个服务,这将创建两个实例 看到这一行 import {Scene} from '../sketch-objects/scene'; 从lib文件中再次导入 import * as lib from './lib' 因此,当使用Sketch服务时,angular将不知道要选择哪个服务实例。 要解决此问题,请从同一路径导入服务 注意: 另请参阅此答案 You are importing single service from two places which creates two i ...
-
根据Daniel Rosenwasser,在tsconfig.json "compilerOptions"部分设置"allowJs": true就可以了。 我根本不必使用.d.ts文件。 Per Daniel Rosenwasser, setting "allowJs": true in the tsconfig.json "compilerOptions" section did the trick. I didn't have to use a .d.ts file at all.
-
没有。尽管还有其他方法可以达到同样的效果,但您总是需要两条语句。 No. Although there are other ways to achieve this same effect, you will always need two statements.