I have all of my AngularJS controllers in one file, controllers.js.  This file is structured as follows:  angular.module('myApp.controllers', [])   .controller('Ctrl1', ['$scope', '$http', function($scope, $http) {...
Look at this Fiddle, what do I have to change, that the expressions in the template get evaluated using the arguments I defined in the HTML? The SAVE-button should call the blabla()-function of the controller, since I pass it?  var myApp = angular.mo...
I don't want to use a service or a factory and would like to pass for example an array of data. I would like to access data in my parent controller from my child component.  Factory and service are excluded since i eventually want to migrate my a...
I'm working on refactoring an inherited Ember application, with quite a bit of non-mvc disorder to it. I'm looking to keep things as modular as possible, and am hoping to reuse various ui components in multiple screens to help prevent code du...
I am trying to access the attributes of a directive in the controller function. However, by the time I access it, it is undefined. I noticed that if I do a simple timer it works. Is there a way to execute code only after the directive and it's sc...
I have been told that I should be using the app.controller syntax, in order to support minification.  Rewriting the sample (tutorial) example, and I found that I couldn't get it to work:  use 'strict';  /* Minifiable solution; which doesn...
This my code:     angular.module('MyModule').controller('MyController', ['$scope', '$stateParams','$location', '$http','LocalStorageModule', function($scope, $stateParams, $location, $http, loca...
I have a number of .js files that I would like to be stored in the same directories as their views (they're specific to a view - its simply to keep the javascript separate from the view's HTML)  However, adding them to the /Views/ControllerNa...
I'm trying to display the current time in a view based on a Javascript Date object in my controller. My controller looks like this:  myApp.controller('DateCtrl', function($scope) {     var date = new Date();     $scope.minutes = date.getM...
Using AngularJS, Im trying to load the "myLink" URL address to iframe in another html. data.No is the id that i pull from another place and works fine (get the Id that i need for the url)  in the controller - "TransactionsCtrl":  $sco...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.