mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-05-19 03:51:07 +00:00
parent
9453c61093
commit
256fcb6884
1 changed files with 4 additions and 3 deletions
|
|
@ -323,9 +323,10 @@ Here is an example of what the template definition for the `dialog` widget may l
|
||||||
|
|
||||||
This will not render properly, unless we do some scope magic.
|
This will not render properly, unless we do some scope magic.
|
||||||
|
|
||||||
The first issue we have to solve is that the dialog box template expects `title` to be defined, but
|
The first issue we have to solve is that the dialog box template expects `title` to be defined.
|
||||||
the place of instantiation would like to bind to `username`. Furthermore the buttons expect the
|
But we would like the template's scope property `title` to be the result of interpolating the
|
||||||
`onOk` and `onCancel` functions to be present in the scope. This limits the usefulness of the
|
`<dialog>` element's `title` attribute (i.e. `"Hello {{username}}"`. Furthermore, the buttons expect
|
||||||
|
the `onOk` and `onCancel` functions to be present in the scope. This limits the usefulness of the
|
||||||
widget. To solve the mapping issue we use the `locals` to create local variables which the template
|
widget. To solve the mapping issue we use the `locals` to create local variables which the template
|
||||||
expects as follows:
|
expects as follows:
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue