标签: angular-ui

如何使用带有角度ui jquery passthrough的指令内的步骤来获得formwizard?

我已经使用表单向导尝试了角度的jquery passthrough,它运行得很好.现在,我有一个问题.当formwizard中的步骤位于指令内时,jquery passthrough似乎不起作用(显示所有步骤而不是仅显示第一个步骤):

<form ui-jq="formwizard" ui-options="{formPluginEnabled: false, validationEnabled: false, focusFirstInput : false,  disableUIStyles : true}" ng-submit="create(currentActivity, selectedCategories)" class="main">
                    <!--STEP 1 -->             
                    <div activity-wizard-step title="Class Activity Info" description="Add all info about the activity" src="resources/angular/templates/activity_wizard/activity_info.html" step-number="1"></div>

                    <!-- STEP 2 -->
                    <div activity-wizard-step title="Add Class(es)" description="dd Instructor-Led-Training (ILT) Classes below. It can be a classroom ILT or a Webinar ILT and contain 1 or more sessions." src="resources/angular/templates/activity_wizard/add_class.html" step-number="2"></div>

</form>
Run Code Online (Sandbox Code Playgroud)

这是我的activityWizardStep指令的样子:

directivesModule.directive('activityWizardStep', function () {
    return {
        replace: true,
        restrict: 'AE',
        scope: {
            title: …
Run Code Online (Sandbox Code Playgroud)

jquery-form-wizard angularjs angular-ui

3
推荐指数
1
解决办法
5256
查看次数

Angular Bootstrap UI分页:页码可以自定义吗?

想知道是否有一种方法可以自定义分页UI中显示的数字.原因是,如果我有大量页面,我想将页码更改为"...".今天,小部件将放置与设置一样多的页面; 所以将数字设置为50将显示50页.

pagination angularjs angular-ui

3
推荐指数
1
解决办法
1万
查看次数

AngularJS和IE8 - 不受支持的属性或方法

我正在努力支持现有的AngularJS应用程序与Internet Explorer 8一起使用.对于路由,我使用了AngularUI Router框架.它提供了ui-sref导航到其他状态的指令.

在IE8开发人员工具的控制台中,我为每个具有该ui-sref=""属性的元素收到以下错误.

TypeError:Object不支持此属性或方法 <a class=ng-binding href="" ui-sref="state-name">

截图

在此输入图像描述

原始HTML

<a ui-sref="state-name">Go to My State</a>
Run Code Online (Sandbox Code Playgroud)

可能是因为这个错误,导航不起作用.当我点击链接时,没有任何反应.

之前有没有遇到类似问题的人?或者可以指导我走向正确的方向?

javascript angularjs angular-ui

3
推荐指数
1
解决办法
4904
查看次数

使用转义键关闭模态的Angular指令

我创建了一个Angular指令,该指令应该在按下转义键时关闭一个模态.模态服务在控制器中使用时工作正常,但由于某种原因,它在该指令中不起作用.hello按下转义时将打印以下代码,但不会隐藏模态.有任何想法吗?

指示

app.directive("dpEscape", function(modal) {
  return function(scope, element, attributes) {
    element.on("keyup", function(event) {
      if (event.keyCode == 27) {
        console.log("hello");
        modal.hide();
      }
    });
  };
});
Run Code Online (Sandbox Code Playgroud)

我实际上并不认为以下任何代码与问题相关,但我可能是错的.因为我知道人们无论如何都要求它,这里是:

HTML

...
<html ng-app="trread" ng-controller="Main" dp-escape>
...
Run Code Online (Sandbox Code Playgroud)

服务

app.factory("modal", function() {

  var urlPath = "/templates/modals/";
  var visible = false;
  var templateUrl = "";
  var content = {};
  var controller = {};
  var size = {width: 500, height: 500};

  var show = function() {
    visible = true;
  }

  var hide = function() {
    visible …
Run Code Online (Sandbox Code Playgroud)

javascript angularjs angular-ui angularjs-directive angular-ui-bootstrap

3
推荐指数
1
解决办法
5252
查看次数

如何将角度指令添加到完整的日历事件

我正在使用Angular-UI Calendar(Arshaw的fullcalendar的角度版本),而在EventRender上我想在事件元素中添加一个Angular-UI-bootstrap popover.

我试过这些(使用coffeescript):

    eventRender: (event, element) ->
        element.find(".fc-event-inner").wrap("<div popover='I appeared on mouse enter!' popover-title='The title.' popover-trigger='mouseenter'></div>")
Run Code Online (Sandbox Code Playgroud)

    eventRender: (event, element) ->
        element.find(".fc-event-inner").wrap($compile("<div popover='I appeared on mouse enter!' popover-title='The title.' popover-trigger='mouseenter'></div>")($scope))
        $scope.$apply()
Run Code Online (Sandbox Code Playgroud)

但这些似乎都没有做任何事情.我猜第一个问题至少是在角度已经完成它的魔法之后渲染事件.但第二个也没有帮助.使用一些静态元素,popover正常工作.

fullcalendar angularjs angular-ui angular-ui-bootstrap

3
推荐指数
1
解决办法
1450
查看次数

UI Bootstrap Typeahead未显示返回async的值

我正在尝试使用UI Bootstrap Typeahead进行自动完成搜索,以从数据库中选择数据.

我的服务在我的响应中返回数据,但数据未在组件中列出.

当我在组件代码中放置断点时,列表就在那里,当我继续调试时,列表会显示,但如果它没有断点运行,则不会显示列表.

HTML

  <input id="inputInstalation" 
         ng-model="profile.instalation" 
         typeahead-editable="false" 
         typeahead="installation as installation.name for installation in searchInstallation($viewValue)" 
         typeahead-input-formatter="formatLabel($model)" 
         ng-required="true">
Run Code Online (Sandbox Code Playgroud)

调节器

$scope.searchInstallation = function(text){

    return $http.get('/api/installations/name/' + text).then(function(response){
        return response.data;
      });
  };

$scope.formatLabel = function(model){
    return model ? model.name : "";
  };
Run Code Online (Sandbox Code Playgroud)

API NodeJS - DB Mongo

exports.findByName = function(req, res){
  var connection =  getConnection();
  var Installation = getInstallationModel(connection);

  Installation.find({name: new RegExp(req.params.name, "i")}, function (err, result) {
    connection.close();
    if(err) throw err;
    res.json(result);
  });
};
Run Code Online (Sandbox Code Playgroud)

响应

[{ _id: 5525662b74100eb40f13ce00,
  name: 'test 2', …
Run Code Online (Sandbox Code Playgroud)

angularjs angular-ui angular-ui-typeahead

3
推荐指数
1
解决办法
662
查看次数

需要Angularjs Ui网格分组格式

我正在使用Angularjs ui网格分组功能.请参阅图像,当显示组总和时,默认情况下显示为"总计:"但我想将其更改为"总计"(大写"T"),并且我还想将聚合总计限制为2个十进制数.我需要更改设置的位置?

以下是我对Ui Grid的colDef:

angular.forEach(columns, function(value, key) {
        columnDefs.push({
            name: key,
            displayName: value,
            enableCellEdit: false,
            aggregationType: uiGridConstants.aggregationTypes.sum,
            width: '8%'
        })
    });
Run Code Online (Sandbox Code Playgroud)

uiGridGrouping

angularjs angular-ui angularjs-directive angular-ui-bootstrap angular-ui-grid

3
推荐指数
1
解决办法
1785
查看次数

如何在角度ui.grid中找到已排序的列和按什么顺序排列

如何在角度ui.grid中找到已排序的列和按什么顺序排列.其实我想设置基于服务器的分页.为此,我将params中的数据发送为{pageNumber,pageSize,column,order}.现在如何找到用户已经排序的列(名称/年龄/数字)以及角度ui.grid中的顺序(ASC/DESC)

angularjs angular-ui angular-ui-grid angular-ui-select

3
推荐指数
1
解决办法
7523
查看次数

使用stateProvider angularjs的多个可选参数的Url

由于angular angularjs路由有可选的参数值吗?AngularJS:使用带有可选参数的URL进行路由带有?参数名称的 问号应该使其成为可选项.它没有帮助我.

var app = angular.module('app', ['ui.router','ngRoute']);

app.config(function ($urlRouterProvider, $stateProvider) {
    $urlRouterProvider.otherwise('/a');
    $stateProvider.state('a', {
        url: '/a',
        templateUrl: 'views/a.html'
    }).state('b', {
        url: '/b/:code?/:d?',
        templateUrl : 'views/b.html'
    })
});
Run Code Online (Sandbox Code Playgroud)

这个网址http:// localhost:xx/kk /#/ b/1/2对我来说很好.但是http:// localhost:xx/kk /#/ b(没有任何参数)和http:// localhost:xx/kk /#/ b/1对我不起作用......

你可以看到我正在使用$stateProviderui-router.我不想切换到$urlRouteProvider

state angularjs angular-ui angular-ui-router

3
推荐指数
1
解决办法
3014
查看次数

具有高z-index的Angular UI模式不在顶部

在这个插件中我有一个Angular UI模态,其z-index大于div z-index,但是div覆盖了模态.如果你单击div,你会看到模态落后.

由于模态的z-index较大,我希望它在div的顶部.怎么解决这个问题?

HTML

<div class="div1" ng-click="hide()" ng-show="show" >
  CLICK ME
</div>


<script type="text/ng-template" id="myModalContent.html">

<div class="modal-header" ng-style="{'z-index': 99000}">
    <h4 class="modal-title">The Title</h4>
</div>
  SOME TEXT IN THE MODAL

</script>
Run Code Online (Sandbox Code Playgroud)

使用Javascript

var app = angular.module('app', ['ui.bootstrap']);
app.controller('ctl', function ($scope,$uibModal) {

    $scope.show = true;

    (function() {
          $scope.modalInstance = $uibModal.open({
              templateUrl: 'myModalContent.html'
            }); 


    })();


    $scope.hide = function(){
      $scope.show = false;
    };

});
Run Code Online (Sandbox Code Playgroud)

CSS

.div1 {
  position: fixed;
  z-index: 90000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: blue; …
Run Code Online (Sandbox Code Playgroud)

angularjs angular-ui angular-ui-bootstrap

3
推荐指数
1
解决办法
2万
查看次数