angular-ui

AngularUI Router - What's the best way to implement “multiple simultaneous states”?

ε祈祈猫儿з 提交于 2020-01-05 05:52:26
问题 Say I've got two or more views on the same page that could be seen as widgets - whose state transitions are largely self-contained - what's the best way to implement this kind of "multiple simultaneous states"? (Or please correct me if this is not what "multiple simultaneous states" means) 回答1: what exactly you are trying to achieve is not very clear but this might help. Multiple-Named-Views OR you can also manage states like: $stateProvider.state("a", { url: "/a", title: "PartA", templateUrl

angularJS: ui-router equivalent to $location.search

空扰寡人 提交于 2020-01-04 04:42:07
问题 I'm using the following to do paging in my datagrid: $location.search('page', page); where page is the current page number. Then I listen to the following event: $scope.$on('$routeUpdate', function(next, current) { $scope.currentPage = $routeParams.page ? Number($routeParams.page) : 1; $scope.search(); }); That triggers a call to a search() method on my scope after updating the currentPage that is in the URL. How would I translate that to states with ui-router ? The $routeUpdate is no longer

Using ng-blur and ui-sref doesn't work as expected

自古美人都是妖i 提交于 2020-01-04 04:25:18
问题 I have a search field with a custom dropdown results panel which is shown when typing a word in it or when it is focused. So my html looks something like this: <div class="input-group"> <input type="text" class="form-control" ng-model="userSearch" ng-change="onInputChange()" ng-focus="onInputChange()" ng-blur="onInputBlur()" /> <span class="input-group-btn"> <button type="button" ng-click="search()">Search</button> </span> </div> <div id="results" ng-if="panelShown"> <div ng-repeat="contact

How to define modal controllers in their own file?

吃可爱长大的小学妹 提交于 2020-01-03 07:31:13
问题 My Angular application has a number of modals, and I have AngularUI to provide the modal directive. http://angular-ui.github.io/bootstrap/ So far I have several main controllers, and these are all in the app.js file as routes. $routeProvider.when '/dashboard', templateUrl: '/templates/dashboard/dashboard.html', controller: 'DashboardController' $routeProvider.when '/dataset/:panel_id', templateUrl: '/templates/dataset/dataset.html', controller: 'DatasetController' $routeProvider.when '

Date picker is not working in AngularJS (ng-grid) “editableCellTemplate”

时光怂恿深爱的人放手 提交于 2020-01-03 05:16:07
问题 columnDefs: [{ displayName: 'Date', field: 'date', editableCellTemplate: '<input type="text" ng-class="\'colt\' + col.index" ng-input="COL_FIELD" ng-model="COL_FIELD" datepicker-popup="dd-MM-yyyy" datepicker-append-to-body=true />', enableCellEdit:true }] http://plnkr.co/edit/5kr8lPIMJtWHVFEgzlu1 date-picker is not working edit template, act just like normal edit input... 来源: https://stackoverflow.com/questions/23394619/date-picker-is-not-working-in-angularjs-ng-grid-editablecelltemplate

Angular UI-Calendar TypeError: calendar.fullCalendar is not a function

依然范特西╮ 提交于 2020-01-02 18:16:33
问题 I been trying to use Angular: ui-calendar with meteor, but get this error. TypeError: calendar.fullCalendar is not a function at Scope.scope.initCalendar (calendar.js:265) at Object.fn (calendar.js:337) at Scope.$digest (angular.js:15896) at Scope.$apply (angular.js:16160) at bootstrapApply (angular.js:1679) at Object.invoke (angular.js:4523) at doBootstrap (angular.js:1677) at Object.bootstrap (angular.js:1697) at HTMLDocument.onReady (app.js:47) at fire (jquery.js:3143) In meteor packages i

Angular UI tooltip in ng-repeat not closing

牧云@^-^@ 提交于 2020-01-02 09:56:46
问题 Please see the plunker below: http://plnkr.co/edit/RPpjULZsSDnTFPKiafl2 Basically, the angular-ui tooltip remains when moving up / down to a position where ng-disabled is true. Any thoughts on how to fix the issue would be much appreciated! I'm using Chrome, but the issue appears more serious in Firefox where even with ng-disabled removed the tooltips still remain on mouseleave. 回答1: You can use the $tooltipProvider and alter the trigger map to take click as an additional hide trigger for the

ngModel.$render is not called when model change

梦想与她 提交于 2020-01-02 08:04:08
问题 I'm trying to use tiny-mce with angular, but i have some trouble with the $render function in the directive. When i update the model, the $render function is not call. Here a plunkr to illustrate: http://plnkr.co/edit/Ih1nDq?p=preview I'm not sure, but i think it could be related to angular 1.2, because with angular 1.1.5, it works : http://plnkr.co/edit/LXAtHd?p=preview Is this a bug of angular 1.2, or did i miss something new with angular 1.2? 回答1: As far as I can see, the $render function

How to add angular directive to full calendar event

雨燕双飞 提交于 2020-01-02 07:08:06
问题 I'm using Angular-UI Calendar (angular version of Arshaw's fullcalendar) and on EventRender I would like to add a Angular-UI-bootstrap popover to the event element. I have tried these (using 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>") and eventRender: (event, element) -> element.find(".fc-event-inner").wrap($compile("<div popover='I appeared on

How to add angular directive to full calendar event

a 夏天 提交于 2020-01-02 07:07:12
问题 I'm using Angular-UI Calendar (angular version of Arshaw's fullcalendar) and on EventRender I would like to add a Angular-UI-bootstrap popover to the event element. I have tried these (using 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>") and eventRender: (event, element) -> element.find(".fc-event-inner").wrap($compile("<div popover='I appeared on