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) {...
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...
I can't access to my array controller variables. I have this simple application for example:   App.js  App = Ember.Application.create();  App.ApplicationAdapter = DS.FixtureAdapter.extend();  App.Router.map(function() {      this.route('hello...
I am currently rendering a list of views:    <ul>     {{#each newsItem in controller}}       {{view App.NewsItemView contentBinding="newsItem" class="news-item" }}     {{/each}}   </ul>   But I would like to inject a NewsI...
I have created a custom object Code_Postal__c. The goal is to check into my Code_Postal__c record the city's name with the same ZipCode set by the user on an Account record page.  I don't need, and don't want to create a custom visualforc...
As an example, we have this index.html code:  <!DOCTYPE html> <html ng-app="sample">     <head>     ...     </head>     <body>         <div ng-controller="myController">         ...         <scri...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.