function suggest_state_delimited(term) {
var ix = term.lastIndexOf('\n', ',', '.'),
lhs = term.substring(0, ix + 1),
rhs = term.substring(ix + 1),
suggestions = suggest_state(rhs);
suggestions.forEach(function (s) {
s.value = lhs + s.value;
});
return suggestions;
};
function suggest_state_delimited(term) {
var delimiters = [term.lastIndexOf('\n'), term.lastIndexOf(' '), term.lastIndexOf('.'), term.lastIndexOf(',')];
var ix = Math.max(...delimiters),
lhs = term.substring(0, ix + 1),
rhs = term.substring(ix + 1),
suggestions = suggest_state(rhs);
suggestions.forEach(function (s) {
s.value = lhs + s.value;
});
return suggestions;
};
UI Router issue here, if anyone can glance at this.
Heres the state config:
function config($stateProvider, $provide) {
$stateProvider
.state('engagements', {
abstract: true,
url: '/engagements',
redirectTo: 'engagements.home',
template: '<engagement-app />'
})
.state('engagements.home', {
url: '/home',
views: {
'@': {
template: '<parent-engagement-list />'
}
}
})
.state('engagements.create', {
url: '/create',
views: {
'@': {
template: '<engagement-create />'
}
}
})
.state('engagements.details', {
url: '/details/:engagementId',
redirectTo: 'engagements.details.home',
views: {
'@': {
template: '<parent-engagement-details />'
}
}
})
.state('engagements.details.home', {
url: '/home',
views: {
'details': {
template: '<engagement-details [engagement]="engagement" />'
}
}
})Trying to target a ui-view named "details" inside the <parent-engagement-details /> component.
But doesn't seem to be targeting it correctly.
Here's the <parent-engagement-details /> component that has the ui-view.
<div>
<div class="ui bottom attached no-border tab active">
<h1>Details UI-VIEW</h1>
<div ui-view="details"></div>
</div>
</div>Anyone? :(