angularjs-directive

Uncaught Error: [$injector:unpr] Unknown provider: sessionInjectorProvider

我怕爱的太早我们不能终老 提交于 2019-12-13 07:16:27
问题 I am new to angular js, loopback and nodejs, While implementing the authentication in the angular app, I am getting the below mentioned error Uncaught Error: [$injector:unpr] Unknown provider: sessionInjectorProvider <- sessionInjector <- $http <- $compile I was going through this document, but no help. http://www.webdeveasy.com/interceptors-in-angularjs-and-useful-examples/ This error came when I added the below lines for sessionInjector angular.module('myApp', []).factory(

Live, realtime 3 ways data-binding date-time input on AngularFire

守給你的承諾、 提交于 2019-12-13 07:15:12
问题 I have the following simplified version of my code: tr(ng-repeat='entry in ds3.entries | orderBy:orderByField:reverseSort | filter:query as results') td input.screen(type='datetime-local', ng-model='entry.date_received', datetime="MM/dd/yyyy hh:mm a" ) span(ng-hide='') {{entry.date_received | dateFormat }} tr.screen td input.screen(type='datetime-local', ng-model='new_entry.date_received', datetime="MM/dd/yyyy hh:mm a", date-parser="MM/dd/yyyy hh:mm a") td button.btn-xs.btn-success(ng-click=

Can't pass Fullcalendar options through the directive in AngularJS

不问归期 提交于 2019-12-13 07:13:22
问题 I trying to implement a simple example with AngularJS Fullcalendar direcive from here: https://github.com/angular-ui/ui-calendar It doesn't display any event neither apply custom FullCalendar settings and no error are shown, what am I doing wrong? And my code is following: <!DOCTYPE html> <html data-ng-app="foodViewApp"> <head lang="en"> <meta charset="UTF-8"> <title>AngularJS Tutorial</title> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css">

set max size for file input in angularjs

ぐ巨炮叔叔 提交于 2019-12-13 07:10:03
问题 I have used html file input to select file for uploading. I have created a angular directive. Now I want to set max allowed file size for input. If file size is greater then allowed size, error should be returned by directive. I'm new in angularjs and don't know much about directive. If anyone knows the solution with explanation, it will be appreciated. Here is my code till now. HTML <input type="file" id="flBook" name="flBook" valid-file required accept=".pdf" ng-model="ebook.file" ng-if=

How to Keep track of all clicks on page in ionic application?

ぃ、小莉子 提交于 2019-12-13 06:55:11
问题 I have created simple page which contains check boxes. On this page user can check and uncheck boxes multiple times. I want to keep track of all these events? How Can I do that? here is my code. app.js var pmApp = angular.module('pmApp', ['ionic']); pmApp.controller('CheckboxController', function($scope) { $scope.devList = [ { text: "Device & app history", details : "Allows the app to view one or more of: information about activity on the device, which apps are running, browsing history and

Can not change datepicker parameter on change in another datepicker?

随声附和 提交于 2019-12-13 06:49:57
问题 I have two datepicker inside a form. When the user select the first date, the min and max date of the second datepicker should be updated( one year from the selection). But in my case the min and max date update only once, when I select date in first datepicker for the first time. But if I change the selection, the second datepicker not revised with the changed value. html: <div class="form-group"> <label>Model Production Date</label> <input date-picker1 type="text" class="form-control"

AngularJs Directives with DropDown lists

本秂侑毒 提交于 2019-12-13 06:49:09
问题 Perhaps I'm aiming too big with my reusable directive idea, but I've been asked to give a demo for my company in less than two weeks, so I'm aiming higher than normal. I'm building on top of another question I asked and was answered here: Angular to do list directive I've added some new features, such as "Click to edit". Here's my plnkr Here's what works: Click to edit Here's what I'm having problems with: Display text instead of ID from drop down list Auto-focus object to force input to have

AngularJS setting model value from directive and calling a parent scope function holds on to the previous value inside that function

亡梦爱人 提交于 2019-12-13 06:27:13
问题 js fiddle http://jsfiddle.net/suras/JzaV9/4/ This is my directive 'use strict'; barterApp.directive('autosuggest', function($timeout, $http) { return { restrict: "E", scope: { modelupdate:"=", suggestions:"=", urlsend:"@" }, template: '<ul><li ng-repeat="suggest in suggestions" ng-click="updateModel(suggest)">{{suggest}}</li></ul>', link: function (scope, element) { scope.$watch('modelupdate', function() { $timeout(function(){ $http.post(scope.urlsend, {q:scope.modelupdate}).then(function

Isolate scope variable is undefined

只愿长相守 提交于 2019-12-13 06:23:20
问题 For some reason I am not able to access my isolate scope variable "index" in my link function. I have tried both @ and = to see if it made any difference and this had no effect, I also tried using a word other than index (in case it was already in use by angular or something) with the same result. Error msg: ReferenceError: index is not defined . directive: var jobernizeDirectives = angular.module('jobernizeDirectives', []); jobernizeDirectives.directive('viewLargeContent', function() {

Angularjs Directive Delegate not firing through intermediary handler

余生长醉 提交于 2019-12-13 06:19:35
问题 I have just spent 4 hours trying to implement a directive with a delegate, with no luck. Use Case: I have a directive called "filter". When the user activates/deactivates the filters the parent scope may want to update the data on the screen. Before I let the parent run, i want to make some internal changes to an internal data structure and pass the new filter state through to the parent. I have created a jsfiddel to show a simplified version of what i am trying to do. http://jsfiddle.net