Questions tagged [ngroute]

AngularJS module providing routing, deeplinking services and directives for AngularJS apps.

The ngRoute module provides routing, deeplinking services and directives for AngularJS apps.

Resources

879 questions
0
votes
2 answers

Override AngularJS route to display template based on $scope variable

Using Angular I have a dozen or so routes setup similar to the following example code. Is there a way to override which template and controller is loaded based on some other criteria while keeping the URL in tact? My goal is to display a login page…
Sean256
  • 2,849
  • 4
  • 30
  • 39
0
votes
2 answers

template not displaying binded data after routed, on first click - AngularJS

Trying to route to different view template from the index page. Initially, the list on main index page gets loaded and the main.html gets loaded in ng-view, displaying it's text contents. The data from 'MainCtrl' is broadcasted properly and works…
0
votes
0 answers

How to inject $http in ng-route templateUrl funcion?

My web application has many views(templates) and there is no static pattern to composed the templateUrl just from route parameters. Considering the flexibility to update the routes, I stores the routing table in a SQL server and create a RESTful web…
Vivien Hung
  • 225
  • 4
  • 14
0
votes
1 answer

ngRoute fails to load view defined by $routeProvider

I have just begun trying to integrate ngRoute into an application I am building, but am having trouble getting ngRoute to work. I have created a simple app to describe my attempt. index.html: …
mmedal
  • 75
  • 11
0
votes
0 answers

PHP data from route in AngularJS

I am sending a variable to a PHP file as a parameter on a route with AngularJS. The PHP file then returns an array of objects in a Smarty variable that I would like to use in a normal ng-repeat in the new view that is loaded. How can this be…
trickpatty
  • 433
  • 7
  • 18
0
votes
0 answers

Angularjs Routing not working with other config options

I'm new to angular trying to implement routing in my angularjs app. My app does the followings user can login via facebook then he/she can select a link to navigate Following is my main angularjs file (with route and facebook connect, facebook…
sameera207
  • 16,547
  • 19
  • 87
  • 152
0
votes
1 answer

resolve is not working and template is loading - AngularJS

Following is my $routeProvider code - $routeProvider .when("/login", { template: JST["app/templates/login"], controller: "LoginController", }) .when("/dashboard", { template: JST["app/templates/dashboard"], …
Trialcoder
  • 5,816
  • 9
  • 44
  • 66
0
votes
1 answer

angular js template with routing and translate refusing to work

I am new to angular and it seems very interesting I am creating a template for a promotional page and struggling to understand what is causing an issue on it - half of the script stopped working... My fiddle is in here see > fiddle example or…
Danila Belov
  • 83
  • 10
0
votes
1 answer

Route to new base page

In angular I have defined my routes like this: config(['$routeProvider', function($routeProvider) { $routeProvider.when('/', {templateUrl: 'pages/main.html', controller: 'MainController'}); $routeProvider.when('/login', {templateUrl:…
Vivendi
  • 20,047
  • 25
  • 121
  • 196
0
votes
1 answer

AngularJS: $routeProvider with multiple variables in URL

So I'm playing around with learning angular and trying to make a project issue tracker, only I'm having problems with ngRoute and routing. What I'd ideally like is a system whereby (say) issuetrack.com/projectX returns a view of all the issues for…
0
votes
0 answers

Switching Between Views in HTML

I have an app with Google Maps JavaScript API v3 in it, The map I have is on the bottom of my page and I want it to be on a different view so when I click on a link (Links are locations in this app) The app should take me to a different view with…
Ian Pennebaker
  • 233
  • 4
  • 15
0
votes
3 answers

Unable to use angular factory cross routes

I'm trying to create a factory and use it cross routes in each controller but apparently I'm doing something wrong... The app: var app = angular.module('sam', ['ngRoute', 'ngGrid', 'ui.bootstrap']); The factory app.factory("User",function(){ …
omer bach
  • 2,345
  • 5
  • 30
  • 46
0
votes
1 answer

Angular.js: Uncaught object line 36 ng routing

I am learning AngularJS right now to build my own website. kevhong.com I'm trying to use ng-route to make a nav bar. I follow the example in http://viralpatel.net/blogs/angularjs-routing-and-views-tutorial-with-example/ But the console keep showing…
CocoHot
  • 1,211
  • 2
  • 11
  • 18
0
votes
1 answer

How to use uncss by addy osmani with a Single Page MEAN stack application

I've created a application using the MEAN stack which was generated by Yeoman angular-fullstack I would love to include uncss to my grunt build. Unfortunately, this is not possible given that the site is SPA. I've read that I can generate a site map…
Armeen Moon
  • 18,061
  • 35
  • 120
  • 233