Medium
Given an application using ui-router and the following situation:
app.config(function($stateProvider) {
$stateProvider
.state("parent", {
url: "/parent",
controller: "ParentController",
template: "Parent: <span ui-view></span>"
})
.state("parent.child", {
url: "/child",
controller: "ChildController",
template: "{{string}}"
});
});
app.controller('ParentController', function($scope) {
$scope.string = "I am the parent scope";
});
app.controller('ChildController', function() {});
What will the page at the URL "/parent/child" display?
Author: Mathieu RobinStatus: PublishedQuestion passed 92 times
Edit
0
Community EvaluationsNo one has reviewed this question yet, be the first!
Similar QuestionsMore questions about AngularJS
1
Add an entry to the browser history1
What is the output of the following code?
```
var g = $q.defer();
var f = $q.defer();
setTimeout(function(){
g.resolve(1);
}, 1000);
setTimeout(function(){
f.resolve(2);
}, 2000);
console.log(g.then(function(x){
return f.then(function(y){
return x + y;
});
}));
```0
How to create a child scope for each repeated element in AngularJS0
Retrieve a module already created.0
Emit an event to parent scopes