我想将所选列表项的值传递给另一页,这意味着如果我从列表中选择abc然后这个abc值传递给下一个html表单,它应该只打开那个配置文件页面.我有什么方法可以在不同的html页面中使用此变量.
$('.ui-li-icon li').click(function() {
var index = $(this).index();
text = $(this).text();
alert('Index is: ' + index + ' and text is ' + text);
Run Code Online (Sandbox Code Playgroud)
我想将上面的文本值传递给我的profile.html,它有javascript函数profile().所以我想在函数调用中传递这个文本,如profile(text);我尝试在函数调用上面声明var text但仍然是不工作.请告诉我是否有其他方式.
使用angular-bootstrap ui时,我在控制台中遇到了以下错误.我有角度1.2.6,bootstrap 3.0和angular-bootstrap 0.10.0.
错误:[$ compile:ctreq]无法找到指令'accordionGroup'所需的控制器'accordion'!
谁知道为什么会这样?我的HTML代码.
<div ui-view>
<accordion-group id="crud-talbe" ng-repeat="grid in grids" heading="{{grid.name}}">
<a ng-click="createNewEntity(grid.name)" class="btn btn-default">create new {{grid.name}}</a>
<div class="crudGridStyle" ng-grid="grid" />
</accordion-group>
Run Code Online (Sandbox Code Playgroud) var category = "a()";
if(category.charAt(0) == /^[a-zA-Z]+$/){
/*This part doesn't gets executed*/
/*What is the problem with the if condition?*/
}
Run Code Online (Sandbox Code Playgroud)