Skip to content

Commit

Permalink
fix(bindings): Make bindings: work on a state declaration (as well …
Browse files Browse the repository at this point in the history
…as a view declaration)

Closes #47
  • Loading branch information
christopherthielen committed Feb 11, 2017
1 parent 5f03719 commit a21c479
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/statebuilders/views.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import {ViewService} from "ui-router-core";
*/
export function ng2ViewsBuilder(state: State) {
let views: { [key: string]: Ng2ViewDeclaration } = {},
viewsObject = state.views || {"$default": pick(state, "component")};
viewsObject = state.views || {"$default": pick(state, ["component", "bindings"])};

forEach(viewsObject, function (config: Ng2ViewDeclaration, name: string) {
name = name || "$default"; // Account for views: { "": { template... } }
Expand Down

0 comments on commit a21c479

Please sign in to comment.