Tagged Questions
3
votes
2answers
17 views
specifying AngularJS controller: benefits using ngController vs. $routeProvider
There are two ways (AFAIK) to associate a controller with a view template/partial: the route specified in $routeProvider and the ngController directive. Especially (but not exclusively) for simple ...
0
votes
1answer
59 views
ngRouter/uiRouter preserve controllers when changing view
Is there anyway to preserve route controllers in Angular when using routing?
Everytime I change the view, the old controller is destroyed and a new one created, but I was wondering if there was a way ...
0
votes
1answer
83 views
Routing with controllers in these html pages, is it possible?
I'm new in AngularJS development and I'm actually in front of a problem.
In my index.html I have already many scripts included like that :
<script type="text/javascript" ...
0
votes
4answers
82 views
Angular JS - Preventing a controller from running
So I'm doing a simple 'is the user logged in' check and redirecting the user to the signin.html page if they are not logged in. My code looks something like this:
var myAppModule = ...
1
vote
1answer
83 views
Creating a controller to each view in angularjs
I'm beginner in AngularJS and I want to create a controller to each view, but this file only can be referenced when I load the view, so:
my app.js:
var app = angular.module('app',['ngRoute']);
...
0
votes
0answers
223 views
Dynamic routing with dynamic controllers in AngularJS
I am currently using require.js and angular. Since I have a very long list of custom views, each for a different task, I've cooked up a way of including them dynamically using requirejs.
First a ...
1
vote
0answers
391 views
AngularJS - “10 $digest() iterations reached” when ng-view ng-repeat dependant on $routeParams
I am really new to Angular and this is the first time that I am dealing with routing, so please excuse me if my questions are a bit confusing. My actual logic and structure for this app is much more ...
0
votes
1answer
233 views
Controller doesn't work after URL change
In short:
I have a controller that triggers some jQuery in my AngularJS web page to fade out a play button and a corresponding image. But, when the URL changes, the controller fails to work on ...
1
vote
1answer
802 views
AngularJS Controller $scope not displaying variable
I am new to AngularJs.
In app.js I have the following
angular.module('module1', ['module2'])
.config(function($routeProvider) {
$routeProvider
.when('/',
{
...
0
votes
0answers
101 views
Share data between controllers using permalinks?
I would like to share data between controllers using permalinks, rather than signals or factories.
Given a single page application, with three controllers (Ctrl1, Ctrl2, Ctrl3), and a predefined ...
4
votes
3answers
8k views
Simple Angular $routeProvider resolve test. What is wrong with this code?
I have created a simple Angular JS $routeProvider resolve test application. It gives the following error:
Error: Unknown provider: dataProvider <- data
I would appreciate it if someone could ...