25 |
26 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2015-2016 Sirajuddin Choudhary
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
23 |
--------------------------------------------------------------------------------
/src/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | Angular2 Bootstrap4 Navbar App
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
20 |
21 |
22 | Angular2 Bootstrap4 with Nav Bar...
Loading App
23 |
29 |
30 |
--------------------------------------------------------------------------------
/src/app/hero/hero-detail/hero-detail.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, OnInit } from '@angular/core';
2 | import { Router, ActivatedRoute } from '@angular/router';
3 |
4 | import { Hero } from '../hero.model';
5 | import { HEROES } from '../hero-list/shared';
6 |
7 | @Component({
8 | moduleId: module.id,
9 | selector: 'hero-detail',
10 | templateUrl: 'hero-detail.component.html',
11 | styles: [`
12 | .hero-detail {
13 | width: 300px;
14 | margin-left: 20px;
15 | }
16 | `],
17 | inputs: ['hero']
18 | })
19 | export class HeroDetail implements OnInit {
20 | public hero: Hero;
21 | private sub: any;
22 |
23 | constructor(private current: ActivatedRoute, public router : Router) {
24 |
25 | }
26 |
27 | ngOnInit() {
28 | this.sub = this.current.params.subscribe(params => {
29 | let id = +params['id']; // (+) converts string 'id' to a number
30 | this.hero = this.getHero(id);
31 | });
32 | }
33 |
34 | private getHero(_id: number) : Hero {
35 | var hero : Hero;
36 | HEROES.forEach(element => {
37 | if(element.id === _id) {
38 | hero = element;
39 | }
40 | });
41 | return hero;
42 | }
43 |
44 | public gotoHeroes() {
45 | this.router.navigate(['/heroes']);
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/src/app/navbar/navbar.component.html:
--------------------------------------------------------------------------------
1 |
27 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "angular2-bs4-navbar",
3 | "version": "0.0.1",
4 | "description": "An Angular2 App with Bootstrap4 Navbar and routing using Angular2's Component Router",
5 | "main": "main.js",
6 | "scripts": {
7 | "start": "lite-server",
8 | "typings": "typings install"
9 | },
10 | "repository": {
11 | "type": "git",
12 | "url": "git+https://github.com/sirajc/angular2-bs4-navbar.git"
13 | },
14 | "bugs": {
15 | "url": "https://github.com/sirajc/angular2-bs4-navbar/issues"
16 | },
17 | "homepage": "https://sirajc.github.io/angular2-bs4-navbar",
18 | "keywords": [
19 | "angular",
20 | "angular2",
21 | "router",
22 | "gulp",
23 | "bootstrap"
24 | ],
25 | "author": "Sirajuddin Choudhary ",
26 | "license": "MIT",
27 | "dependencies": {
28 | "@angular/common": "2.0.0",
29 | "@angular/compiler": "2.0.0",
30 | "@angular/core": "2.0.0",
31 | "@angular/platform-browser": "2.0.0",
32 | "@angular/platform-browser-dynamic": "2.0.0",
33 | "@angular/router": "3.0.0",
34 |
35 | "bootstrap": "^4.0.0-alpha.4",
36 | "core-js": "^2.4.1",
37 | "ie-shim": "^0.1.0",
38 | "reflect-metadata": "^0.1.3",
39 | "rxjs": "5.0.0-beta.12",
40 | "systemjs": "^0.19.27",
41 | "zone.js": "^0.6.23"
42 | },
43 | "devDependencies": {
44 | "del": "^2.1.0",
45 | "gulp": "^3.9.0",
46 | "gulp-directory-sync": "^1.2.3",
47 | "gulp-imagemin": "^2.4.0",
48 | "gulp-load-plugins": "^1.1.0",
49 | "gulp-newer": "^1.1.0",
50 | "gulp-plumber": "^1.0.1",
51 | "gulp-sass": "^2.1.0",
52 | "gulp-sourcemaps": "^1.6.0",
53 | "gulp-typescript": "^2.13.4",
54 | "gulp-util": "^3.0.7",
55 | "lite-server": "^2.2.2",
56 | "path": "^0.12.7",
57 | "typescript": "^1.8.10",
58 | "typings": "^1.3.2"
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/src/app/home/home.component.scss:
--------------------------------------------------------------------------------
1 | .jumbotron-fluid {
2 | padding:0;
3 | }
4 | header {
5 | margin-top: -15px;
6 | }
7 | img{
8 | width:100%;
9 | max-width: 100%;
10 | height:auto;
11 | }
12 | .card-img-top{
13 | width:100%;
14 | height:auto;
15 | }
16 |
17 | #site-title {
18 | max-width:150px;
19 | }
20 | #size-banner{
21 | height:580px;
22 | padding-top:60px;
23 | }
24 | header .display-2 {
25 | font-size: 350%;
26 | line-height:1;
27 | font-weight:300;
28 | }
29 | .banner-tag-line {
30 | font-size:150%;
31 | line-height:1.4;
32 | font-weight:300;
33 | }
34 |
35 | @media (min-width: 48em) { /* -md- and above */
36 | #size-banner{
37 | height:600px;
38 | padding-top:150px;
39 | }
40 | header .display-2 {
41 | font-size: 400%;
42 | }
43 | .banner-tag-line {
44 | font-size:180%;
45 | }
46 | }
47 | .btn-banner {
48 | font-weight: 600;
49 | color: #002157;
50 | border-color: #002157;
51 | margin-right: 10px;
52 | }
53 |
54 | /* ---------------------- PARALLAX --------------------------------------*/
55 | .parallax {
56 | text-align:center;
57 | background-position:center center;
58 | background-repeat:no-repeat;
59 | background-size:30%;
60 | background-attachment:fixed!important;
61 | overflow:hidden;
62 | }
63 |
64 | .parallax-pattern-overlay {
65 | background-color: rgba(255,255,255,0.5);
66 | }
67 |
68 | /* ----------------------- FOOTER ---------------------------------------*/
69 | .footer {
70 | background:#363636;
71 | margin-top:-30px;
72 | position:relative;
73 | padding: 0;
74 | }
75 |
76 | /*.footer .container {
77 | padding-top: 10px;
78 | }*/
79 |
80 | .footer p {
81 | color:#fff;
82 | font-size:.9em;
83 | line-height:24px;
84 | font-weight:300;
85 | text-align:center;
86 | text-transform:uppercase;
87 | margin-top: 30px;
88 | }
89 |
--------------------------------------------------------------------------------
/src/system-config.ts:
--------------------------------------------------------------------------------
1 | // SystemJS configuration file, see links for more information
2 | // https://github.com/systemjs/systemjs
3 | // https://github.com/systemjs/systemjs/blob/master/docs/config-api.md
4 |
5 | /***********************************************************************************************
6 | * User Configuration.
7 | **********************************************************************************************/
8 | /** Map relative paths to URLs. */
9 | const map: any = {
10 | '@angular': '../node_modules/@angular',
11 | 'rxjs': '../node_modules/rxjs',
12 | 'main': 'main.js'
13 | };
14 |
15 | /** User packages configuration. */
16 | const packages: any = {
17 | };
18 |
19 | // Angular specific barrels.
20 | var ngBarrels = [
21 | 'core',
22 | 'common',
23 | 'compiler',
24 | 'platform-browser',
25 | 'platform-browser-dynamic',
26 | 'router'
27 | ];
28 |
29 | // Add package entries for angular packages
30 | ngBarrels.forEach(function(ngBarrelName) {
31 | // Bundled (~40 requests):
32 | packages['@angular/'+ngBarrelName] = { main: '/bundles/' + ngBarrelName + '.umd.js', defaultExtension: 'js' };
33 | // Individual files (~300 requests):
34 | //packages['@angular/'+pkgName] = { main: 'index.js', defaultExtension: 'js' };
35 | });
36 |
37 | // Use bundle for Rxjs
38 | packages['rxjs'] = { main: '/bundles/Rx.umd.js', defaultExtension: 'js' };
39 |
40 | const barrels: string[] = [
41 | // Thirdparty barrels.
42 |
43 | // App specific barrels.
44 | 'app',
45 | 'app/navbar',
46 | 'app/home',
47 | 'app/home/about',
48 | 'app/home/contact',
49 | 'app/hero',
50 | 'app/hero/hero-list',
51 | 'app/hero/hero-list/shared',
52 | 'app/hero/hero-detail'
53 | ];
54 |
55 | barrels.forEach((barrelName: string) => {
56 | packages[barrelName] = { main: 'index', defaultExtension: 'js' };
57 | });
58 |
59 | /** Type declaration for ambient System. */
60 | declare var System: any;
61 |
62 | // Apply the user's configuration.
63 | System.config({ map, packages });
64 |
--------------------------------------------------------------------------------
/README.MD:
--------------------------------------------------------------------------------
1 | # Angular2 Bootstrap4 Navbar
2 | An Angular2 App with Bootstrap4 Navbar and routing using Angular2's New New Router v3.rc1. Navbar menu is fully configurable in TS files.
3 | Configuration is shared between Angular and Bootstrap Navbar
4 |
5 | ## Update
6 | Navbar is now responsive. Collapsible menu with Hamburger `☰` icon on Mobile
7 | `AppModule`_(NgModule)_ and all featues are `NgModule`
8 |
9 | [DEMO](http://sirajc.github.io/angular2-bs4-navbar)
10 |
11 | ## Steps to use
12 | 1. Fork and clone this repository
13 | 1. Run `npm install`
14 | 1. Run `npm run typings`, to install all the typing files
15 | 1. Run `gulp` to start watching html, scss and typescript changes and do a first build
16 | 1. On new termial run `npm start` to start lite-server with live reload support
17 |
18 | ## Angular2 Features
19 | 1. Usage of `NgModule` and configure routes using `RouterModule.forRoot([])`
20 | 1. Module specific routes using `RouterModule.forChild([...])`
21 | 1. Code is based on Angular2 RC5
22 | 1. Components and Child Components
23 | 1. App Routing and Child Component Routing
24 | 1. Usage of Router Directives and functions like `routerLink` and `router.navigate`
25 | 1. Usage of Angular directives like `ngClass`, `ngFor`, `ngStyle`
26 | 1. Responsive Navbar
27 |
28 | ## Router and Navbar Configuration
29 | Bootstrap Navbar are configured in `app/navbar/navbar-routes.config.ts` file eg.
30 | ```typescript
31 | export const ROUTES: RouteInfo[] = [
32 | { path: '', title: 'Angular2 Bootstrap4 Navbar', menuType: MenuType.BRAND },
33 | { path: 'heroes', title: 'Heroes', menuType: MenuType.LEFT },
34 | { path: 'about', title: 'About Us', menuType: MenuType.RIGHT },
35 | { path: 'contact', title: 'Contact', menuType: MenuType.RIGHT }
36 | ];
37 | ```
38 | * `path` is used set routerLink in Nav Item of Bootsrap
39 | * `title` is what is shown on Navbar for particular Nav Item
40 | * `menuType` can be `LEFT`, `RIGHT` and `BRAND`, based on this value the Menu Item is placed accordingly on the Navbar
41 |
42 | ## TODO
43 | - [X] Create AppModule and boot using `bootstrapModule`
44 | - [X] Move hero component and children to `NgModule`
45 | - [ ] Add Content in DEMO pages
46 | - [ ] Render Nav based on config similar to `dynamic-menu`
47 | - [X] Menu configuration should be controlled in TS file only
48 | - [ ] Get Menu and Route Configuration from HTTP instead of hardcoding
49 | - [X] Active class for Active Routes
50 | - [ ] Support for Dropdown Menu
51 | - [X] Move to SCSS
52 | - [x] Image Compression
53 | - [ ] Tests
54 |
55 | ## NOTE
56 | 1. App runs on port 8002, configurable in bs-config.json under scripts
57 | 1. lite-server uses browserSync and runs on port 3000, configurable in bs-config.json
58 |
59 | ## Contributing
60 |
61 | Create an issue on this repo if something is broken or if a feature is needed
62 | Feel Free to create a Pull Request if you fixed anything
63 | In case you want to add a feature, create an issue to disscuss the feature first
64 |
65 | ## Copyright and license
66 |
67 | The MIT License
68 |
69 | Copyright (c) 2015-2016 Sirajuddin Choudhary
70 |
71 | Permission is hereby granted, free of charge, to any person obtaining a copy
72 | of this software and associated documentation files (the "Software"), to deal
73 | in the Software without restriction, including without limitation the rights
74 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
75 | copies of the Software, and to permit persons to whom the Software is
76 | furnished to do so, subject to the following conditions:
77 |
78 | The above copyright notice and this permission notice shall be included in
79 | all copies or substantial portions of the Software.
80 |
81 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
82 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
83 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
84 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
85 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
86 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
87 | THE SOFTWARE.
88 |
--------------------------------------------------------------------------------
/gulpfile.js:
--------------------------------------------------------------------------------
1 | var config = require('./gulp.config')();
2 | var del = require('del');
3 | var gulp = require('gulp');
4 | var path = require('path');
5 | var $ = require('gulp-load-plugins')({lazy: true});
6 |
7 | var colors = $.util.colors;
8 | var envenv = $.util.env;
9 | var port = process.env.PORT || config.defaultPort;
10 |
11 | /**
12 | * Copying Css to build
13 | * @return {Stream}
14 | */
15 | gulp.task('styles', ['clean-styles'], function () {
16 | log('Compiling SCSS to build');
17 |
18 | return gulp
19 | .src(config.scss)
20 | .pipe($.plumber()) // exit gracefully if something fails after this
21 | .pipe($.sass().on('error', $.sass.logError))
22 | .pipe(gulp.dest(config.build));
23 | });
24 |
25 | gulp.task('scss-watcher', function () {
26 | gulp.watch([config.scss], ['styles']);
27 | });
28 |
29 | /**
30 | * Copying Html to build
31 | * TODO Add compression and other stuff for PROD
32 | * @return {Stream}
33 | */
34 | gulp.task('html', ['clean-html'], function () {
35 | log('Copying Html to build');
36 |
37 | return gulp
38 | .src(config.html)
39 | .pipe($.plumber()) // exit gracefully if something fails after this
40 | .pipe(gulp.dest(config.build));
41 | });
42 |
43 | /**
44 | * Copying Html to build
45 | * @return {Stream}
46 | */
47 | gulp.task('html-dev', function () {
48 | log('Syncing Html to build');
49 |
50 | return gulp
51 | .src(config.html)
52 | .pipe($.plumber()) // exit gracefully if something fails after this
53 | .pipe($.newer(config.build))
54 | .pipe(gulp.dest(config.build));
55 | });
56 |
57 | gulp.task('html-watcher', function () {
58 | var watcher = gulp.watch([config.html], ['html-dev']);
59 | watcher.on('change', function(ev) {
60 | if(ev.type === 'deleted') {
61 | del(path.relative('./', ev.path).replace(config.src,config.build));
62 | }
63 | });
64 | });
65 |
66 | /**
67 | * Transpile ts files to js
68 | */
69 | var devProject = $.typescript.createProject(config.src + 'tsconfig.json');
70 |
71 | gulp.task('tsc', function() {
72 | log('Transpiling typescript files using gulp');
73 | var tsResult = gulp.src(config.ts)
74 | .pipe($.sourcemaps.init())
75 | .pipe($.typescript(devProject));
76 |
77 | return tsResult.js
78 | .pipe($.sourcemaps.write(config.tsMaps))
79 | .pipe(gulp.dest(config.build));
80 | });
81 |
82 | gulp.task('ts-watcher', function () {
83 | gulp.watch([config.ts], ['tsc']);
84 | });
85 |
86 | /**
87 | * Remove all images from the build folder
88 | * @param {Function} done - callback when complete
89 | */
90 | gulp.task('clean-images', function (done) {
91 | clean(config.build + 'images/**/*.*', done);
92 | });
93 |
94 | /**
95 | * Compress images
96 | * @return {Stream}
97 | */
98 | gulp.task('images-dev', function () {
99 | log('Copying images');
100 |
101 | return gulp
102 | .src(config.images)
103 | .pipe($.plumber())
104 | .pipe($.directorySync(config.src + config.imagesRoot , config.build + config.imagesRoot, { printSummary: true}));
105 | });
106 |
107 | gulp.task('image-watcher', function () {
108 | gulp.watch([config.images], ['images-dev']);
109 | });
110 |
111 |
112 | /**
113 | * Compress images
114 | * @return {Stream}
115 | */
116 | gulp.task('images', ['clean-images'], function () {
117 | log('Compressing and copying images');
118 |
119 | return gulp
120 | .src(config.images)
121 | .pipe($.imagemin({optimizationLevel: 4}))
122 | .pipe(gulp.dest(config.build + 'images'));
123 | });
124 |
125 | /**
126 | * Build everything
127 | */
128 | gulp.task('build', ['styles', 'html', 'tsc', 'images-dev'], function () {
129 | log('Building everything');
130 |
131 | var msg = {
132 | title: 'gulp build',
133 | subtitle: 'Deployed to the build folder',
134 | message: 'Running `gulp build`'
135 | };
136 | log(msg);
137 | });
138 |
139 | /**
140 | * Watch for CSS and Html changes
141 | */
142 | gulp.task('default', ['build', 'scss-watcher', 'html-watcher', 'ts-watcher', 'image-watcher'], function() {
143 | var msg = {
144 | title: 'gulp',
145 | subtitle: 'Watching for HTML, CSS and Typescript changes...'
146 | };
147 | log(msg);
148 | });
149 |
150 | /**
151 | * Remove all files from the build, temp, and reports folders
152 | * @param {Function} done - callback when complete
153 | */
154 | gulp.task('clean', function (done) {
155 | var delconfig = [].concat(config.build + '*');
156 | clean(delconfig, done);
157 | });
158 |
159 | /**
160 | * Remove all styles from the build folder
161 | * @param {Function} done - callback when complete
162 | */
163 | gulp.task('clean-styles', function (done) {
164 | var files = [].concat(
165 | config.build + '**/*.css'
166 | );
167 | clean(files, done);
168 | });
169 |
170 | /**
171 | * Remove all html from the build folder
172 | * @param {Function} done - callback when complete
173 | */
174 | gulp.task('clean-html', function (done) {
175 | var files = [].concat(
176 | config.build + '**/*.html'
177 | );
178 | clean(files, done);
179 | });
180 |
181 | /**
182 | * Remove all js and html from the build and temp folders
183 | * @param {Function} done - callback when complete
184 | */
185 | gulp.task('clean-code', function (done) {
186 | var files = [].concat(
187 | config.build + '**/*.js',
188 | config.build + '**/*.html'
189 | );
190 | clean(files, done);
191 | });
192 |
193 | /**
194 | * Delete all files in a given path
195 | * @param {Array} path - array of paths to delete
196 | * @param {Function} done - callback when complete
197 | */
198 | function clean(path, done) {
199 | log('Cleaning: ' + $.util.colors.blue(path));
200 | del(path).then(function() {
201 | if(typeof done === 'function')
202 | done();
203 | });
204 | }
205 |
206 | /**
207 | * Log a message or series of messages using chalk's blue color.
208 | * Can pass in a string, object or array.
209 | */
210 | function log(msg) {
211 | if (typeof (msg) === 'object') {
212 | for (var item in msg) {
213 | if (msg.hasOwnProperty(item)) {
214 | $.util.log($.util.colors.blue(msg[item]));
215 | }
216 | }
217 | } else {
218 | $.util.log($.util.colors.blue(msg));
219 | }
220 | }
221 |
222 | module.exports = gulp;
223 |
--------------------------------------------------------------------------------
/typings/browser/ambient/es6-shim/index.d.ts:
--------------------------------------------------------------------------------
1 | // Generated by typings
2 | // Source: https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/7de6c3dd94feaeb21f20054b9f30d5dabc5efabd/es6-shim/es6-shim.d.ts
3 | // Type definitions for es6-shim v0.31.2
4 | // Project: https://github.com/paulmillr/es6-shim
5 | // Definitions by: Ron Buckton
6 | // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
7 |
8 | declare type PropertyKey = string | number | symbol;
9 |
10 | interface IteratorResult {
11 | done: boolean;
12 | value?: T;
13 | }
14 |
15 | interface IterableShim {
16 | /**
17 | * Shim for an ES6 iterable. Not intended for direct use by user code.
18 | */
19 | "_es6-shim iterator_"(): Iterator;
20 | }
21 |
22 | interface Iterator {
23 | next(value?: any): IteratorResult;
24 | return?(value?: any): IteratorResult;
25 | throw?(e?: any): IteratorResult;
26 | }
27 |
28 | interface IterableIteratorShim extends IterableShim, Iterator {
29 | /**
30 | * Shim for an ES6 iterable iterator. Not intended for direct use by user code.
31 | */
32 | "_es6-shim iterator_"(): IterableIteratorShim;
33 | }
34 |
35 | interface StringConstructor {
36 | /**
37 | * Return the String value whose elements are, in order, the elements in the List elements.
38 | * If length is 0, the empty string is returned.
39 | */
40 | fromCodePoint(...codePoints: number[]): string;
41 |
42 | /**
43 | * String.raw is intended for use as a tag function of a Tagged Template String. When called
44 | * as such the first argument will be a well formed template call site object and the rest
45 | * parameter will contain the substitution values.
46 | * @param template A well-formed template string call site representation.
47 | * @param substitutions A set of substitution values.
48 | */
49 | raw(template: TemplateStringsArray, ...substitutions: any[]): string;
50 | }
51 |
52 | interface String {
53 | /**
54 | * Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point
55 | * value of the UTF-16 encoded code point starting at the string element at position pos in
56 | * the String resulting from converting this object to a String.
57 | * If there is no element at that position, the result is undefined.
58 | * If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.
59 | */
60 | codePointAt(pos: number): number;
61 |
62 | /**
63 | * Returns true if searchString appears as a substring of the result of converting this
64 | * object to a String, at one or more positions that are
65 | * greater than or equal to position; otherwise, returns false.
66 | * @param searchString search string
67 | * @param position If position is undefined, 0 is assumed, so as to search all of the String.
68 | */
69 | includes(searchString: string, position?: number): boolean;
70 |
71 | /**
72 | * Returns true if the sequence of elements of searchString converted to a String is the
73 | * same as the corresponding elements of this object (converted to a String) starting at
74 | * endPosition – length(this). Otherwise returns false.
75 | */
76 | endsWith(searchString: string, endPosition?: number): boolean;
77 |
78 | /**
79 | * Returns a String value that is made from count copies appended together. If count is 0,
80 | * T is the empty String is returned.
81 | * @param count number of copies to append
82 | */
83 | repeat(count: number): string;
84 |
85 | /**
86 | * Returns true if the sequence of elements of searchString converted to a String is the
87 | * same as the corresponding elements of this object (converted to a String) starting at
88 | * position. Otherwise returns false.
89 | */
90 | startsWith(searchString: string, position?: number): boolean;
91 |
92 | /**
93 | * Returns an HTML anchor element and sets the name attribute to the text value
94 | * @param name
95 | */
96 | anchor(name: string): string;
97 |
98 | /** Returns a HTML element */
99 | big(): string;
100 |
101 | /** Returns a