Skip to content

Commit

Permalink
Renamed src to public (#255)
Browse files Browse the repository at this point in the history
  • Loading branch information
jankowiakmaria authored and matteofigus committed Jun 27, 2016
1 parent f2d561f commit ef24ac1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/advanced-operations.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ Context aggregates request data, and the registry's context. It consists of the

# Add static resource to the component

In this example an image (`src/static_resource.png`) will be our static resource.
In this example an image (`public/static_resource.png`) will be our static resource.

## Prepare package file
First step is to prepare `package.json` file. It is necessary to add `static` property in `oc.files` object:
Expand All @@ -125,18 +125,18 @@ First step is to prepare `package.json` file. It is necessary to add `static` pr
"src": "template.html",
"type": "handlebars"
},
"static": ["src"]
"static": ["public"]
}
}
}
```
It is an array of names of directories. In the above example the `src` directory will be included inside the package.
It is an array of names of directories. In the above example the `public` directory will be included inside the package.

## Add image in the view template

We can add image to the component view template using `img` tag in which `src` attribute is bound to `img` viewModel property.
```html
<img src="{{path}}src/static_resource.png" />
<img src="{{path}}public/static_resource.png" />
```

## Update server file
Expand Down

0 comments on commit ef24ac1

Please sign in to comment.