angular-ui

AngularJS + Fullcalendar send error TypeError: Cannot read property '__id' of undefined

耗尽温柔 提交于 2020-01-02 04:07:05
问题 im using angular-ui-calendar in my website. In the controller, i have writed this: define(['underscore'], function (_) { "use strict"; var SearchController = function ($scope, $location, OrdersService, UsersService) { /* config object */ $scope.uiConfig = { calendar: { height: 450, editable: true, firstDay: 0, monthNames: ['Enero', 'Febrero', 'Marzo', 'Abril', 'Mayo', 'Junio', 'Julio', 'Agosto', 'Septiembre', 'Octubre', 'Noviembre', 'Diciembre'], monthNamesShort: ['Ene', 'Feb', 'Mar', 'Abr',

Popover Template in Angular UI

元气小坏坏 提交于 2020-01-02 02:19:07
问题 I am using angular-ui-bootstrap in my current project, and I have a requirement for a popover to open up in each row in a grid displaying row specific information. The popover should have its own HTML template and there are multiple fields that can be bound in the HTML template. Here is the code I have written to achieve the same. I did try to pass the html template with no luck. Any help is appreciated. HTML Code: <div ng-app="helloAngular" ng-controller="casesCntrl"> <table class="table

Add a table type to a JSON editor

扶醉桌前 提交于 2020-01-02 01:36:07
问题 I want to understand the code of this JSON editor and modify it. In directives.js, there is a piece of code that tries to construct templates: var switchTemplate = '<span ng-switch on="getType(val)" >' ... ... + '<span ng-switch-when="Boolean" type="boolean">' + '<input type="checkbox" ng-model="val" ng-model-onblur ng-change="child[key] = val">' + '</span>' ... ... + '</span>'; // display either "plus button" or "key-value inputs" var addItemTemplate = '<div ng-switch on="showAddKey" class=

How can I clear all the AngularJS $scope and $rootScope values within a single function?

狂风中的少年 提交于 2020-01-02 01:12:09
问题 I need to clear all the $scope values while performing some operations. For eg: If I Click a "Signout" button to redirect to "signin" page, then all the $scope or $rootScope values in the session should be cleared. How can I achieve this? 回答1: You can do the following: $rootScope = $rootScope.$new(true); $scope = $scope.$new(true); The function $new is creating a new scope inheriting the variables from the parent. true prevents the inheritance. But this is not the correct approach, because if

How to hide column in ng grid

六月ゝ 毕业季﹏ 提交于 2020-01-02 00:12:51
问题 here is my code: index.html <!DOCTYPE html> <html ng-app="myApp"> <head> <meta charset="utf-8" /> <title>AngularJS Plunker</title> <link rel="stylesheet" type="text/css" href="http://angular-ui.github.com/ng- grid/css/ng-grid.css" /> <link rel="stylesheet" type="text/css" href="style.css" /> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.0.2/angular.min.js"></script> <script type="text

Open modal inside a modal

戏子无情 提交于 2020-01-01 04:44:09
问题 I have a angular ui modal. In that there is a button.On clicking this button I want to open another modal in angular ui.how can i do this $scope.open = function () { var modalInstance = $modal.open({ templateUrl: 'myModalContent.html', controller: ModalInstanceCtrl, }) }; myModalContent.html contains a button on clicking which I want to open another modal. <a class="btn btn-success" href="#" role="button" ng-click="openModal()">Open modal</a> I am unable to open a modal on clicking the button

How to use angular-ui-bootstrap (modals) in typescript?

房东的猫 提交于 2020-01-01 03:02:47
问题 I'd like to edit some data from a table using a modal. There are various interfaces in the typescript definitions for angular-ui-bootstrap from definitelyTyped, however they are undocumented and I'm not able to find any examples on how to use them. IModalScope IModalService IModalServiceInstance IModalSettings IModalStackService https://github.com/borisyankov/DefinitelyTyped/blob/master/angular-ui-bootstrap/angular-ui-bootstrap.d.ts#L146 What I'd like to achieve is something like this: Am I

Gridster jQuery plugin on AngularJS ng-repeat content going bad

一笑奈何 提交于 2020-01-01 01:15:07
问题 I'm trying to integrate Gridster with AngularJS, but without too much success yet. Reading the documentation on Angular UI's ui-jq directive, I get the impression that this (check fiddle) should work. But when I look a bit further with Chrome's debugger, it turns out that on this line, it doesn't find any children at all. I suspect that somewhere in the ng-repeat directive, AngularJS decides to rip out the part that will be repeated, and I see why, but that doesn't solve my problem. I'd

ui-select multiselect is very slow in displaying the choices

牧云@^-^@ 提交于 2019-12-31 09:16:13
问题 I ran into this problem, and I don't know how to solve it. I have used a ui-select multiselect in my page. First, a http.get request is made to a url which gets the data, then the ui-select choices are populated. The data is big - the length of the data is 2100. This data is to be shown as choices. (The data is fetched at the beginning during the loading of the page and is stored in an array) But the problem is each time I click on the multiselect to select a choice, it takes 4-5 seconds to

Angular UI Router issue when redirecting to a template after resolve() throws error

99封情书 提交于 2019-12-31 02:23:09
问题 So It took me a very long time to understand this issue and get to a mcve. Here is the case : I'm trying to redirect a user to a login page when he's not authenticated (this is very basic). Here is the code : HTML : <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.6/angular.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/angular-ui-router/0.2.13/angular-ui-router.min.js"></script> <script src="js/app.js"></script> </head> <body ng-app=