For my AngularJS project (v1.2.3), I have a list of routes and am trying to build a navigation bar from the object. What I want to do is display any object with an undefined
You can also use
see also How to display placeholders in AngularJS for undefined expression values?
var app = angular.module('myApp', [])
app.controller('mainCtrl',['$scope' , function($scope) {
$scope.nav = [
{ path: '/', title: 'Home' },
{ path: '/blog', title: 'Blog' },
{ path: '/about', title: 'About' },
{ path: '/login', title: 'Login', isRight: true }
];
}])
!isRight
- {{link.title}}
isRight
- {{link.title}}