From 1e2a7a446fb67ebd0d00cceca921646582c3ebfe Mon Sep 17 00:00:00 2001 From: Vladimir Lugovsky Date: Fri, 13 May 2016 21:57:48 +0300 Subject: [PATCH] docs(general): fix typos in docs --- .../articles/013-create-new-page/index.md | 8 +++--- docs/contents/articles/051-sidebar/index.md | 27 ++++++++++++------- 2 files changed, 21 insertions(+), 14 deletions(-) diff --git a/docs/contents/articles/013-create-new-page/index.md b/docs/contents/articles/013-create-new-page/index.md index 9fe10d799..104d016e1 100644 --- a/docs/contents/articles/013-create-new-page/index.md +++ b/docs/contents/articles/013-create-new-page/index.md @@ -9,7 +9,7 @@ template: article.jade Blur admin uses [Angular UI router](https://github.com/angular-ui/ui-router) for navigation. That means to create new page you need to basically configure `ui-router` state. -We strongly recommend to follow pages structure in our application. +We strongly recommend to follow pages structure in your application. If it doesn't fit your needs please create a GitHub issue and tell us why. We would be glad to discuss. Also we recommend to put pages to separate modules. @@ -19,7 +19,7 @@ This will allow you to easily switch off some pages in the future if needed. 0) Let's assume we want to create a blank page with title 'My New Page' -1) Create new folder to contain `myNewPage` inside of `src/app/pages`. Let's call it `myNewPage` as well. +1) Let's Create a new directory to contain our new page inside of `src/app/pages`. Let's call this directory `myNewPage`. 2) Then let's create blank angular module to contain our page called 'myNewPage.module.js' inside of `src/app/pages/myNewPage`: @@ -31,7 +31,7 @@ This will allow you to easily switch off some pages in the future if needed. .config(routeConfig); /** @ngInject */ - function routeConfig($stateProvider) { + function routeConfig() { } @@ -40,7 +40,7 @@ This will allow you to easily switch off some pages in the future if needed. 3) Then let's create empty html file called `my-new-page.html` inside of `src/app/pages/myNewPage`. -4) Lastly let's create ui router state for this page. To do this we need to modify : +4) Lastly let's create ui router state for this page. To do this we need to modify module.js file we created on step 2: ```javascript (function () { 'use strict'; diff --git a/docs/contents/articles/051-sidebar/index.md b/docs/contents/articles/051-sidebar/index.md index 65c749f18..5a82b32b7 100644 --- a/docs/contents/articles/051-sidebar/index.md +++ b/docs/contents/articles/051-sidebar/index.md @@ -6,7 +6,7 @@ group: Components template: article.jade --- -Sidebar is used to provide convenient way of navigation in our application. +Sidebar is used to provide convenient way of navigation in the application. Application support only one sidebar per angular application. That means sidebar is basically a singletone object. Currently sidebar supports level 1 and 2 sub menus. @@ -16,9 +16,8 @@ Sidebar can be created using `baSidebar` directive: ``` - -For now it support only javascript configuration. And can be configured manually or via `ui-router` states. -They can be used either combined or one at a time. +For now it support only javascript configuration. Though it can be configured manually or via `ui-router` states. +This methods can be used either together or one at a time. ## Manual configuration @@ -45,7 +44,7 @@ The provider has `addStaticItem` method, which receives menuItem object as an ar icon String -Icon (it's class name) to be displayed near title +Icon (it's a class name) to be displayed near title @@ -75,15 +74,23 @@ The provider has `addStaticItem` method, which receives menuItem object as an ar +Sample manual configuration: +```javascript + baSidebarServiceProvider.addStaticItem({ + title: 'Menu Level 1', + icon: 'ion-ios-more' + }); +``` + ## Route configuration -By default sidebar iterates through all **ui-router** states you defined in your application and looks for `sidebarMeta` property in them. -For each state with this property found sidebar element is created. +By default sidebar iterates through all **ui-router** states you defined in your application and searches for `sidebarMeta` object in them. +For each state, which has this property, sidebar element is created. States are being grouped hierarchically. -That means if there's parent abstract state for some state and they both have `sidebarMeta` property, it will be displayed as a sub item of that abstract state menu item. +That means if there's a parent abstract state for some state and they both have `sidebarMeta` property, it will be displayed as a sub item of that abstract state's menu item. -Name of the item is taken from `state`'s `title` property. Sample state configuration, which will be included in sidebar: +Name of the item is taken from `state`'s `title` property. Sample state configuration, which will add an item to sidebar: ```javascript $stateProvider .state('dashboard', { @@ -112,7 +119,7 @@ $stateProvider icon String -Icon (it's class name) to be displayed near title +Icon (it's a class name) to be displayed near title