Questions tagged [angularjs-module]

The angular.module is a global place for creating, registering and retrieving Angular modules. All modules (angular core or 3rd party) that should be available to an application must be registered using this mechanism.

From Angularjs documentation:

The angular.module is a global place for creating, registering and retrieving Angular modules. All modules (angular core or 3rd party) that should be available to an application must be registered using this mechanism.

187 questions
3
votes
2 answers

Nested modules in AngularJS

I Have 2 differents AngularJs modules : a widgetContainer and a widget. A widget can be displayed as an independant application or be included into a widgetContainer. A widgetContainer contains 0-N widgets. If i try to boostrap the widget module…
oOnez
  • 887
  • 2
  • 11
  • 23
3
votes
1 answer

Use angular-ui-notification in anuglar service instead of controller?

I am able to use above mentioned module in controller with below syntax but while try to use same in service its not working. app.controller('regulationCtrl', function ($scope, $rootScope, $http, $window, $location,Notification) { …
3
votes
1 answer

AnguarJS module to wrap javascript libraries

I'd like to use a library in my angular project that provides sliders written in javascript/jQuery. Therefore I would write a directive inside my project, with a certain interface to use the library-functionality. I would load the library source…
marcel
  • 3,231
  • 8
  • 43
  • 76
3
votes
3 answers

Where is the controller in this simple AngularJs page?

I am told that every AngularJS page with the ngApp directive has a controller, providing for $scope. In the earliest, simplest example given by the W3Schools site the code has no ngController tag:
3
votes
1 answer

Dynamically register directive at runtime

Normally, directives are registered on a module by using the directive method: .directive('MyDirective', function (MyDep) { return { restrict: 'E', template: '
', controller: function ($scope) { } …
csvan
  • 8,782
  • 12
  • 48
  • 91
3
votes
1 answer

Angularjs Uncaught Error: [$injector:unpr]

I am developing shoping website with java and I am using angurajs. I have problem with thise files: DashboardControll.js 'use strict'; var app = angular.module("DashboardApp", []); app.controller("DashboardCtrl", function($scope, $http,…
Mišel Ademi
  • 187
  • 4
  • 15
3
votes
2 answers

How to add more than one dependency module in AngularJS

Hi I am new to angularjs, I want to add more than one dependency module in the app. Here is my code: var NBModule = angular.module('NBModule', ['ui.router','ngDraggable']); I even tried var NBModule = angular.module('NBModule',…
praveenraj
  • 774
  • 1
  • 9
  • 20
3
votes
2 answers

angular wait for parent controller

I have an angular application and several modules. As you can see below, i am calling a directive that in mod2, at the mod1template.html. myvar gets value in mod1Ctrl But angular initialize child first and myvar appears empty in mod2's…
3
votes
2 answers

How module have access to another module even though it has no dependencies

I'm a little confused about how modules load in angular. Take for example the following code: var app = angular.module("app", [ "app.widgets", "app.core"]); var core = angular.module("app.core", []); core.factory("foo", function(){ …
ek_ny
  • 10,153
  • 6
  • 47
  • 60
3
votes
2 answers

When pulling angularjs controllers out into different files, what if my module doesn't load first?

When my module does not load how can I load it correctly? Suppose I have tens of controllers and I would like to separate each controller into its own file. For this example suppose I have one controller that lives in a file:…
JZ.
  • 21,147
  • 32
  • 115
  • 192
3
votes
1 answer

Creating virtual keyboard as a AngularJs module?

I have a AngularJs app and I need to create a virtual keyboard. The keyboard should be a separate module. My problem is that I am not sure how to properly structure my module? Should it be implemented as a directive, or service or etc? I want my…
annomiss
  • 59
  • 1
  • 2
  • 6
3
votes
1 answer

angular module is not available

This is surely a noob question but I just can't seem to figure out what is wrong with this simple module initiation (JSFiddle): var myApp = angular.module('myApp', []); I get an error saying that "Module 'myApp' is not available!". Does anyone know…
Stig Perez
  • 3,595
  • 4
  • 23
  • 36
3
votes
2 answers

AngularJS ng-view not loading template file content

I'm trying to set up a demo angular app but for some reason my partial (partials/test.html) content isn't loading into the layout file. Here's the index.html:
novon
  • 973
  • 3
  • 15
  • 30
3
votes
2 answers

AngularJS: Directive can not find dependency injected

Here is my plunker - http://plnkr.co/edit/uqSB1gIz6XEmJfC8zHNb?p=preview I am trying to inject Angular Strap The index.html is including the right dependencies and in correct order